HTTP ERROR 500 after updating to NC28

Hello,

I’ve seen a few similar “Http error 500” on the forum after an update, but none of the solution posted can help me. I am not under linux, my NextCloud is installed on a shared server, I am a newbie…

My NextClould installation was broken (not working) for a while. Today I tried to restore it and successfully ran a update (from version 27 — or older, not sure — to 28).

I processed the upgrade through the CPanel (nextcloud/update/index.php). The update process went fine, but at the end, when all was finished, I have this Http Error 500 and can’t do anything else. I’ve read on the forum that this may be caused by apps, but I do not remember having installed any particular apps… may be the default apps?

Nevertheless, I don’t see what to do (please, don’t ask me to run ‘sudo’ and other command lines, I do not understand this language and I have only access to the Nextcloud files with an FTP client and the CPanel of my hosting service).

Here is the error.log file I found under Nextcloud folder:

[17-Aug-2024 07:58:40 UTC] PHP Fatal error:  Declaration of OCA\Talk\Share\RoomShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares): array must be compatible with OCP\Share\IShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares, $shallow = true) in /home2/cushangh/public_html/NextCloud/apps/spreed/lib/Share/RoomShareProvider.php on line 520
[17-Aug-2024 07:58:47 UTC] PHP Fatal error:  Declaration of OCA\Talk\Share\RoomShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares): array must be compatible with OCP\Share\IShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares, $shallow = true) in /home2/cushangh/public_html/NextCloud/apps/spreed/lib/Share/RoomShareProvider.php on line 520
[17-Aug-2024 07:58:49 UTC] PHP Fatal error:  Declaration of OCA\Talk\Share\RoomShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares): array must be compatible with OCP\Share\IShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares, $shallow = true) in /home2/cushangh/public_html/NextCloud/apps/spreed/lib/Share/RoomShareProvider.php on line 520
[17-Aug-2024 07:58:58 UTC] PHP Fatal error:  Declaration of OCA\Talk\Share\RoomShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares): array must be compatible with OCP\Share\IShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares, $shallow = true) in /home2/cushangh/public_html/NextCloud/apps/spreed/lib/Share/RoomShareProvider.php on line 520
[17-Aug-2024 08:12:32 UTC] PHP Fatal error:  Declaration of OCA\Talk\Share\RoomShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares): array must be compatible with OCP\Share\IShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares, $shallow = true) in /home2/cushangh/public_html/NextCloud/apps/spreed/lib/Share/RoomShareProvider.php on line 520
[17-Aug-2024 08:12:42 UTC] PHP Fatal error:  Declaration of OCA\Talk\Share\RoomShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares): array must be compatible with OCP\Share\IShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares, $shallow = true) in /home2/cushangh/public_html/NextCloud/apps/spreed/lib/Share/RoomShareProvider.php on line 520
[17-Aug-2024 08:13:07 UTC] PHP Fatal error:  Declaration of OCA\Talk\Share\RoomShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares): array must be compatible with OCP\Share\IShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares, $shallow = true) in /home2/cushangh/public_html/NextCloud/apps/spreed/lib/Share/RoomShareProvider.php on line 520
[17-Aug-2024 08:13:13 UTC] PHP Fatal error:  Declaration of OCA\Talk\Share\RoomShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares): array must be compatible with OCP\Share\IShareProvider::getSharesInFolder($userId, OCP\Files\Folder $node, $reshares, $shallow = true) in /home2/cushangh/public_html/NextCloud/apps/spreed/lib/Share/RoomShareProvider.php on line 520

My Config.php file:

<?php
$CONFIG = array (
  'instanceid' => 'XXXX',
  'passwordsalt' => 'XXXX',
  'secret' => 'XXXXX',
  'trusted_domains' => 
  array (
    0 => 'www.XXXXXXX.info',
  ),
  'datadirectory' => '/home2/cushangh/public_html/NextCloud/data',
  'dbtype' => 'sqlite3',
  'version' => '24.0.12.1',
  'overwrite.cli.url' => 'http://www.XXXXXXXX.info/NextCloud',
  'dbname' => 'AgendaNextCloud',
  'dbhost' => 'localhost:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'updater.secret' => 'XXXX',

Thank you for any advice!

Anyone? any idea?
Should I reinstall totally NextCloud?

A 500 / internal server error is a generic error.

You’ll need to check your Nextcloud log.

Based on your config it will be at /home2/cushangh/public_html/NextCloud/data/nextcloud.log.

I’m unclear on your situation: are you saying your installation was broken before you updated?

Note your config file says you’re running NC24.

Thank you for your answer.

Here is the NextCloud log… Gosh! It’s a 258Mo file size!! I can only paste the last lines otherwise it will be too long… also posting a DropBox link to check the whole file.

{"file":"/home2/cushangh/public_html/nextcloud3/index.php","line":37,"args":["/home2/cushangh/public_html/nextcloud3/lib/base.php"],"function":"require_once"}],"File":"/home2/cushangh/public_html/nextcloud3/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":144,"message":"Unable to generate a URL for the named route \"cloud_federation_api.RequestHandler.addShare\" as such route does not exist.","exception":{},"CustomMessage":"Unable to generate a URL for the named route \"cloud_federation_api.RequestHandler.addShare\" as such route does not exist."}}
{"reqId":"ZsJGIDoJUg_0Z9ChHs2U2gAAsA0","level":1,"time":"2024-08-18T19:06:09+00:00","remoteAddr":"143.198.172.2","user":"--","app":"no app in context","method":"GET","url":"/","message":"Unable to generate a URL for the named route \"ocs.password_policy.API.generate\" as such route does not exist.","userAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/537.36","version":"28.0.4","exception":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"ocs.password_policy.API.generate\" as such route does not exist.","Code":0,"Trace":[{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/Route/Router.php","line":380,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["ocs.password_policy.API.generate",[],1]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/URLGenerator.php","line":121,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["ocs.password_policy.API.generate",[],false]},{"file":"/home2/cushangh/public_html/nextcloud3/apps/password_policy/lib/Capabilities.php","line":58,"function":"linkToOCSRouteAbsolute","class":"OC\\URLGenerator","type":"->","args":["password_policy.API.generate"]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/CapabilitiesManager.php","line":74,"function":"getCapabilities","class":"OCA\\Password_Policy\\Capabilities","type":"->","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/Template/JSConfigHelper.php","line":166,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->","args":[false,true]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/TemplateLayout.php","line":264,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest","core"]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/base.php","line":845,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/base.php","line":1200,"function":"init","class":"OC","type":"::","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/index.php","line":37,"args":["/home2/cushangh/public_html/nextcloud3/lib/base.php"],"function":"require_once"}],"File":"/home2/cushangh/public_html/nextcloud3/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":144,"message":"Unable to generate a URL for the named route \"ocs.password_policy.API.generate\" as such route does not exist.","exception":{},"CustomMessage":"Unable to generate a URL for the named route \"ocs.password_policy.API.generate\" as such route does not exist."}}
{"reqId":"ZsJGIDoJUg_0Z9ChHs2U2gAAsA0","level":1,"time":"2024-08-18T19:06:09+00:00","remoteAddr":"143.198.172.2","user":"--","app":"no app in context","method":"GET","url":"/","message":"Unable to generate a URL for the named route \"ocs.password_policy.API.validate\" as such route does not exist.","userAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/537.36","version":"28.0.4","exception":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"ocs.password_policy.API.validate\" as such route does not exist.","Code":0,"Trace":[{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/Route/Router.php","line":380,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["ocs.password_policy.API.validate",[],1]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/URLGenerator.php","line":121,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["ocs.password_policy.API.validate",[],false]},{"file":"/home2/cushangh/public_html/nextcloud3/apps/password_policy/lib/Capabilities.php","line":59,"function":"linkToOCSRouteAbsolute","class":"OC\\URLGenerator","type":"->","args":["password_policy.API.validate"]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/CapabilitiesManager.php","line":74,"function":"getCapabilities","class":"OCA\\Password_Policy\\Capabilities","type":"->","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/Template/JSConfigHelper.php","line":166,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->","args":[false,true]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/TemplateLayout.php","line":264,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest","core"]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/base.php","line":845,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/lib/base.php","line":1200,"function":"init","class":"OC","type":"::","args":[]},{"file":"/home2/cushangh/public_html/nextcloud3/index.php","line":37,"args":["/home2/cushangh/public_html/nextcloud3/lib/base.php"],"function":"require_once"}],"File":"/home2/cushangh/public_html/nextcloud3/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":144,"message":"Unable to generate a URL for the named route \"ocs.password_policy.API.validate\" as such route does not exist.","exception":{},"CustomMessage":"Unable to generate a URL for the named route \"ocs.password_policy.API.validate\" as such route does not exist."}}

Full log file (258mo) here on Dropbox:
https://www.dropbox.com/scl/fi/e1e8w1gz7wyqy448c6gvy/nextcloud.log?rlkey=b22pyx56dt00t9qnuxi1lp6ex&st=4wfa0v8n&dl=0

I am also posting the last part of the update log:

2024-08-17T02:12:57-0600 olBWGCA2CD [info] checkForUpdate() Array
(
    [version] => 25.0.13.2
    [versionstring] => Nextcloud 25.0.13
    [url] => https://download.nextcloud.com/server/releases/nextcloud-25.0.13.zip
    [web] => https://docs.nextcloud.com/server/25/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=25.0.13
    [autoupdater] => 1
    [eol] => 1
    [signature] => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2024-08-17T02:12:57-0600 olBWGCA2CD [info] getChangelogURL()
2024-08-17T02:12:57-0600 olBWGCA2CD [info] end of checkForUpdate() Update to Nextcloud 25.0.13 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-25.0.13.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#25-0-13" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2024-08-17T11:10:07-0600 fPmCIQ5UgY [info] request to updater
2024-08-17T11:10:07-0600 fPmCIQ5UgY [info] currentStep()
2024-08-17T11:10:07-0600 fPmCIQ5UgY [info] Step 12 is in state "end".
2024-08-17T11:10:07-0600 fPmCIQ5UgY [info] show HTML page
2024-08-17T11:10:07-0600 fPmCIQ5UgY [info] current version: 25.0.13 build time: 2023-10-26T17:51:43+00:00 30fb8a53b04c623db368d29a83e8e1153a2d6b07
2024-08-17T21:20:16-0600 3caU2K9Ihk [info] request to updater
2024-08-17T21:20:16-0600 3caU2K9Ihk [info] currentStep()
2024-08-17T21:20:16-0600 3caU2K9Ihk [info] Step 12 is in state "end".
2024-08-17T21:20:16-0600 3caU2K9Ihk [info] show HTML page
2024-08-17T21:20:16-0600 3caU2K9Ihk [info] current version: 25.0.13 build time: 2023-10-26T17:51:43+00:00 30fb8a53b04c623db368d29a83e8e1153a2d6b07

Few things are very strange:

  1. The previous log says I am on NC24, the update log show NC25, I am sure I’ve complete the update to NC28…
  2. In the NextCloud.log, I can see here and there the ‘NextCloud3’ folder… I don’t understand why. In fact, my install is located in /public_html/NextCloud/… but, sometimes ago, since I had troubles with my installation (don’t remember what happened exactly) I tried to create a new install in a new folder: /public_html/nextcloud3/… but it did not work. Now, I don’t understand why the log file in NextCloud does mention nextcloud3 folder!

On the forum, I’ve seen a thread with a similar error.log and a HTTP 500 error (posted in the first post), and many errors after update were caused my apps that were not updated before updating nextclould, some users found a way to disable app in PhPMyAdmin, so they could complete the update process, and than re-enable and update the app. That’s what I am trying to do, but my NextClould.log is frightening…!

You have set loglevel to 0! That is insane and only meant for debugging purposes for a very short time!
The vast majority of that logfile is useless and those entries makes it difficult to read.

A loglevel of 3, which shows you only the real errors is enough!


in other words, you made a mess out of it. :woozy_face:

Yes. Your nextcloud 28 is definitively in that folder and your nextcloud 24 is running too in the other folder and both log in the same logfile. That of course is asking for trouble!. You should better understand what you are doing!

Here is what I can/could do for you:
I filtered your logfile:

Here the logentries from 2024-08-17 with a loglevel > 2

… where a lot went wrong from two paralel runing nextcloud instances both working on the same files, Some migrations went wrong and it is a miracle that this did run until you tried to update.

but this is to much mess for me to give you more help. Not even you know exactly what you have done, so how should I know/find out?


Much and good luck,
ernolf

2 Likes

Thank you very much for the detailed feedback, I appreciate it a lot. Indeed I do not remember what happens with my install since it bugged long time ago, I abandoned, but now I really need to make it work…

I guess, for me the easiest way should be to delete both install, and reinstall a new clean NextCloud 28. But, the only thing I’d like to save, it’s my calendar data, I have a caldav agenda setup in NextCloud, is there an easy way to save/export it, then to reimport it in the new fresh install?

Yes there is, it is called → calcardbackup ←


ernolf

2 Likes

Thanks you.
I am now trying to reinstall fully NextCloud into a new folder…
I cannot create an account with the web installer, when trying to create an admin account, each time I get :

Error while trying to initialise the database: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error

I’ve tried different name and password, easy ones and longer ones, nothing work. Is it a SQL database issue? My hosting server is running PhP 8.1…

Some user have reported this error, but I did not find a workable solution.

I also have tried to use the NextCloud windows client to connect and to create an account, but when I enter the URL of the website, I get another error: “Could not parse the JSON returned from the server”. The client do not work.

Do you know how to do in this case?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.