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

Failed loading /apps/snappymail/app/snappymail/v/2.25.1/static/js/min/libs.min.js #895

Closed
the-djmaze opened this issue Jan 31, 2023 · 10 comments

Comments

@the-djmaze
Copy link
Owner

the-djmaze commented Jan 31, 2023

Actually, I just updated to 2.25.1 and it broke my install with the message:
An error occurred.
Please refresh the page and try again.Failed loading /cloud/apps/snappymail/app/snappymail/v/2.25.1/static/js/min/libs.min.js

EDIT:
Looking at the console in firefox I get this error (not sure is related)
Uncaught (in promise) Failed loading /cloud/apps/snappymail/app/snappymail/v/2.25.1/static/js/min/libs.min.js snappymail:241:1316 initData https://<my_server>/cloud/index.php/apps/snappymail/:241 (Async: promise callback) initData https://<my_server>/cloud/index.php/apps/snappymail/:241 <anonymous> https://<my_server>/cloud/index.php/apps/snappymail/?/AppData/0/8184568074615539/:1

art

Originally posted by @art2crazy in #890 (comment)

@the-djmaze
Copy link
Owner Author

Does it work when you delete /cloud/apps/snappymail/app/snappymail/v/2.25.1/static/.htaccess?

@the-djmaze the-djmaze changed the title Actually, I just updated to 2.25.1 and it broke my install with the message: Failed loading /cloud/apps/snappymail/app/snappymail/v/2.25.1/static/js/min/libs.min.js Jan 31, 2023
@the-djmaze the-djmaze changed the title Failed loading /cloud/apps/snappymail/app/snappymail/v/2.25.1/static/js/min/libs.min.js Failed loading /apps/snappymail/app/snappymail/v/2.25.1/static/js/min/libs.min.js Jan 31, 2023
@art2crazy
Copy link

Here is what I did:

  • I moved the 2.25.1 snappymail folder (form nextcloud/apps) and replaced it with 2.25.0 - as expected, it worked
  • after your reply, I moved the 25.0 folder and moved the 25.1 backup folder back into place, renamed the file to .htaccess.bak, restarted apache, NX detected new version and it went through update process - it worked, no error

But, then, just to check, I renamed the bak file back to .htaccess and restarted apache - it worked again, so at this point I'm not sure what caused the error from my original post.
If you think there is no bug, please feel free to close this issue.

Thanks for your help
art

@the-djmaze
Copy link
Owner Author

There are more reports of this issue and it is not Nextcloud related.

However, as i can't reproduce the issue with my Apache and nobody else found out why this happens on their Apache, the only thing i can do is to say "restart server" and close the issues 😫

@dbiczo
Copy link

dbiczo commented Feb 1, 2023

I have the same problem with the App in NextCloud running in apache under an alias in a virtual host.
It seems the file paths generated by the rewrite rules for britli and gzip in .htaccess are not found in this setup.

I modified the .../apps/snappymail/app/snappymail/v/2.25.1/static/.htaccess file changing all occurrences of "%{REQUEST_FILENAME}" to "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" and the compressed files are served as expected.

Caching of the files while trouble shooting also confuses the issue. I hope this helps.

@the-djmaze
Copy link
Owner Author

I modified the .../apps/snappymail/app/snappymail/v/2.25.1/static/.htaccess file changing all occurrences of "%{REQUEST_FILENAME}" to "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" and the compressed files are served as expected.

Are you sure?
When i do that i get dynamically gzip compressed files (Apache does the compression on the fly).
Else i get br compressed content.

@dbiczo
Copy link

dbiczo commented Feb 1, 2023

Yes, it does look like I only receive a gzip version. I can't tell if it the static file or dynamic,

@the-djmaze
Copy link
Owner Author

For now i will disable the whole .htaccess file in Nextcloud

@dbiczo
Copy link

dbiczo commented Feb 1, 2023

Indeed removing the .htaccess file still gives a gziped file, which must be dynamic, and solves the problem for now. Thanks for looking into the issue.

@art2crazy
Copy link

Caching of the files while trouble shooting also confuses the issue. I hope this helps.

Very true, the problem came back for me as well, removing the file helped.

@dbiczo
Copy link

dbiczo commented Feb 1, 2023

I have had another crack at trying to fix the .htaccess file to deliver the compressed static files.
I changed all occurrences of "$1" to "%{REQUEST_URI}" in .../apps/snappymail/app/snappymail/v/2.25.1/static/.htaccess and confirmed that the response headers for libs.min.js had "Content-Encoding: br"

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

No branches or pull requests

3 participants