When opening/reloading the maps page while not logged in, it shows an internal server error (instead of redirecting the user to the login page).
While this may be less problematic on a desktop in a real browser, it can be highly annoying on an Android device when adding Nextcloud Maps to the home screen as a shortcut (via "Add to home screen" in Firefox), in this case there is no location bar and there is no direct path for the user to go back to the main page and log in. The only way of recovery is opening a real Firefox window, navigating to the Nextcloud URL and logging in there, after that the home screen shortcut will continue working.
{
"reqId": "F2kuY6T1Pa9zLsqXGaJb",
"level": 3,
"time": "2026-07-17T17:17:03+00:00",
"remoteAddr": "10.47.4.1",
"user": "--",
"app": "index",
"method": "GET",
"url": "/nextcloud/index.php/apps/maps/",
"scriptName": "/nextcloud/index.php",
"message": "OCA\\Maps\\Controller\\PageController::__construct(): Argument #3 ($userId) must be of type string, null given",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0",
"version": "33.0.6.2",
"exception": {
"Exception": "TypeError",
"Message": "OCA\\Maps\\Controller\\PageController::__construct(): Argument #3 ($userId) must be of type string, null given",
"Code": 0,
"Trace": [
{
"function": "__construct",
"class": "OCA\\Maps\\Controller\\PageController",
"type": "->"
},
{
"file": "/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
"line": 74,
"function": "newInstanceArgs",
"class": "ReflectionClass",
"type": "->"
},
{
"file": "/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
"line": 131,
"function": "buildClass",
"class": "OC\\AppFramework\\Utility\\SimpleContainer",
"type": "->"
},
{
"file": "/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
"line": 157,
"function": "resolve",
"class": "OC\\AppFramework\\Utility\\SimpleContainer",
"type": "->"
},
{
"file": "/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
"line": 357,
"function": "query",
"class": "OC\\AppFramework\\Utility\\SimpleContainer",
"type": "->"
},
{
"file": "/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
"line": 327,
"function": "queryNoFallback",
"class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
"type": "->"
},
{
"file": "/var/www/html/nextcloud/lib/private/AppFramework/App.php",
"line": 133,
"function": "query",
"class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
"type": "->"
},
{
"file": "/var/www/html/nextcloud/lib/private/Route/Router.php",
"line": 321,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/html/nextcloud/lib/base.php",
"line": 1155,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/html/nextcloud/index.php",
"line": 25,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/var/www/html/nextcloud/apps/maps/lib/Controller/PageController.php",
"Line": 32,
"message": "OCA\\Maps\\Controller\\PageController::__construct(): Argument #3 ($userId) must be of type string, null given",
"exception": "{\"class\":\"TypeError\",\"message\":\"OCA\\Maps\\Controller\\PageController::__construct(): Argument #3 ($userId) must be of type string, null given\",\"code\":0,\"file\":\"/var/www/html/nextcloud/apps/maps/lib/Controller/PageController.php:32\",\"trace\":\"#0 [internal function]: OCA\\Maps\\Controller\\PageController->__construct()\\n#1 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(74): ReflectionClass->newInstanceArgs()\\n#2 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(131): OC\\AppFramework\\Utility\\SimpleContainer->buildClass()\\n#3 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(157): OC\\AppFramework\\Utility\\SimpleContainer->resolve()\\n#4 /var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(357): OC\\AppFramework\\Utility\\SimpleContainer->query()\\n#5 /var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(327): OC\\AppFramework\\DependencyInjection\\DIContainer->queryNoFallback()\\n#6 /var/www/html/nextcloud/lib/private/AppFramework/App.php(133): OC\\AppFramework\\DependencyInjection\\DIContainer->query()\\n#7 /var/www/html/nextcloud/lib/private/Route/Router.php(321): OC\\AppFramework\\App::main()\\n#8 /var/www/html/nextcloud/lib/base.php(1155): OC\\Route\\Router->match()\\n#9 /var/www/html/nextcloud/index.php(25): OC::handleRequest()\\n#10 {main}\"}",
"CustomMessage": "OCA\\Maps\\Controller\\PageController::__construct(): Argument #3 ($userId) must be of type string, null given"
}
}
The Maps app should redirect to the login form when the user is not logged in.
Bug description
When opening/reloading the maps page while not logged in, it shows an internal server error (instead of redirecting the user to the login page).
While this may be less problematic on a desktop in a real browser, it can be highly annoying on an Android device when adding Nextcloud Maps to the home screen as a shortcut (via "Add to home screen" in Firefox), in this case there is no location bar and there is no direct path for the user to go back to the main page and log in. The only way of recovery is opening a real Firefox window, navigating to the Nextcloud URL and logging in there, after that the home screen shortcut will continue working.
Here is the entry from my nextcloud.log:
Steps to reproduce
Expected behavior
The Maps app should redirect to the login form when the user is not logged in.
Installation method
Manual installation
Operating system
Debian/Ubuntu
PHP engine version
No response
Web server
No response
Database engine version
No response
Is this bug present after an update or on a fresh install of the server?
No response
Is this bug present after an update or on a fresh install of the app?
No response
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
Configuration report
List of activated Apps
irrelevant for this issue.Nextcloud Signing status
Nextcloud Logs
Browser Console
Additional info
No response