[Bug]: OCP\Files\NotFoundException: /MyMusicLibrary
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
OCP\Files\NotFoundException: /{username}/files/MyMusicLibrary
at lib/private/Files/Node/Root.php line 209
0. .../LazyUserFolder.php line 59
OC\Files\Node\Root->get("\/{username}\/files\/MyMusicLibrary... y")
1. .../Util.php line 281
OC\Files\Node\LazyUserFolder->get("\/MyMusic ... /")
2. .../LibrarySettings.php line 107
OCA\Music\Utility\Util::getFolderFromRelativePath(
OC\Files\Node\LazyUserFolder ... {},
"\/MyMusicLibrary\ ... /"
)
3. .../SubsonicController.php line 1104
OCA\Music\Utility\LibrarySettings->getFolder("{username}")
4. .../SubsonicController.php line 225
OCA\Music\Controller\SubsonicController->getIndexesForFolders(
)
5. .../SubsonicController.php line 177
OCA\Music\Controller\SubsonicController->getIndexes(
"fold ... s"
)
6. .../Dispatcher.php line 225
OCA\Music\Controller\SubsonicController->handleRequest(
"getI ... s"
)
7. .../Dispatcher.php line 133
OC\AppFramework\Http\Dispatcher->executeController(
OCA\Music\Controller\SubsonicController ... {},
"handleReque ... t"
)
8. .../App.php line 172
OC\AppFramework\Http\Dispatcher->dispatch(
OCA\Mu ... {},
"handl ... t"
)
9. .../Route/Router.php line 298
OC\AppFramework\App::main(
"SubsonicController",
"handleRequest",
OC\AppFramework\Depend ... {},
["getIndexes.view","mu ... "]
)
10. lib/base.php line 1030
OC\Route\Router->match("\/apps\/music\/subsonic\ ... w")
11. index.php line 36
OC::handleRequest(
/MyMusicLibrary is an external storage (files_external) of local directory
This happens most of the time, except when the directory /MyMusicLibrary has just been accessed in the Files app.
This problem is not present in 24.0.5.1, I recently upgraded to 24.0.8.2 and this is when the problem starts to happen. I now upgraded to 25.0.2.3 and the problem still persists.
Steps to reproduce
- Let the server be idle for a while
- Use any subsonic client to access my Nextcloud Music Library as I usually do.
- The FileNotFound exception happens.
- Open the music library folder (which is an external storage) in Files app in the web browser
- redo step 2
- The FileNotFound exception does not happen, and I can use my music library normally.
- Enjoy music for a while.
- The FileNotFound exception recurs.
This problem specifically affects ONLY subsonic clients, the music webapp works seamlessly as usual.
Expected behavior
It should work as in previous versions.
Installation method
Community Docker image
Operating system
Debian/Ubuntu
PHP engine version
None
Web server
Nginx
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 22.2.3 to 22.2.4)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"allow_local_remote_servers": true,
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"overwriteprotocol": "https",
"trashbin_retention_obligation": 30,
"overwritehost": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_smtpsecure": "ssl",
"mail_smtpstreamoptions": {
"ssl": {
"allow_self_signed": true,
"verify_peer": false,
"verify_peer_name": false
}
},
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"enable_previews": true,
"enabledPreviewProviders": {
"0": "OC\\Preview\\TXT",
"1": "OC\\Preview\\MarkDown",
"2": "OC\\Preview\\OpenDocument",
"3": "OC\\Preview\\PDF",
"4": "OC\\Preview\\MSOffice2003",
"5": "OC\\Preview\\MSOfficeDoc",
"7": "OC\\Preview\\Image",
"8": "OC\\Preview\\Photoshop",
"9": "OC\\Preview\\TIFF",
"10": "OC\\Preview\\SVG",
"11": "OC\\Preview\\Font",
"12": "OC\\Preview\\MP3",
"13": "OC\\Preview\\Movie",
"14": "OC\\Preview\\MKV",
"15": "OC\\Preview\\MP4",
"16": "OC\\Preview\\AVI",
"17": "OC\\Preview\\HEIC",
"18": "OC\\Preview\\BMP"
},
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "24.0.8.2",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"loglevel": 1,
"ncd_disable_bt": "1",
"ncd_yt_binary": "\/usr\/bin\/youtube-dl",
"ncd_rpctoken": "",
"maintenance": false,
"app_install_overwrite": [
"ssepush",
"epubreader"
],
"theme": "",
"ncd_admin_settings": {
"disallow_aria2_settings": "1"
},
"app.mail.verify-tls-peer": false,
"logtimezone": "Asia\/Shanghai",
"logfile": "\/var\/www\/html\/data\/nextcloud_logs\/nextcloud.log",
"log_rotate_size": 104857600,
"data-fingerprint": "6091e96366b06350ba0ec477ec934e2e"
}
}
List of activated Apps
Enabled:
- accessibility: 1.10.0
- activity: 2.16.0
- apporder: 0.15.0
- bookmarks: 11.0.4
- bruteforcesettings: 2.4.0
- calendar: 3.5.4
- cloud_federation_api: 1.7.0
- comments: 1.14.0
- contacts: 4.2.3
- contactsinteraction: 1.5.0
- cospend: 1.4.10
- dashboard: 7.4.0
- dav: 1.22.0
- event_update_notification: 2.0.0
- federatedfilesharing: 1.14.0
- files: 1.19.0
- files_external: 1.16.1
- files_markdown: 2.3.6
- files_mindmap: 0.0.27
- files_pdfviewer: 2.5.0
- files_retention: 1.13.2
- files_rightclick: 1.3.0
- files_sharing: 1.16.2
- files_trashbin: 1.14.0
- files_versions: 1.17.0
- files_videoplayer: 1.13.0
- firstrunwizard: 2.13.0
- gpoddersync: 3.7.1
- logreader: 2.9.0
- lookup_server_connector: 1.12.0
- music: 1.8.0
- ncdownloader: 1.0.2
- news: 20.0.0
- notifications: 2.12.1
- notify_push: 0.5.0
- oauth2: 1.12.0
- password_policy: 1.14.0
- passwords: 2022.12.21
- photos: 1.6.0
- privacy: 1.8.0
- provisioning_api: 1.14.0
- recommendations: 1.3.0
- richdocuments: 6.3.2
- serverinfo: 1.14.0
- settings: 1.6.0
- sharebymail: 1.14.0
- spreed: 14.0.7
- ssepush: 0.0.6
- systemtags: 1.14.0
- tasks: 0.14.5
- text: 3.5.1
- theming: 1.15.0
- twofactor_backupcodes: 1.13.0
- twofactor_totp: 6.4.1
- user_status: 1.4.0
- viewer: 1.8.0
- weather_status: 1.4.0
- workflowengine: 2.6.0
Disabled:
- admin_audit
- circles: 22.3.0
- encryption: 2.10.0
- federation: 1.12.0
- groupfolders: 12.0.2
- imageconverter: 1.3.4
- mail: 1.15.1
- nextcloud_announcements: 1.11.0
- support: 1.5.0
- survey_client: 1.10.0
- updatenotification: 1.12.0
- user_ldap: 1.12.2
Nextcloud Signing status
Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.
Results
=======
- core
- INVALID_HASH
- core/js/mimetypelist.js
Raw output
==========
Array
(
[core] => Array
(
[INVALID_HASH] => Array
(
[core/js/mimetypelist.js] => Array
(
[expected] => 94195a260a005dac543c3f6aa504f1b28e0078297fe94a4f52f012c16c109f0323eecc9f767d6949f860dfe454625fcaf1dc56f87bb8350975d8f006bbbdf14a
[current] => 1b07fb272efa65a10011ed52a6e51260343c5de2a256e1ae49f180173e2b6684ccf90d1af3c19fa97c31d42914866db46e3216883ec0d6a82cec0ad5529e78b1
)
)
)
)
What's this? I've never noticed this problem.
I've done an ./occ maintenance:mimetype:update-js, Has this anything to do with this integrity failure?
Nextcloud Logs
No response
Additional info
No response
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
Start with lib/private/Files/Node/Root.php line 209 and trace the calls through LazyUserFolder.php, Util.php, LibrarySettings.php, and SubsonicController.php lines 177, 225, and 1104. Reproduce the failure after the external storage has been idle, then compare it with accessing the folder in Files first. Done means Subsonic clients can access the external music library without the NotFoundException recurring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100