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

Function getLogger() no longer available for NC 31 RC 1 - Server error #1198

Open
frake65 opened this issue Jan 25, 2025 · 1 comment
Open

Comments

@frake65
Copy link

frake65 commented Jan 25, 2025

Hei Pauli,
once again using a release candidate of an upcoming release (Nextcloud 31 RC1) I just got a server error.
When I call the app Music I get the following log message:
"Could not boot music: Call to undefined method OC\Server::getLogger()"
Probably the function is no longer available that way...?
Would be very kind, if you could look into that issue.
Thank you very much!

Full log entry is:
{"reqId":"vm01cOsRdC6EgO9ZSVYk","level":4,"time":"2025-01-25T16:49:35+00:00","remoteAddr":"xx.xx.xx.xx","user":"xxx","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/calendars/xxx/inbox/","message":"Could not boot music: Call to undefined method OC\Server::getLogger()","userAgent":"macOS/15.3 (24D60) dataaccessd/1.0","version":"31.0.0.12","exception":{"Exception":"Error","Message":"Call to undefined method OC\Server::getLogger()","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":153,"function":"OCA\Music\AppInfo\{closure}","class":"OCA\Music\AppInfo\Application","type":"->","args":["*** sensitive parameters replaced "]},{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\AppFramework\Utility\{closure}","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":[" sensitive parameters replaced "]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":120,"function":"offsetGet","class":"Pimple\Container","type":"->","args":["Logger"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":441,"function":"query","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":["Logger"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":419,"function":"queryNoFallback","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->","args":["Logger"]},{"file":"/var/www/html/custom_apps/music/lib/AppInfo/Application.php","line":667,"function":"query","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->","args":["Logger"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":153,"function":"OCA\Music\AppInfo\{closure}","class":"OCA\Music\AppInfo\Application","type":"->","args":[" sensitive parameters replaced "]},{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\AppFramework\Utility\{closure}","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":[" sensitive parameters replaced "]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":120,"function":"offsetGet","class":"Pimple\Container","type":"->","args":["Maintenance"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":441,"function":"query","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":["Maintenance"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":419,"function":"queryNoFallback","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->","args":["Maintenance"]},{"file":"/var/www/html/custom_apps/music/lib/AppInfo/Application.php","line":779,"function":"query","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->","args":["Maintenance"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":153,"function":"OCA\Music\AppInfo\{closure}","class":"OCA\Music\AppInfo\Application","type":"->","args":[" sensitive parameters replaced "]},{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\AppFramework\Utility\{closure}","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":[" sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":120,"function":"offsetGet","class":"Pimple\Container","type":"->","args":["UserHooks"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":441,"function":"query","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":["UserHooks"]},{"file":"/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":419,"function":"queryNoFallback","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->","args":["UserHooks"]},{"file":"/var/www/html/custom_apps/music/lib/AppInfo/Application.php","line":831,"function":"query","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->","args":["UserHooks"]},{"file":"/var/www/html/custom_apps/music/lib/AppInfo/Application.php","line":801,"function":"registerHooks","class":"OCA\Music\AppInfo\Application","type":"->","args":[]},{"file":"/var/www/html/custom_apps/music/lib/AppInfo/Application.php","line":796,"function":"init","class":"OCA\Music\AppInfo\Application","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":157,"function":"boot","class":"OCA\Music\AppInfo\Application","type":"->","args":[{"class":"OC\AppFramework\Bootstrap\BootContext"}]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":477,"function":"bootApp","class":"OC\AppFramework\Bootstrap\Coordinator","type":"->","args":["music"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":246,"function":"loadApp","class":"OC\App\AppManager","type":"->","args":["music"]},{"file":"/var/www/html/remote.php","line":130,"function":"loadApps","class":"OC\App\AppManager","type":"->","args":[["filesystem","logging"]]}],"File":"/var/www/html/custom_apps/music/lib/AppInfo/Application.php","Line":568,"message":"Could not boot music: Call to undefined method OC\Server::getLogger()","exception":{},"CustomMessage":"Could not boot music: Call to undefined method OC\Server::getLogger()"}}

@paulijar
Copy link
Collaborator

Yes, I tested myself the RC just yesterday with the same result.

Looking at the upgrade guide, it's clear that there is a breaking change on the logger and the applications need to adapt. In addition, the changes in the Files app may need some work on the Music app for full compatibility.

I hope to release a compatible version of Music before the final release of NC 31 (scheduled 2025-02-25), but let's see how easy or difficult these changes are.

paulijar added a commit that referenced this issue Jan 29, 2025
NC 31 has removed the method Server::getLogger() as well as all methods from
the ILogger interface. The new alternative for this has existed since NC 20
but it's not there in ownCloud. Hence, we need to be prepared to two
different environments.

With this change, at least the basic functionality of the Music app works.
Everything has not been tested yet.

refs #1198
paulijar added a commit that referenced this issue Jan 30, 2025
In Nextcloud 31, also the public link-shared folders use the new Vue UI
instead of the legacy Files UI. Hence, the "NC28+" logic in the embedded Music
player now needs to be able to handle also the public shares.

To easily stream the file data from public shares, both when playing an audio
file and when playing a playlist, a new endpoint
`/api/share/{token}/{fileId}/download` was added. The same endpoints provided
by the Music app back-end are now used regardless of the host cloud version.

refs #1198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants