nextcloud / nextcloud/user_oidc
RuntimeException: image not found: image:app-dark.svg webroot
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 181
- Forks
- 60
- Avg merge
- 7h 34m
- Merged PRs (30d)
- 26
Description
I'm using user_odic and after some recent updates (not sure whether Nextcloud server or this app triggered this, both were updated at similar times) I can now no longer access the settings page for most of my users. Strangely this does not affect all users, but most. I suspect the difference is what users had a theme preference set or have other seemingly unrelated settings...
Server: 24.0.6
User OIDC: 1.2.0
Error index RuntimeException: image not found: image:app-dark.svg webroot: 2022-10-14T16:50:31+00:00
serverroot:/usr/share/webapps/nextcloud at lib/private/URLGenerator.php line 244
0. apps/user_oidc/lib/Settings/Section.php line 73
OC\URLGenerator->imagePath(
)
1. .../CommonSettingsTrait.php line 90
OCA\UserOIDC\Settings\Section->getIcon(
)
2. .../CommonSettingsTrait.php line 115
OCA\Settings\Controller\PersonalSettingsController->formatSections(
)
3. .../CommonSettingsTrait.php line 67
OCA\Settings\Controller\PersonalSettingsController->formatAdminSections(
)
4. .../CommonSettingsTrait.php line 139
OCA\Settings\Controller\PersonalSettingsController->getNavigationParameters(
)
5. .../PersonalSettingsController.php line 64
OCA\Settings\Controller\PersonalSettingsController->getIndexResponse(
)
6. .../Dispatcher.php line 225
OCA\Settings\Controller\PersonalSettingsController->index(
)
7. .../Dispatcher.php line 133
OC\AppFramework\Http\Dispatcher->executeController(
)
8. .../AppFramework/App.php line 172
OC\AppFramework\Http\Dispatcher->dispatch(
)
9. lib/private/Route/Router.php line 298
OC\AppFramework\App::main(
)
10. lib/base.php line 1030
OC\Route\Router->match(
)
11. index.php line 36
OC::handleRequest(
)
Error index RuntimeException: image not found: image:app-dark.svg webroot: 2022-10-14T16:50:31+00:00
serverroot:/usr/share/webapps/nextcloud at lib/private/URLGenerator.php line 244
0. apps/user_oidc/lib/Settings/Section.php line 73
OC\URLGenerator->imagePath(
)
1. .../CommonSettingsTrait.php line 90
OCA\UserOIDC\Settings\Section->getIcon(
)
2. .../CommonSettingsTrait.php line 115
OCA\Settings\Controller\PersonalSettingsController->formatSections(
)
3. .../CommonSettingsTrait.php line 67
OCA\Settings\Controller\PersonalSettingsController->formatAdminSections(
)
4. .../CommonSettingsTrait.php line 139
OCA\Settings\Controller\PersonalSettingsController->getNavigationParameters(
)
5. .../PersonalSettingsController.php line 64
OCA\Settings\Controller\PersonalSettingsController->getIndexResponse(
)
6. .../Dispatcher.php line 225
OCA\Settings\Controller\PersonalSettingsController->index(
)
7. .../Dispatcher.php line 133
OC\AppFramework\Http\Dispatcher->executeController(
)
8. .../AppFramework/App.php line 172
OC\AppFramework\Http\Dispatcher->dispatch(
)
9. lib/private/Route/Router.php line 298
OC\AppFramework\App::main(
)
10. lib/base.php line 1030
OC\Route\Router->match(
)
11. index.php line 36
OC::handleRequest(
)
Messing with the code in lib/private/URLGenerator.php I was able to isolate the issue to know that the only thrown when $appName is user_oidc. I also determined that if I change line 239 like so:
- if ($path !== '') {
+ if ($path !== '' || true) {
Not only is the error not thrown but next cloud can now load the settings page for all users.
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 apps/user_oidc/lib/Settings/Section.php at line 73 and trace the imagePath call into lib/private/URLGenerator.php around line 244. Check why the user_oidc settings icon resolves to app-dark.svg and verify the settings page loads for affected users without the RuntimeException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100