I had the problem that new nextcloud clients cannot connect to my nextcloud server (snap, version 14) (the client login loop problem. In a forum thread I read that I had to set overwriteprotocol.
So I executed the following command:
snap run nextcloud.occ config:system:set overwriteprotocol âhttpsâ
This returned with:
System config value overwriteprotocol => https set to empty string
And now any command I run will throw an error:
snap run nextcloud.occ config:system:get overwriteprotocol
An unhandled exception has been thrown:
TypeError: Return value of OC\AppFramework\Http\Request::getServerProtocol() must be of the type string, array returned in /snap/nextcloud/11755/htdocs/lib/private/AppFramework/Http/Request.php:649
Stack trace:
#0 /snap/nextcloud/11755/htdocs/lib/private/URLGenerator.php(253): OC\AppFramework\Http\Request->getServerProtocol()
#1 /snap/nextcloud/11755/htdocs/lib/private/Template/SCSSCacher.php(114): OC\URLGenerator->getBaseUrl()
#2 /snap/nextcloud/11755/htdocs/lib/private/Server.php(970): OC\Template\SCSSCacher->__construct(Object(OC\Log), Object(OC\Files\AppData\Factory), Object(OC\URLGenerator), Object(OC\AllConfig), Object(OCA\Theming\ThemingDefaults), â/snap/nextcloudâŚâ, Object(OC\Memcache\Factory), Object(OC\Template\IconsCacher), Object(OC\AppFramework\Utility\TimeFactory))
#3 /snap/nextcloud/11755/htdocs/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#4 /snap/nextcloud/11755/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(âOC\Template\SCSâŚâ)
#5 /snap/nextcloud/11755/htdocs/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(âOC\Template\SCSâŚâ)
#6 /snap/nextcloud/11755/htdocs/lib/private/Repair.php(138): OC\ServerContainer->query(âOC\Template\SCSâŚâ)
#7 /snap/nextcloud/11755/htdocs/core/register_command.php(143): OC\Repair::getRepairSteps()
#8 /snap/nextcloud/11755/htdocs/lib/private/Console/Application.php(118): require_once(â/snap/nextcloudâŚâ)
#9 /snap/nextcloud/11755/htdocs/console.php(95): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /snap/nextcloud/11755/htdocs/occ(11): require_once(â/snap/nextcloudâŚâ)
#11 {main}root@nextcloud:/snap/nextcloud/current/htdocs/config# snap run nextcloud.occ config:system:get overwriteprotocol.https
An unhandled exception has been thrown:
TypeError: Return value of OC\AppFramework\Http\Request::getServerProtocol() must be of the type string, array returned in /snap/nextcloud/11755/htdocs/lib/private/AppFramework/Http/Request.php:649
Stack trace:
#0 /snap/nextcloud/11755/htdocs/lib/private/URLGenerator.php(253): OC\AppFramework\Http\Request->getServerProtocol()
#1 /snap/nextcloud/11755/htdocs/lib/private/Template/SCSSCacher.php(114): OC\URLGenerator->getBaseUrl()
#2 /snap/nextcloud/11755/htdocs/lib/private/Server.php(970): OC\Template\SCSSCacher->__construct(Object(OC\Log), Object(OC\Files\AppData\Factory), Object(OC\URLGenerator), Object(OC\AllConfig), Object(OCA\Theming\ThemingDefaults), â/snap/nextcloudâŚâ, Object(OC\Memcache\Factory), Object(OC\Template\IconsCacher), Object(OC\AppFramework\Utility\TimeFactory))
#3 /snap/nextcloud/11755/htdocs/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#4 /snap/nextcloud/11755/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(âOC\Template\SCSâŚâ)
#5 /snap/nextcloud/11755/htdocs/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(âOC\Template\SCSâŚâ)
#6 /snap/nextcloud/11755/htdocs/lib/private/Repair.php(138): OC\ServerContainer->query(âOC\Template\SCSâŚâ)
#7 /snap/nextcloud/11755/htdocs/core/register_command.php(143): OC\Repair::getRepairSteps()
#8 /snap/nextcloud/11755/htdocs/lib/private/Console/Application.php(118): require_once(â/snap/nextcloudâŚâ)
#9 /snap/nextcloud/11755/htdocs/console.php(95): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /snap/nextcloud/11755/htdocs/occ(11): require_once(â/snap/nextcloudâŚâ)
#11 {main}root@nextcloud:/snap/nextcloud/current/htdocs/config#
I tried to update to version 15
snap refresh nextcloud --channel=latest/stable
Which seemingly went fine, but still no nextcloud running.
What did I do wrong and how can I fix this.
My whole server is down.