Skip to content

Conversation

@ChristophWurst
Copy link
Owner

@ChristophWurst ChristophWurst commented Jun 24, 2021

@ChristophWurst
Copy link
Owner Author

ChristophWurst commented Jun 24, 2021

For me it works, just found some unrelated bugs in server 🙈

@sunjam
Copy link

sunjam commented Jun 24, 2021 via email

@splitt3r
Copy link

Do you have a test app to generate crashes for sentry to log 😀?

@ChristophWurst
Copy link
Owner Author

Do you have a test app to generate crashes for sentry to log grinning?

occ sentry:test triggers an exception that will be reported.

FYI updated the tarball, now also js and csp reports work again.

@ChristophWurst
Copy link
Owner Author

@sunjam @splitt3r @Koleon @JakubOnderka @ATofighi @utolosa002 did you have any success? :)

@splitt3r
Copy link

splitt3r commented Jul 2, 2021

I'm running sentry as via Docker (https://develop.sentry.dev/self-hosted/) and Nextcloud (21) too. After activating your app and setting the DSN (like http://[email protected]:9000/1) via occ i get the following error:

{"reqId":"rpF9DMeT8Rk4NdoqkUkO","level":3,"time":"2021-07-02T13:03:06+00:00","remoteAddr":"172.21.0.1","user":"root@localhost","app":"index","method":"GET","url":"/apps/dashboard/","message":{"Exception":"TypeError","Message":"Return value of OCA\\Sentry\\Config::getCspReportUrl() must be of the type string, null returned","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/sentry/lib/Listener/CustomCspListener.php","line":50,"function":"getCspReportUrl","class":"OCA\\Sentry\\Config","type":"->","args":[]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":76,"function":"handle","class":"OCA\\Sentry\\Listener\\CustomCspListener","type":"->","args":[{"__class__":"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"}]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[{"__class__":"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"},"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent",{"__class__":"Symfony\\Component\\EventDispatcher\\EventDispatcher"}]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[{"__class__":"Closure"},{"__class__":"Closure"}],"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent",{"__class__":"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"}]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"},"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\Security\\CSP\\AddContentSecurityPolicyEvent",{"__class__":"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"}]},{"file":"/var/www/html/lib/private/Security/CSP/ContentSecurityPolicyManager.php","line":61,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCP\\Security\\CSP\\AddContentSecurityPolicyEvent"}]},{"file":"/var/www/html/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php","line":72,"function":"getDefaultPolicy","class":"OC\\Security\\CSP\\ContentSecurityPolicyManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":144,"function":"afterController","class":"OC\\AppFramework\\Middleware\\Security\\CSPMiddleware","type":"->","args":[{"__class__":"OCA\\Dashboard\\Controller\\DashboardController"},"index",{"__class__":"OCP\\AppFramework\\Http\\TemplateResponse"}]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":165,"function":"afterController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->","args":[{"__class__":"OCA\\Dashboard\\Controller\\DashboardController"},"index",{"__class__":"OCP\\AppFramework\\Http\\TemplateResponse"}]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Dashboard\\Controller\\DashboardController"},"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Dashboard\\Controller\\DashboardController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"dashboard.dashboard.index"}]},{"file":"/var/www/html/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/dashboard/"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/sentry/lib/Config.php","Line":63,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0","version":"21.0.2.1"}

Am i missing sth.? Am not that fit with Nextcloud anymore 😁

@ChristophWurst
Copy link
Owner Author

Config::getCspReportUrl() must be of the type string, null returned

My bad. The CSP reporting is optional.

@ChristophWurst
Copy link
Owner Author

Could you apply 1214d9c manually and test again? Thanks ✌️

@splitt3r
Copy link

splitt3r commented Jul 2, 2021

Now everything looks fine 👍🏻 nice work

@ChristophWurst ChristophWurst force-pushed the enhancement/nextcloud22-php8 branch from 1214d9c to 5e8afa2 Compare July 2, 2021 13:41
@ChristophWurst ChristophWurst merged commit b9b3974 into master Jul 2, 2021
@ChristophWurst ChristophWurst deleted the enhancement/nextcloud22-php8 branch July 2, 2021 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHP 8 Support Nextcloud 21

4 participants