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

Snappypage javascript issue #1540

Closed
mmallejac opened this issue Apr 8, 2024 · 14 comments
Closed

Snappypage javascript issue #1540

mmallejac opened this issue Apr 8, 2024 · 14 comments

Comments

@mmallejac
Copy link

mmallejac commented Apr 8, 2024

Hello !

Since this morning, one of our server is having a weird Snappy issue. At load time, it keeps spinning there:

pbSnappy

for all users, whatever browser (FireFox, Brave or Chrome).

I can't see any reason to that:

  • yesterday it has been reported to be working
  • no update since (neither Snappy, Nextcloud, not even on the host server)
  • just the usual daily docker compose stop / start this morning

It looks like a client-side issue, since the browser asks to stop the running script. The browser console shows that:

image

Only the "Script terminated by timeout" line appears after a while, the lines before appear quite immediately while loading the Snappy page.

Versions in use:

  • Snappy 2.36.0
  • Nextcloud 28.0.3

All other servers we manage are still Nextcloud 27.1, except one which is 28.0.4, all are Snappy 2.36.0
So I will upgrade Nextcloud to 28.0.4 at lunch time, just in case.

@mmallejac
Copy link
Author

Unfortunately, no change after Nextcloud upgrade to Nextcloud 28.0.4 :-\

@the-djmaze
Copy link
Owner

the-djmaze commented Apr 8, 2024

Can you enable the javascript debug mode?
That would make it easier to find the problem.
https://github.com/the-djmaze/snappymail/wiki/FAQ#how-do-i-enable-logging

@mmallejac
Copy link
Author

mmallejac commented Apr 8, 2024 via email

@the-djmaze
Copy link
Owner

When you enable javascript debug mode in SnappyMail, the code is not minified 😉

@mmallejac
Copy link
Author

mmallejac commented Apr 8, 2024 via email

@the-djmaze
Copy link
Owner

It's in the wiki (i've linked above where to edit application.ini)

Anyway the code hangs here:

computedPaginatorHelper = (koCurrentPage, koPageCount) => {

computedPaginatorHelper is used with the messagelist pageCount, something goes wrong with that network request

@mmallejac
Copy link
Author

mmallejac commented Apr 8, 2024 via email

@the-djmaze
Copy link
Owner

Yes, you should debug javascript and the MessageList request using the browser developer tools.

@mmallejac
Copy link
Author

Not sure if it is pertinent:

image

That is whithin the computedPaginatorHelper function
Firefox has shown this when it has proposed me to stop and debug
I've stepped 3 or 4 lines until I've made this screenshot

Ok, I've made a video:
https://www.awesomescreenshot.com/video/26537031?key=efa44c6f97e3eeda39df3fa1eafa846c

@the-djmaze
Copy link
Owner

Infinity doesn't seem right.
Somehow SnappyMail receives the wrong number.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity

So it could be that the MessagesPerPage is 0

the-djmaze pushed a commit that referenced this issue Apr 8, 2024
@mmallejac
Copy link
Author

Infinity is a weird thing for a computer (and fora human too !)
Is MessagesPerPage somewhere in the config ?

@the-djmaze
Copy link
Owner

Infinity is a weird thing for a computer (and fora human too !)

But not for Buzz https://www.youtube.com/watch?v=0aG9wChNX_k&start=23

Is MessagesPerPage somewhere in the config ?

Yes, but you can use
https://github.com/the-djmaze/snappymail/blob/master/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php

@mmallejac
Copy link
Author

mmallejac commented Apr 8, 2024

Holy sh.t !
Actually the application.ini file is totally messed up
I do not have a clue why, but yes the messages_per_page and many may other settings are set to 0
I will recover from backup but I need more importantly to understand why this has happened

So, really sorry about this (I've learned a lot, but wasted quite of your time !)

@the-djmaze
Copy link
Owner

the-djmaze commented Apr 8, 2024

So, really sorry about this (I've learned a lot, but wasted quite of your time !)

Not really wasted, as we now hardened SnappyMail a bit more so that Buzz Lightyear can't go Infinity and beyond 😉

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

2 participants