Repository navigation
PHP Fatal error after upgrade to 14.0.0 #11225
Description
Activity
GitMate.io thinks possibly related issues are #6299 (Fatal Errors), #1282 ( Authentication problem after upgrade to 10.0.0), #8754 (White page / Error 500 after Upgrade from Nextcloud 12.0.4 to 13 ), and #7788 (Android client unable to login via default login method (class appName does not exist)).
BTW I have tried to downgrade back to 13.0.6 and I still get the same errors. This lead me to conclude it be related to a recent PHP upgrade so I tried to downgrade these as well and I still get the same errors.
Same here.
Centos 7.5.1804
Apache/2.4.6 (CentOS)
PHP 7.1.22[14-Sep-2018 18:18:29 UTC] PHP Fatal error: Uncaught OCP\AppFramework\QueryException: Could not resolve defaultTokenProvider! Class defaultTokenProvider does not exist in /nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php:110 Stack trace: #0 /nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(125): OC\AppFramework\Utility\SimpleContainer->resolve('defaultTokenPro...') #1 /nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('defaultTokenPro...') #2 /nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(81): OC\ServerContainer->query('defaultTokenPro...') #3 /nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(104): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass)) #4 /nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(125): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...') #5 /nextcloud/lib/private/Serve in /nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 110OK - It has been fixed!
This error occured after an restore of the mysql.users table, where the nextcloud user was missing!
After add and grand access for the nextcloud user, everythings works fine now.I get a similar error after upgrading to version 14. However server was running good for a day, now I cannot access it via frontend, nor by backend. Always get:
... 2018/09/15 16:15:25 [error] 6#6: *17 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught OCP\AppFramework\QueryException: Could not resolve defaultTokenProvider! Class defaultTokenProvider does not exist in /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php:110 Stack trace: #0 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(125): OC\AppFramework\Utility\SimpleContainer->resolve('defaultTokenPro...') #1 /var/www/html/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('defaultTokenPro...') #2 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(81): OC\ServerContainer->query('defaultTokenPro...') #3 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(104): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass)) #4 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(125): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...') #5 /var/www/html/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\Simp... ...I checked mysql.user and user nextcloud is still available.
I am using the official docker image with fpm (dded33639e42).Thanks @jwrangel for pointing me to check on my SQL service as well, I use PostgreSQL and from some reason it fails to start on boot. Right after I restarted it everything goes back to normal so that's not a problem from Nextcloud side.
Found a mysql connection error as well. Sorry for the confusion.
Only question: Why is there not an error coming up, like "Cannot connect to DB"
@chris42 what kind of mysql connection error where you getting and where was it logged?
Thank you.@pjsanon
As said, I did not get an error in nextcloud or nginx (Or any other sensible place). Found the error in my docker setup with a container trying to connect to an IP non existent. Was lucky that I was checking IP traffic via iptables logs as trying to change some rules during that time.#11316 should help getting a meaningful error message
Reacted by Bruno PerelCould you apply the linked patch and check if the error message gets more helpful?
@MorrisJobke you mean PR #11316 ?
I can apply it on my test system and cut the db connection. However I do not have an upgrade scenario available.@MorrisJobke you mean PR #11316 ?
Yes.
It seems to work. I get the following error when using PR #11316 and cutting the DB connection.
Sep 29 23:54:18 docker/nginx[681]: PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/lib/private/DB/Connection.php:64Sep 29 23:54:18 docker/nginx[681]: PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused in
There is not much we can do, when the database refuses the connection. Check the forums for help with this, as this is more a setup issue then.
Let's close this if it is a configuration/database issue and not a bug. Feel free to re-open if you can confirm it isn't the database puking out but caused by something in Nextcloud code itself!
Steps to reproduce
httpd.Expected behaviour
I don't get any errors and my Nextcloud instance works.
Actual behaviour
I get a fatal PHP error in
httpd's logs:http logs
Server configuration
Operating system: Arch Linux
Web server: Apache 2.4.34
Database: Postgresql
PHP version: 7.2.10
Nextcloud version: 14.0.0
Updated from an older Nextcloud/ownCloud or fresh install: 13.0.6
Where did you install Nextcloud from: Distribution repositories.
Signing status: I can't login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed since the server doesn't work at all.
Running
sudo -u http php occ app:listgives:sudo -u http php occ app:listRunning
sudo -u http php occ config:list systemgives: Same result.Contents of config.php:
Contents of config.php
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: Any
Operating system: Any
Logs
Web server error log
Same as posted above:
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
I get mainly errors with strings such as:
Browser log
Irrelevant