I encountered an error while trying to preview a PDF in Chromium. I was able to bypass the issue by checking a box in the top left corner and clicking ‘DISMISS’ twice. The PDF then displayed normally. This issue does not occur in the Snap app or the Android app. I tried a fresh install but still experienced the same issue with the latest Docker image. I think the issue appeared after a recent update, but I can’t confirm.
My installation includes a reverse proxy (NGINX Proxy Manager) and the NGINX server is connected to the proxy network. The DB, APP, and NGINX server are connected via another Docker network.
XMLHttpRequest error
main.foss.dart.js?v=5.5.67:64728 Mixed Content: The page at '<https_url>' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '<http_download_url>'. This request has been blocked; the content must be served over HTTPS.
Thanks for the prompt response! I enabled it, as it was disabled by default. The issue still persists, but now the PDF appears right away after clicking ‘DISMISS’ and checking the box icon on the top right. The error message doesn’t appear the second time. However, the product table seems to be cut in half now.
Flutter Web Bootstrap: Auto
main.foss.dart.js?v=5.5.67:50263 ## Error reporting is enabled
main.foss.dart.js?v=5.5.67:50263 POST: https://invoice.kastoreion.gr/api/v1/refresh?&first_load=true&include_static=true
main.foss.dart.js?v=5.5.67:50263 GET: http://invoice.kastoreion.gr/client/invoice/mSt6G4eccsTMRgIXIleNDRkqJGYpylsx/download?t=1675626013235&t=1675626013235
main.foss.dart.js?v=5.5.67:64728 Mixed Content: The page at 'https://invoice.kastoreion.gr/#/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://invoice.kastoreion.gr/client/invoice/mSt6G4eccsTMRgIXIleNDRkqJGYpylsx/download?t=1675626013235&t=1675626013235'. This request has been blocked; the content must be served over HTTPS.
I just encountered a 504 error and I’m not sure if it’s related. I wanted to note it down for future reference. Also, I forgot to mention that everything is being proxied through Cloudflare.
Moreover, I have just realized that I am using HTTP (80) for my nginx-server app while operating behind the proxy. I attempted to expose port 443, but I was unable to connect. Is there something I may be missing?
Thanks for your assistance. As a token of appreciation, would it be possible to send a PayPal link for the project so that I can buy you some beers?
I changed TRUSTED_PROXIES='*' to TRUSTED_PROXIES=* and then purged and rebuilt the containers. Afterwards, I ran php artisan optimize .
Output:
~ $ php artisan optimize
INFO Caching the framework bootstrap files.
config ................................................................................................................................. 27ms DONE
routes ................................................................................................................................. 86ms DONE
When I try to access invoice.kastoreion.gr I 'm getting redirected to invoice.kastorieon.gr/setup and encountering a 500 error. I rebooted the container and was able to access the site again, but the issue continues to persist.
The app works well through the snap application, except for the issue of not being able to view invoices through chromium. That’s okay for now. I will keep a watch and update this thread if I manage to resolve the issue. Thanks for taking the time to check it out.
The issue was resolve after I added security headers for NGINX Proxy Manager as per this Gist (Workaround - Security Headers @ NGINX Proxy Manager · GitHub). Although I’m not certain, it’s possible that running php artisan optimize might have also contributed to the fix.
I will continue my investigation in the coming days, but I may have limited time due to university exams. My aim is to determine the cause of the issue.
For some time I also see a “XMLHttpRequest error” when I send an invoice. I can edit invoices and see the preview of it just fine, but as soon as I click the “send email”, no matter if I use the three dot menu in the invoices overview or the send email button in the individual invoice edit page, the error appears. If I consirm, I see the email, but the PDF preview pane stays empty. I can send the email without issues anyway, the PDF gets attached to that email as expected and the customer can properly view the attachment as well as following the link in the email. It’s more a nuisance then a real issue. I do in fact have a settings → client portal URL set.