iOS app cannot login into SMB external storage, unlike desktop web
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 13
Description
Expected behaviour
SMB folder opens just as on desktop
Actual behaviour
500: Internal server error
Steps to reproduce
Add SMB external storage, and attempt to use it from iOS app. It doesn't matter, UPN suffix or not, domain specified or not, authentication method - predefined or log-in, it fails all the same
Reasoning or why should it be changed/implemented?
Guess why
iOS version
Any
App version
3.0.8
Server configuration
Debian 10 + nginx + php7.4-fpm + Nextcloud 19.0.3.1
Log:
{"reqId":"WNFEvD9exAav2qbcMiK8","level":4,"time":"2020-10-08T02:05:57+00:00","remoteAddr":"10.10.1.110","user":"B6B75047-AD44-4AE2-BFC9-E4FF46AE4C29","app":"webdav","method":"PROPFIND","url":"/remote.php/webdav/CRM/","message":{"Exception":"Icewind\\SMB\\Exception\\ForbiddenException","Message":"Invalid request for /CRM/%D0%9D%D0%BE%D0%B2%D0%B8%D0%BA%D0%BE%D0%B2%D0%B0%20%D0%9C (ForbiddenException)","Code":13,"Trace":[{"file":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":66,"function":"fromMap","class":"Icewind\\SMB\\Exception\\Exception","type":"::"},{"file":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":78,"function":"handleError","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":109,"function":"testResult","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php","line":92,"function":"opendir","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/var/cloud/apps/files_external/lib/Lib/Storage/SMB.php","line":236,"function":"dir","class":"Icewind\\SMB\\Native\\NativeShare","type":"->"},{"file":"/var/cloud/apps/files_external/lib/Lib/Storage/SMB.php","line":604,"function":"getFolderContents","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/var/cloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php","line":158,"function":"getDirectoryContent","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"function":"getDirectoryContent","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->"},{"file":"/var/cloud/lib/private/Files/Cache/Scanner.php","line":408,"function":"iterator_to_array"},{"file":"/var/cloud/lib/private/Files/Cache/Scanner.php","line":388,"function":"handleChildren","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/cloud/lib/private/Files/Cache/Scanner.php","line":340,"function":"scanChildren","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/cloud/lib/private/Files/View.php","line":1339,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/cloud/lib/private/Files/View.php","line":1383,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/cloud/apps/dav/lib/Connector/Sabre/Directory.php","line":329,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":799,"function":"getQuotaInfo","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":96,"function":"Sabre\\DAV\\{closure}","class":"Sabre\\DAV\\CorePlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":802,"function":"handle","class":"Sabre\\DAV\\PropFind","type":"->"},{"file":"/var/cloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1063,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":989,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1678,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1661,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":363,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/remote.php","line":167,"args":["/var/cloud/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php","Line":30,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"19.0.3.1"}
{"reqId":"NGJoHrRZV0AKvU5NqF0V","level":4,"time":"2020-10-08T02:05:58+00:00","remoteAddr":"10.10.1.110","user":"B6B75047-AD44-4AE2-BFC9-E4FF46AE4C29","app":"webdav","method":"PROPFIND","url":"/remote.php/webdav/CRM/","message":{"Exception":"Icewind\\SMB\\Exception\\ForbiddenException","Message":"Invalid request for /CRM/%D0%9D%D0%BE%D0%B2%D0%B8%D0%BA%D0%BE%D0%B2%D0%B0%20%D0%9C (ForbiddenException)","Code":13,"Trace":[{"file":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":66,"function":"fromMap","class":"Icewind\\SMB\\Exception\\Exception","type":"::"},{"file":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":78,"function":"handleError","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":109,"function":"testResult","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php","line":92,"function":"opendir","class":"Icewind\\SMB\\Native\\NativeState","type":"->"},{"file":"/var/cloud/apps/files_external/lib/Lib/Storage/SMB.php","line":236,"function":"dir","class":"Icewind\\SMB\\Native\\NativeShare","type":"->"},{"file":"/var/cloud/apps/files_external/lib/Lib/Storage/SMB.php","line":604,"function":"getFolderContents","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"file":"/var/cloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php","line":158,"function":"getDirectoryContent","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->"},{"function":"getDirectoryContent","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->"},{"file":"/var/cloud/lib/private/Files/Cache/Scanner.php","line":408,"function":"iterator_to_array"},{"file":"/var/cloud/lib/private/Files/Cache/Scanner.php","line":388,"function":"handleChildren","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/cloud/lib/private/Files/Cache/Scanner.php","line":340,"function":"scanChildren","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/cloud/lib/private/Files/View.php","line":1339,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/cloud/lib/private/Files/View.php","line":1383,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/cloud/apps/dav/lib/Connector/Sabre/Directory.php","line":329,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":799,"function":"getQuotaInfo","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":96,"function":"Sabre\\DAV\\{closure}","class":"Sabre\\DAV\\CorePlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":802,"function":"handle","class":"Sabre\\DAV\\PropFind","type":"->"},{"file":"/var/cloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1063,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":989,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1678,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1661,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":363,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/cloud/remote.php","line":167,"args":["/var/cloud/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/var/cloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php","Line":30,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/3.0.8","version":"19.0.3.1"}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin by reproducing SMB external-storage access from the iOS app and compare it with desktop web behavior. Use the logged PROPFIND request to /remote.php/webdav/CRM/ and trace the reported ForbiddenException through apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php and apps/files_external/lib/Lib/Storage/SMB.php; done means the folder opens without a 500 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- backend, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100