Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Snappymail in Nextcloud from 2.20.0 to 2.20.1 or 2.20.2 causes "Internal Server Error" page #634

Closed
jimbolaya opened this issue Nov 6, 2022 · 4 comments
Labels
bug Something isn't working Nextcloud

Comments

@jimbolaya
Copy link

Describe the bug
After upgrading Snappymail in Nextcloud, I get an "Internal Server Error" page

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade Snappymail in Nextcloud from 2.20.0 to 2.20.1 or 2.20.2
  2. Open Snappymail in the Nextcloud interface and get an "Internal Server Error" page
  3. Reverting to 2.20.0 allows Snappymail to work.

Expected behavior
I did not expect to see an "Internal Server Error" page on Nextcloud

Please complete the following information:

  • Browser: Firefox firefox-esr 102.4.0esr-1~deb11u1
  • IMAP daemon: dovecot
  • PHP version: 7.4
  • SnappyMail Version: 2.20 (0,1,2)
  • Nextcloud Version: Nextcloud Hub II / 23.0.11
  • Web Server Version: apache2 2.4.54-1~deb11u1

Debug/logging information
{"reqId":"Y2e1NZqCrTn3PLLx1YN95AAAAAk","level":3,"time":"2022-11-06T13:23:01+00:00","remoteAddr":"10.20.30.40","user":"user","app":"index","method":"GET","url":"/index.php/apps/snappymail/","message":"Call to undefined method OCP\\AppFramework\\Http\\ContentSecurityPolicy::useStrictDynamic() in file '/var/www/nextcloud/apps/snappymail/lib/Controller/PageController.php' line 87","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0","version":"23.0.11.1","exception":{"Exception":"Exception","Message":"Call to undefined method OCP\\AppFramework\\Http\\ContentSecurityPolicy::useStrictDynamic() in file '/var/www/nextcloud/apps/snappymail/lib/Controller/PageController.php' line 87","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1015,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":158,"Previous":{"Exception":"Error","Message":"Call to undefined method OCP\\AppFramework\\Http\\ContentSecurityPolicy::useStrictDynamic()","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\SnappyMail\\Controller\\PageController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1015,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/snappymail/lib/Controller/PageController.php","Line":87},"CustomMessage":"--"}}

I can also try to add Snappymail logs, but I'm pretty sure this is an issue with the Nextcloud App.

Additional context
Rolling back to 2.20.0 allows it to work:

  • Go to the Apps page, Disable, then Remove Snappymail
  • Go to the nextcloud/apps directory and unpack snappymail-2.20.0-nextcloud.tar.gz
  • chown -R www-user:www-user snappymail
  • Go back to the Admin interface and Enable Snappymail
  • Reload any Snappymail pages in Nextcloud
@jimbolaya
Copy link
Author

jimbolaya commented Nov 6, 2022

I applied the fix noted. While I no longer get a "Internal Server Error" page, SnappyMail just spins and doesn't show the interface
Screenshot at 2022-11-06 09-07-11

@the-djmaze
Copy link
Owner

Check browser developer window and see the errors there.
Then tell us what they are

@jimbolaya
Copy link
Author

In the Console there are some CSP errors:

Content Security Policy: The page’s settings blocked the loading of a resource at https://myserver.org/index.php/apps/snappymail/?/AppData/0/8793419088302674/ (“script-src”). snappymail:1075:428
Uncaught (in promise) Error: Failed loading ./?/AppData/0/8793419088302674/
    onerror https://myserver.org/index.php/apps/snappymail/:1075
    i https://myserver.org/index.php/apps/snappymail/:1075
    i https://myserver.org/index.php/apps/snappymail/:1075
    <anonymous> https://myserver.org/index.php/apps/snappymail/:1075
    <anonymous> https://myserver.org/index.php/apps/snappymail/:1075
snappymail:1075:382
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).


@the-djmaze the-djmaze added bug Something isn't working Nextcloud labels Nov 7, 2022
@the-djmaze
Copy link
Owner

Released v2.20.4 to workaround this Nextcloud bug #35013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Nextcloud
Projects
None yet
Development

No branches or pull requests

2 participants