Skip to content

occ files:scan : Argument 1 passed to Icewind\SMB\BasicAuth::__construct() must be of the type string, null given #26697

Closed

Description

@Bevito

Steps to reproduce

  1. Log in, in SSH.
  2. Go to Nextcloud folder
  3. Try to scan files for one user

Expected behaviour

Tell us what should happen

occ should scan files for selected user.

Actual behaviour

Tell us what happens instead

an error is triggered :

sudo -u www-data php occ files:scan 'c9cfd3d4-74aa-1035-91e9-8108b7ac8bcb'
Starting scan for user 1 out of 1 (c9cfd3d4-74aa-1035-91e9-8108b7ac8bcb)
An unhandled exception has been thrown:
TypeError: Argument 1 passed to Icewind\SMB\BasicAuth::__construct() must be of the type string, null given, called in /var/www/html/nextcloud/apps/files_external/lib/Lib/Backend/SMB.php on line 82 and defined in /var/www/html/nextcloud/apps/files_external/3rdparty/icewind/smb/src/BasicAuth.php:32
Stack trace:
#0 /var/www/html/nextcloud/apps/files_external/lib/Lib/Backend/SMB.php(82): Icewind\SMB\BasicAuth->__construct(NULL, 'ETUD', NULL)
#1 /var/www/html/nextcloud/apps/files_external/lib/Config/ConfigAdapter.php(95): OCA\Files_External\Lib\Backend\SMB->manipulateStorageConfig(Object(OCA\Files_External\Lib\StorageConfig), Object(OC\User\User))
#2 /var/www/html/nextcloud/apps/files_external/lib/Config/ConfigAdapter.php(132): OCA\Files_External\Config\ConfigAdapter->prepareStorageConfig(Object(OCA\Files_External\Lib\StorageConfig), Object(OC\User\User))
#3 [internal function]: OCA\Files_External\Config\ConfigAdapter->OCA\Files_External\Config\{closure}(Object(OCA\Files_External\Lib\StorageConfig))
#4 /var/www/html/nextcloud/apps/files_external/lib/Config/ConfigAdapter.php(130): array_map(Object(Closure), Array)
#5 /var/www/html/nextcloud/lib/private/Files/Config/MountProviderCollection.php(109): OCA\Files_External\Config\ConfigAdapter->getMountsForUser(Object(OC\User\User), Object(OC\Files\Storage\StorageFactory))
#6 /var/www/html/nextcloud/lib/private/Files/Filesystem.php(452): OC\Files\Config\MountProviderCollection->addMountForUser(Object(OC\User\User), Object(OC\Files\Mount\Manager))
#7 /var/www/html/nextcloud/lib/private/Files/Filesystem.php(377): OC\Files\Filesystem::initMountPoints('c9cfd3d4-74aa-1...')
#8 /var/www/html/nextcloud/lib/private/legacy/OC_Util.php(324): OC\Files\Filesystem::init('c9cfd3d4-74aa-1...', '/c9cfd3d4-74aa-...')
#9 /var/www/html/nextcloud/lib/private/Files/Utils/Scanner.php(116): OC_Util::setupFS('c9cfd3d4-74aa-1...')
#10 /var/www/html/nextcloud/lib/private/Files/Utils/Scanner.php(202): OC\Files\Utils\Scanner->getMounts('/c9cfd3d4-74aa-...')
#11 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(158): OC\Files\Utils\Scanner->scan('/c9cfd3d4-74aa-...', true, NULL)
#12 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(214): OCA\Files\Command\Scan->scanFiles('c9cfd3d4-74aa-1...', '/c9cfd3d4-74aa-...', Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#13 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/html/nextcloud/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/nextcloud/console.php(100): OC\Console\Application->run()
#20 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')
#21 {main}

Server configuration

Operating system:
Debian 10.9

Web server:
Server version: Apache/2.4.38 (Debian)
Server built: 2020-08-25T20:08:29

Database:
Server version: 10.3.27-MariaDB-0+deb10u1 Debian 10

PHP version:
PHP 7.3.27-1deb10u1 (fpm-fcgi) (built: Feb 13 2021 16:31:40)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.27, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.27-1
deb10u1, Copyright (c) 1999-2018, by Zend Technologies

Nextcloud version: (see Nextcloud admin page)
21.0.1

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from 21.0.0

Where did you install Nextcloud from:
Install / update from auto-updater.
Try reinstalling from tar.bz2 from official website.

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:
Enabled:

  • accessibility: 1.7.0
  • activity: 2.14.3
  • admin_audit: 1.11.0
  • cloud_federation_api: 1.4.0
  • comments: 1.11.0
  • contactsinteraction: 1.2.0
  • dashboard: 7.1.0
  • dav: 1.17.1
  • federatedfilesharing: 1.11.0
  • federation: 1.11.0
  • files: 1.16.0
  • files_external: 1.12.0
  • files_pdfviewer: 2.1.0
  • files_rightclick: 1.0.0
  • files_sharing: 1.13.1
  • files_trashbin: 1.11.0
  • files_versions: 1.14.0
  • files_videoplayer: 1.10.0
  • firstrunwizard: 2.10.0
  • logreader: 2.6.0
  • lookup_server_connector: 1.9.0
  • nextcloud_announcements: 1.10.0
  • notifications: 2.9.0
  • oauth2: 1.9.0
  • onlyoffice: 6.3.0
  • password_policy: 1.11.0
  • photos: 1.3.0
  • privacy: 1.5.0
  • provisioning_api: 1.11.0
  • recommendations: 1.0.0
  • serverinfo: 1.11.0
  • settings: 1.3.0
  • sharebymail: 1.11.0
  • support: 1.4.0
  • survey_client: 1.9.0
  • systemtags: 1.11.0
  • text: 3.2.0
  • theming: 1.12.0
  • twofactor_backupcodes: 1.10.0
  • updatenotification: 1.11.0
  • user_ldap: 1.11.0
  • user_status: 1.1.1
  • viewer: 1.5.0
  • weather_status: 1.1.0
  • workflowengine: 2.3.0
    Disabled:
  • encryption

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "21.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "maxZipInputSize": 1073741824,
        "allowZipDownload": true,
        "theme": "",
        "overwrite.cli.url": "https:\/\/cloud.iut-orsay.fr",
        "htaccess.RewriteBase": "\/",
        "maintenance": false,
        "default_language": "fr",
        "default_phone_region": "FR",
        "defaultapp": "files,dashboard",
        "auto_logout": true,
        "log_type": "owncloud",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 0,
        "trusted_domains": [
            "cloud.iut-orsay.fr"
        ],
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "15, auto",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "dbindex": 0,
            "timeout": 0
        },
        "onlyoffice": {
            "jwt_secret": "REMOVED SENSITIVE VALUE",
            "jwt_header": "REMOVED SENSITIVE VALUEt"
        },
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "ldapUserCleanupInterval": "60",
        "updater.release.channel": "stable",
        "mysql.utf8mb4": true,
        "mail_sendmailmode": "smtp"
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
smb

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
LDAP

LDAP configuration (delete this part if not used)

+-------------------------------+-------------------------------------------------------------------+
| Configuration                 | s01                                                               |
+-------------------------------+-------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 0                                                                 |
| homeFolderNamingRule          |                                                                   |
| lastJpegPhotoLookup           | 0                                                                 |
| ldapAgentName                 | cn=nextcloud,ou=security,dc=iut-orsay,dc=fr                             |
| ldapAgentPassword             | ***                                                               |
| ldapAttributesForGroupSearch  |                                                                   |
| ldapAttributesForUserSearch   |                                                                   |
| ldapBackupHost                |                                                                   |
| ldapBackupPort                |                                                                   |
| ldapBase                      | dc=iut-orsay,dc=fr                                                |
| ldapBaseGroups                | ou=groups,dc=iut-orsay,dc=fr                                      |
| ldapBaseUsers                 | ou=people,dc=iut-orsay,dc=fr                                      |
| ldapCacheTTL                  | 600                                                               |
| ldapConfigurationActive       | 1                                                                 |
| ldapDefaultPPolicyDN          |                                                                   |
| ldapDynamicGroupMemberURL     |                                                                   |
| ldapEmailAttribute            | mail                                                              |
| ldapExperiencedAdmin          | 1                                                                 |
| ldapExpertUUIDGroupAttr       |                                                                   |
| ldapExpertUUIDUserAttr        |                                                                   |
| ldapExpertUsernameAttr        |                                                                   |
| ldapExtStorageHomeAttribute   | supannAliasLogin                                                  |
| ldapGidNumber                 | gidNumber                                                         |
| ldapGroupDisplayName          | cn                                                                |
| ldapGroupFilter               | objectClass=posixGroup                                            |
| ldapGroupFilterGroups         |                                                                   |
| ldapGroupFilterMode           | 0                                                                 |
| ldapGroupFilterObjectclass    |                                                                   |
| ldapGroupMemberAssocAttr      | memberUid                                                         |
| ldapHost                      | ldaps://ldaps.iut-orsay.fr                                        |
| ldapIgnoreNamingRules         |                                                                   |
| ldapLoginFilter               | (&(objectclass=*)(|(uid=%uid)(mail=%uid)(supannAliasLogin=%uid))) |
| ldapLoginFilterAttributes     |                                                                   |
| ldapLoginFilterEmail          | 0                                                                 |
| ldapLoginFilterMode           | 0                                                                 |
| ldapLoginFilterUsername       | 1                                                                 |
| ldapMatchingRuleInChainState  | unknown                                                           |
| ldapNestedGroups              | 0                                                                 |
| ldapOverrideMainServer        |                                                                   |
| ldapPagingSize                | 500                                                               |
| ldapPort                      | 636                                                               |
| ldapQuotaAttribute            | NextcloudQuota                                                    |
| ldapQuotaDefault              | 10 GB                                                             |
| ldapTLS                       | 0                                                                 |
| ldapUserAvatarRule            | default                                                           |
| ldapUserDisplayName           | displayname                                                       |
| ldapUserDisplayName2          |                                                                   |
| ldapUserFilter                | (objectclass=*)                                                   |
| ldapUserFilterGroups          |                                                                   |
| ldapUserFilterMode            | 0                                                                 |
| ldapUserFilterObjectclass     |                                                                   |
| ldapUuidGroupAttribute        | auto                                                              |
| ldapUuidUserAttribute         | auto                                                              |
| turnOffCertCheck              | 0                                                                 |
| turnOnPasswordChange          | 0                                                                 |
| useMemberOfToDetectMembership | 1                                                                 |
+-------------------------------+-------------------------------------------------------------------+

Client configuration

Browser:
Mozilla Firefox ESR 78.9.0esr (64 bits)

Operating system:
Debian 11

Activity

  1. added
    0. Needs triage
    on Apr 22, 2021
  2. changed the title [-]occ files:scan : An unhandled exception has been thrown[/-] [+]`occ files:scan` : Argument 1 passed to `Icewind\SMB\BasicAuth::__construct()` must be of the type `string`, `null` given[/+] on Apr 22, 2021
  3. icewind1991 commented on Apr 23, 2021

    @icewind1991
    Member

    please provide the output of occ files_external:list

  4. Bevito commented on Apr 23, 2021

    @Bevito
    Author

    Here is the result of occ files_external:list :

    +----------+----------------------+------------+-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+---------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Mount ID | Mount Point          | Storage    | Authentication Type                     | Configuration                                                                                                                       | Options | Applicable Users | Applicable Groups                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
    +----------+----------------------+------------+-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+---------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | 1802     | /t_sidious_tp        | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: true, domain: "ETUD", host: "sidious.etud.iut-orsay.fr", root: "", share: "tp", show_hidden: false, timeout: ""          |         | All              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
    | 1803     | /z_sidious           | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: false, domain: "ETUD", host: "sidious.etud.iut-orsay.fr", root: "$home", share: "users$", show_hidden: true, timeout: "" |         | All              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
    | 1817     | /y_vader_commun_ccri | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: false, domain: "ENS", host: "vader.ens.iut-orsay.fr", root: "", share: "commun-ccri", show_hidden: true, timeout: ""     |         |                  | IUT Orsay - Centre Commun de Ressources Informatiques                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
    | 1818     | /y_vader_sformations | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: false, domain: "ENS", host: "vader.ens.iut-orsay.fr", root: "", share: "sformations", show_hidden: false, timeout: ""    |         |                  | IUT Orsay - Service des formations et des relations entreprises                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
    | 1819     | /y_vader_stechnique  | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: false, domain: "ENS", host: "vader.ens.iut-orsay.fr", root: "", share: "stechnique", show_hidden: false, timeout: ""     |         |                  | IUT Orsay - Service Technique                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    | 1820     | /y_vader_spersonnel  | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: false, domain: "ENS", host: "vader.ens.iut-orsay.fr", root: "", share: "spersonnel", show_hidden: false, timeout: ""     |         |                  | IUT Orsay - Service du Personnel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
    | 1821     | /y_vader_sfinancier  | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: false, domain: "ENS", host: "vader.ens.iut-orsay.fr", root: "", share: "sfinancier", show_hidden: false, timeout: ""     |         |                  | IUT Orsay - Service Financier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    | 1822     | /y_vader_commun-chim | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: true, domain: "ENS", host: "vader.ens.iut-orsay.fr", root: "", share: "commun-chim", show_hidden: false, timeout: ""     |         |                  | IUT Orsay - Departement Chimie                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
    | 1823     | /y_vader_commun-mphy | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: true, domain: "ENS", host: "vader.ens.iut-orsay.fr", root: "", share: "commun-mphy", show_hidden: false, timeout: ""     |         |                  | IUT Orsay - Departement Mesures Physiques                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | 1824     | /y_vader_commun-info | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: true, domain: "ENS", host: "vader.ens.iut-orsay.fr", root: "", share: "commun-info", show_hidden: false, timeout: ""     |         |                  | IUT Orsay - Departement Informatique                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
    | 1894     | /z_vader             | SMB / CIFS | Identifiants globaux, utilisateur saisi | check_acl: false, domain: "ENS", host: "vader.ens.iut-orsay.fr", root: "$home", share: "users$", show_hidden: true, timeout: ""     |         |                  | IUT Orsay - Departement Informatique, IUT Orsay - Departement Chimie, IUT Orsay - Departement Mesures Physiques, IUT Orsay - Service Financier, IUT Orsay - Direction, IUT Orsay - Enseignants DU FLE, IUT Orsay - Service Technique, IUT Orsay - Bibliotheque, IUT Orsay - Service du Personnel, IUT Orsay - Hygiene et Securite, IUT Orsay - Relations Internationales, IUT Orsay - Centre Commun de Ressources Informatiques, IUT Orsay - Service communication, IUT Orsay - Service des formations et des relations entreprises |
    +----------+----------------------+------------+-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+---------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    

    The strange thing, is that, for some users, there is no problem (for exemple, my own account), and for others users, they have a message "This folder is unavailable, check the logs or contact your admin".
    I'm pretty sure they have not modified their config.

  5. Bevito commented on Apr 26, 2021

    @Bevito
    Author

    Hi,

    I read #26457 and I applied the proposed fix : i.e. downloaded Nextcloud 21.0.0, replaced "icewind" folder.
    The problem is solved with this temporary "workaround".
    I hoped It can help solving this issue.

  6. Bevito commented on May 20, 2021

    @Bevito
    Author

    The issue is still present after updating to 21.0.2.
    I still need to apply the "workaround" form #26457

  7. szaimen commented on Jul 6, 2021

    @szaimen
    Contributor

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

  8. Bevito commented on Jul 6, 2021

    @Bevito
    Author

    Hi,
    Unfortunately, the issue is still present.
    Each time I update Nextcloud, I have to apply the proposed fix from #26457 (i.e. downgrade Icewind with version shipped with Nextcloud 20.0.0)
    If I don't do this :

    • I have the above error
    • I can't list users in admin area (an error occured)
    • Some users can't log in : they have the error "This folder is unavailable, check the logs or contact your admin".

    If I can test something, don't hesitate to tell me.

    Many thanks.

  9. szaimen commented on Jul 14, 2021

    @szaimen
    Contributor

    It should actually be fixed with #26627, no?

  10. Bevito commented on Jul 14, 2021

    @Bevito
    Author

    Hi,
    Unfortunately, since updating to Nextcloud 21.0.1 / 21.0.2 / 21.0.3 doesn't fix the issue, I think updating to icewind/smb to 3.4.1 doesn't fix this issue.
    My Nextcloud instance is on 21.0.3 with icewind/smb version shiped with nextcloud 20.0.0.

  11. added
    1. to develop
    and removed
    0. Needs triage
    on Jul 14, 2021
  12. remyd1 commented on Aug 5, 2021

    @remyd1

    Hi,

    Same issue here.

    Nextcloud 21.0.3, debian Buster, apache2 (2.4.38), php7.4, php-fpm, redis, postgresql 11.

    My list of activated apps:

    Enabled:
      - accessibility: 1.7.0
      - activity: 2.14.3
      - admin_audit: 1.11.0
      - announcementcenter: 5.0.0
      - bruteforcesettings: 2.2.0
      - calendar: 2.3.1
      - circles: 0.21.4
      - cloud_federation_api: 1.4.0
      - comments: 1.11.0
      - contacts: 4.0.1
      - contactsinteraction: 1.2.0
      - dashboard: 7.1.0
      - dav: 1.17.1
      - deck: 1.4.3
      - encryption: 2.9.0
      - external: 3.8.2
      - federatedfilesharing: 1.11.0
      - federation: 1.11.0
      - files: 1.16.0
      - files_accesscontrol: 1.11.0
      - files_external: 1.12.0
      - files_markdown: 2.3.4
      - files_pdfviewer: 2.1.0
      - files_rightclick: 1.0.0
      - files_sharing: 1.13.1
      - files_trashbin: 1.11.0
      - files_versions: 1.14.0
      - files_videoplayer: 1.10.0
      - firstrunwizard: 2.10.0
      - forms: 2.3.0
      - groupfolders: 9.0.2
      - impersonate: 1.8.0
      - logreader: 2.6.0
      - lookup_server_connector: 1.9.0
      - nextcloud_announcements: 1.10.0
      - notes: 4.1.1
      - notifications: 2.9.0
      - oauth2: 1.9.0
      - password_policy: 1.11.0
      - photos: 1.3.0
      - privacy: 1.5.0
      - provisioning_api: 1.11.0
      - quota_warning: 1.11.0
      - recommendations: 1.0.0
      - serverinfo: 1.11.0
      - settings: 1.3.0
      - sharebymail: 1.11.0
      - spreed: 11.3.1
      - support: 1.4.0
      - survey_client: 1.9.0
      - systemtags: 1.11.0
      - tasks: 0.14.1
      - text: 3.2.0
      - theming: 1.12.0
      - twofactor_backupcodes: 1.10.0
      - updatenotification: 1.11.0
      - user_ldap: 1.11.0
      - user_status: 1.1.1
      - viewer: 1.5.0
      - weather_status: 1.1.0
      - workflowengine: 2.3.0
    Disabled:
    
  13. Bevito commented on Aug 5, 2021

    @Bevito
    Author

    Hi,
    I have updated my Nextcloud instance with 22.0.0 and this issue is still present.
    For the time being, I have downgraded Icewind with version shipped with Nextcloud 20.0.0.
    If I can test something, don't hesitate to tell me.

    Many thanks.

  14. remyd1 commented on Aug 9, 2021

    @remyd1

    I have no more that issue. It was due (IMHO) to multiple LDAP tenants/auth to access the same CIFS shared folder (with the same options as @Bevito). Changing to a single LDAP base removed that issue.

  15. blizzz commented on Aug 25, 2021

    @blizzz
    Member

    @icewind1991 in some cases a username is not set and thus null is passed in SMB::manipulateStorageConfig() when instantiating BasicAuth.

    Example config:

    | 1234     | /mydrive                               | SMB / CIFS | Global  credentials                          | host: "somedomain.tld", share: "mydrive", root: "\\\\somedomain.tld\\mydrive\\myuid", domain: "somedomain.tld", show_hidden: false, check_acl: false, timeout: ""                                                            | readonly: false                                       | myuid              |                   | Personal |
    

    I suppose following should "fix" it (didn't test), but I am not sure it is just hiding symptoms.

    diff --git a/apps/files_external/lib/Lib/Backend/SMB.php b/apps/files_external/lib/Lib/Backend/SMB.php
    index 5344bf5f78..758e161cd8 100644
    --- a/apps/files_external/lib/Lib/Backend/SMB.php
    +++ b/apps/files_external/lib/Lib/Backend/SMB.php
    @@ -77,7 +77,7 @@ class SMB extends Backend {
            $auth = $storage->getAuthMechanism();
            if ($auth->getScheme() === AuthMechanism::SCHEME_PASSWORD) {
                $smbAuth = new BasicAuth(
    -               $storage->getBackendOption('user'),
    +               $storage->getBackendOption('user') ?? '',
                    $storage->getBackendOption('domain'),
                    $storage->getBackendOption('password')
                );
  16. Bevito commented on Aug 25, 2021

    @Bevito
    Author

    Hi,
    I just tested the fix proposed by @blizzz, and unfortunatly, it doesn't change the situation.
    If I use 'icewind' shipped with Nextcloud 21.0.0, I have no problem.
    If I try 'icewind' shipped with Nextcloud > 21.0.0, I have that error.

    My Nextcloud instance is authenticated againt an OpenLDAP Database, but the SMB mounts are done against two samba4 domain.
    The logins and passwords are the same on OpenLDAP and samba4 AD databases.

  17. NiTRoeSE commented on Oct 28, 2021

    @NiTRoeSE

    I can confirm that 20.0.13, 21.05 & 22.0.2 also have this issue.
    See here: #28229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developbugfeature: external storage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions