-
Couldn't load subscription status.
- Fork 7
Labels
Description
Steps to reproduce
- install Nextcloud 25.0.3 with PHP 8.1
- install sentry plugin
- set my sentry sentry in config.php
- refresh my nextcloud page in the browser
- broken 500 screen
- if I comment out the sentry entries in the config.php my nextcloud installation works normal again
Expected behaviour
Nextcloud should keep running and submit errors to my sentry installation
Actual behaviour
- Website shows 500 Server Error.
- as I have a PHP experience my research concluded, that my nextcloud instance uses an old Version of PSR, which is not compatible to the one you use in the sentry plugin. But as I have no knowledge of the nextcloud architecture I could not go further into the debugging
Server configuration
Operating system: Ubuntu 22.04 (kubernetes docker)
Web server: Apache/2.4.52
Database: bitnami/mariadb:10.6.12-debian-11-r3
PHP version: PHP 8.1.16
Version: Nextcloud 25.0.3
Updated from an older version or fresh install: fresh install
List of activated apps:
- activity: 2.17.0
- calendar: 4.2.3
- circles: 25.0.0
- cloud_federation_api: 1.8.0
- comments: 1.15.0
- contacts: 5.1.0
- contactsinteraction: 1.6.0
- dashboard: 7.5.0
- dav: 1.24.0
- deck: 1.8.3
- federatedfilesharing: 1.15.0
- federation: 1.15.0
- files: 1.20.1
- files_pdfviewer: 2.6.0
- files_rightclick: 1.4.0
- files_sharing: 1.17.0
- files_trashbin: 1.15.0
- files_versions: 1.18.0
- firstrunwizard: 2.14.0
- groupfolders: 13.1.1
- logreader: 2.10.0
- lookup_server_connector: 1.13.0
- mail: 2.2.3
- nextcloud_announcements: 1.14.0
- notifications: 2.13.1
- oauth2: 1.13.0
- password_policy: 1.15.0
- photos: 2.0.1
- privacy: 1.9.0
- provisioning_api: 1.15.0
- recognize: 3.5.0
- recommendations: 1.4.0
- related_resources: 1.0.3
- sentry: 8.6.4
- serverinfo: 1.15.0
- settings: 1.7.0
- sharebymail: 1.15.0
- spreed: 15.0.3
- support: 1.8.0
- survey_client: 1.13.0
- systemtags: 1.15.0
- text: 3.6.0
- theming: 2.0.1
- twofactor_backupcodes: 1.14.0
- updatenotification: 1.15.0
- user_status: 1.5.0
- viewer: 1.9.0
- weather_status: 1.5.0
- workflowengine: 2.7.0
Disabled:
- admin_audit
- bruteforcesettings
- encryption
- files_external
- richdocuments: 7.1.1
- suspicious_login
- twofactor_totp
- user_ldap
The content of config/config.php:
$CONFIG = array (
'instanceid' => 'xxxxxxxxxxxxxxxxx',
'passwordsalt' => 'yyyyyyyyyyyyyyyyyy',
'secret' => 'xxxxxxxxxxxxxxxxxxxxxx',
'trusted_domains' =>
array (
0 => 'nextcloud.server.my',
),
'trusted_proxies' =>
array (
0 => '10.188.5.1',
),
'htaccess.RewriteBase' => '/',
'overwritehost' => 'nextcloud.server.my',
'overwriteprotocol' => 'https',
'datadirectory' => '/data',
'dbtype' => 'mysql',
'version' => '25.0.3.2',
'overwrite.cli.url' => 'https://nextcloud.server.my',
'dbname' => 'nextcloud',
'dbhost' => 'nextcloud-mariadb',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'xxxxxxxxxxxxxxxxxxxx',
'installed' => true,
'default_phone_region' => 'DE',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'memcache.local' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'nextcloud-redis-master',
'port' => 6379,
'password' => 'xxxxxxxxxxxxxxxxxxxx',
),
'sentry.dsn' => 'https://xxxxxxxxxxxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyy@sentry.server.my/4',
'sentry.public-dsn' => 'https://yyyyyyyyyyyyyyyy@sentry.server.my/4',
);
Client configuration
- any client any browser
Logs
Web server error log
[Sat Feb 18 22:11:29.338850 2023] [php:error] [pid 745] [client 10.42.0.10:55886] PHP Fatal error: Declaration of Psr\\Log\\AbstractLogger::emergency(Stringable|string $message, array $context = []): void must be compatible with Psr\\Log\\LoggerInterface::emergency($message, array $context = []) in /var/www/project/public/apps/sentry/vendor/psr/log/src/LoggerTrait.php on line 23
Server log (data/nextcloud.log)
{
"reqId": "iivsgGX1sn6zMSERyXXX",
"level": 3,
"time": "2023-02-18T22:00:01+00:00",
"remoteAddr": "10.42.0.10",
"user": "--",
"app": "PHP",
"method": "GET",
"url": "/cron.php",
"message": "Declaration of Psr\\Log\\AbstractLogger::emergency(Stringable|string $message, array $context = []): void must be compatible with Psr\\Log\\LoggerInterface::emergency($message, array $context = []) at /var/www/project/public/apps/sentry/vendor/psr/log/src/LoggerTrait.php#23",
"userAgent": "curl/7.74.0",
"version": "25.0.3.2",
"data": {
"app": "PHP"
}
}Browser log
Browser shows Server 500 error
st3iny, ChristophWurst and e1ke