Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Argument 3 passed to OCA\UserStatus\Controller\UserStatusController::__construct() must be of the type string, null given #25071

Closed
netsrotr opened this issue Jan 11, 2021 · 13 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@netsrotr
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Try to establish synchronization (add account) on Android

Expected behaviour

successful synchronization of files

Actual behaviour

Warning and Error reported at NC server

Server configuration

Operating system: Ubuntu 20.04.1 LTS‬

Web server: Apache2

Database: mysql

PHP version: 7.4

Nextcloud version: 20.0.4

Updated from an older Nextcloud/ownCloud or fresh install: fresh install (web installer)

Where did you install Nextcloud from: https://nextcloud.com/

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.6.0
  - activity: 2.13.4
  - bruteforcesettings: 2.0.1
  - calendar: 2.1.3
  - cloud_federation_api: 1.3.0
  - comments: 1.10.0
  - contacts: 3.4.3
  - contactsinteraction: 1.1.0
  - dashboard: 7.0.0
  - dav: 1.16.2
  - federatedfilesharing: 1.10.2
  - federation: 1.10.1
  - files: 1.15.0
  - files_pdfviewer: 2.0.1
  - files_rightclick: 0.17.0
  - files_sharing: 1.12.1
  - files_trashbin: 1.10.1
  - files_versions: 1.13.0
  - files_videoplayer: 1.9.0
  - firstrunwizard: 2.9.0
  - logreader: 2.5.0
  - lookup_server_connector: 1.8.0
  - mail: 1.7.2
  - nextcloud_announcements: 1.9.0
  - notifications: 2.8.0
  - oauth2: 1.8.0
  - password_policy: 1.10.1
  - photos: 1.2.1
  - privacy: 1.4.0
  - provisioning_api: 1.10.0
  - recommendations: 0.8.0
  - richdocuments: 3.7.11
  - richdocumentscode: 6.4.301
  - serverinfo: 1.10.0
  - settings: 1.2.0
  - sharebymail: 1.10.0
  - spreed: 10.0.5
  - support: 1.3.0
  - survey_client: 1.8.0
  - systemtags: 1.10.0
  - text: 3.1.0
  - theming: 1.11.0
  - twofactor_backupcodes: 1.9.0
  - updatenotification: 1.10.0
  - user_status: 1.0.1
  - viewer: 1.4.0
  - weather_status: 1.0.0
  - workflowengine: 2.2.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_ldap

Nextcloud configuration:

Config report
php occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.mydomain.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "20.0.4.0",
        "overwrite.cli.url": "https:\/\/cloud.mydomain.de",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "default_language": "de",
        "default_locale": "de_DE"
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: (Chrome / Android)
Nextcloud Android Client Version: 3.14.1

Operating system: Android 7.1.1 / Galaxy JS (2016)

Logs

Web server error log

Web server error log
[Apache error_log.txt](https://github.com/nextcloud/server/files/5795385/Apache.error_log.txt)
[ngnix proxy_error_log.txt](https://github.com/nextcloud/server/files/5795375/ngnix.proxy_error_log.txt)

Nextcloud log (data/nextcloud.log)

Nextcloud log
[nextcloud.log](https://github.com/nextcloud/server/files/5795411/nextcloud.log)

Browser log

Browser log
none... failed in nextcloud android client
@netsrotr netsrotr added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jan 11, 2021
@Obi-Wahn
Copy link

Obi-Wahn commented Jan 12, 2021

Same problem with Nextcloud 20.0.4, Ubuntu 18.04 and PHP 7.4. Android 11 and App Version 3.14.1.

Error	PHP	TypeError: Argument 3 passed to OCA\UserStatus\Controller\UserStatusController::__construct() must be of the type string, null given at /var/www/vhosts/nextcloud/apps/user_status/lib/Controller/UserStatusController.php#62		2021-01-12T07:43:15+0100
Error	index	TypeError: Argument 7 passed to OCA\Mail\Controller\MessagesController::__construct() must be of the type string, null given
<<closure>>

OCA\Mail\Controller\MessagesController->__construct()

/var/www/vhosts/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 101:

ReflectionClass->newInstanceArgs()

/var/www/vhosts/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 109:

OC\AppFramework\Utility\SimpleContainer->buildClass()

/var/www/vhosts/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 126:

OC\AppFramework\Utility\SimpleContainer->resolve()

/var/www/vhosts/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 455:

OC\AppFramework\Utility\SimpleContainer->query()

/var/www/vhosts/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 427:

OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()

/var/www/vhosts/nextcloud/lib/private/AppFramework/App.php - line 139:

OC\AppFramework\DependencyInjection\DIContainer->query()

/var/www/vhosts/nextcloud/lib/private/Route/Router.php - line 308:

OC\AppFramework\App::main()

/var/www/vhosts/nextcloud/lib/base.php - line 1008:

OC\Route\Router->match()

/var/www/vhosts/nextcloud/index.php - line 37:

OC::handleRequest()

	2021-01-12T07:43:10+0100
Error	PHP	TypeError: Argument 3 passed to OCA\UserStatus\Controller\UserStatusController::__construct() must be of the type string, null given at /var/www/vhosts/nextcloud/apps/user_status/lib/Controller/UserStatusController.php#62		2021-01-12T07:43:07+0100

@solracsf solracsf changed the title [PHP] Error: TypeError: Argument 3 passed to OCA\UserStatus\Controller\UserStatusController::__construct() must be of the type string, null given at /var/www/vhosts/nextcloud/apps/user_status/lib/Controller/UserStatusController.php#62 GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json from [ip-address] at 2021-01-11T09:25:21+00:00 TypeError: Argument 3 passed to OCA\UserStatus\Controller\UserStatusController::__construct() must be of the type string, null given Jan 13, 2021
@stavros-k

This comment was marked as spam.

@JohnyBeGood

This comment was marked as spam.

@AndyXheli

This comment was marked as spam.

@zcyph

This comment was marked as spam.

@AndyXheli
Copy link

AndyXheli commented May 29, 2021

@simonspa @MorrisJobke would this be related to #23842 ?

@simonspa
Copy link
Contributor

simonspa commented May 31, 2021

@simonspa @MorrisJobke would this be related to #23842 ?

I don't think so because it references L62 of that file, the third argument of the class constructor:

https://github.com/nextcloud/server/pull/23842/files#diff-e7ec91ce9e59539885bfd3698cc8af4193ea5ea3e23e2873c9b6cfd2aa491739R62

public function __construct(string $appName,
      		IRequest $request,
      		string $userId,
      		ILogger $logger) {

so it seems it is called with an empty $userId by the Android client.

@AndyXheli
Copy link

@simonspa @MorrisJobke would this be related to #23842 ?

I don't think so because it references L62 of that file, the third argument of the class constructor:

https://github.com/nextcloud/server/pull/23842/files#diff-e7ec91ce9e59539885bfd3698cc8af4193ea5ea3e23e2873c9b6cfd2aa491739R62

public function __construct(string $appName,

      		IRequest $request,

      		string $userId,

      		ILogger $logger) {

so it seems it is called with an empty $userId by the Android client.

Thank you for the feedback just wanted to make sure.

@szaimen
Copy link
Contributor

szaimen commented Jul 7, 2021

Is this Issue still valid in NC21.0.3? If not, please close this issue. Thanks! :)

@ghost

This comment was marked as resolved.

@ghost ghost added the stale Ticket or PR with no recent activity label Aug 6, 2021
@ghost ghost closed this as completed Aug 20, 2021
@simonspa simonspa reopened this Aug 20, 2021
@ghost ghost removed the stale Ticket or PR with no recent activity label Aug 20, 2021
@ghost

This comment was marked as resolved.

@ghost ghost added the stale Ticket or PR with no recent activity label Sep 19, 2021
@ghost ghost closed this as completed Oct 3, 2021
@petob77
Copy link

petob77 commented Feb 5, 2022

@szaimen Hi, now in Nextloud version 23.0.1.1, Ubuntu 20.04 and PHP 7.4 valid
{"reqId":"","level":3,"time":"2022-02-05T21:15:51+01:00","remoteAddr":"","user":"--","app":"PHP","method":"GET","url":"/nextcloud/ocs/v2.php/apps/user_status/api/v1/user_status?format=json","message":"TypeError: Argument 3 passed to OCA\UserStatus\Controller\UserStatusController::__construct() must be of the type string, null given at /var/www/***/nextcloud/apps/user_status/lib/Controller/UserStatusController.php#65","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.19.0","version":"23.0.1.1"}

@informaticavera

This comment was marked as off-topic.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests