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

attachments and images not loading after update to 1.8.103 #3453

Closed
Io-Qo opened this issue Oct 12, 2023 · 8 comments
Closed

attachments and images not loading after update to 1.8.103 #3453

Io-Qo opened this issue Oct 12, 2023 · 8 comments

Comments

@Io-Qo
Copy link

Io-Qo commented Oct 12, 2023

Hey,
after updating yesterday (using git pull) to the latest version every request for attachments or image files results in an http 500 error.
PHP version: PHP 8.2.11
FreeScout version: 1.8.103

What I see in /var/log/apache/access.log
[12/Oct/2023:10:15:01 +0000] "GET /storage/mailboxes/871b1aec.png HTTP/1.1" 500 5149 "https://mail.x.x/mailbox/10/162" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"

The actual files do exists, permissions seem to be fine as well, I ran "chown -R www-data:www-data /var/www/html" as well to debug.
The laravel.log is clean, so is the apache error.log. I use cloudflare but have purged cache and disabled it completely, didn't help.

I have no idea whats wrong, any tips how to debug this?

@freescout-helpdesk
Copy link
Contributor

#3428

#3450

@Io-Qo
Copy link
Author

Io-Qo commented Oct 12, 2023

Awesome, I wasn't aware headers had to be enabled, that fixed it. Thanks for the rapid help!

@nooblag
Copy link

nooblag commented Oct 13, 2023

Hi there, I have a similar problem, which may or may not be connected to the update (because unsure if it was happening before), I cannot upload images to a conversation, Freescout says "Error occurred. Please try again later." Browser console says the HTTP response is "413 Request Entity Too Large."

I've updated the nginx conf as here, and restarted, but issue still appears.

System is:

  • Ubuntu 22.04.3 LTS
  • Nginx: 1.18.0
  • PHP 8.2.10
  • MariaDB 15.1

I have large settings in php.ini for use with Nextcloud on the same system:

max_execution_time = 3600
max_input_time = 3600
post_max_size = 16G
upload_max_filesize = 16G
max_file_uploads = 512

Any ideas?

I also have the Block External Images module installed, if that's a consideration, but temporarily disabling it did not make any difference.

@freescout-helpdesk
Copy link
Contributor

It's not related to the current issue. See https://github.com/freescout-helpdesk/freescout/wiki/Installation-Guide#-error-when-uploading-attachments-client-intended-to-send-too-large-body

@nooblag
Copy link

nooblag commented Oct 13, 2023

Ah, yes. Thank you. client_max_body_size 20M; needed to be added to the Freescout nginx conf. Perhaps you could consider adding that to the default config in your docs?

Thank you!

@freescout-helpdesk
Copy link
Contributor

Yes, added.

@Io-Qo
Copy link
Author

Io-Qo commented Oct 25, 2023

I still get this error in the browser console when trying to load external images:

Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'nonce-xxx'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.

How can I fix that? I'm still on 1.8.103

@freescout-helpdesk
Copy link
Contributor

The error is not related to external images. Create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants