Some Mastodon users getting a blank screen
-
I'm using Cloudron to manage a Mastodon instance in a course with 260 students. Most of them are logging in without issue, but some are reporting that they are getting a blank white screen when they attempt to log in using their Cloudron credentials.
- I saw a student do this on Safari, as well as on a mobile iPhone app.
- I saw a screenshot of a student who got a 422 error from logging in on Chrome.
Does anyone have any experience with this? Or any guesses about why it might be occurring for some users and not others?
Thanks very much for considering.
-
@ntnsndr Do you see any errors in mastodon logs? And are these constantly reproducible for the students (or does a relogin make things work) ? Another idea is to see if they see any errors in the browser console (though I understand if this can be hard to capture on mobile browser).
-
@girish Good questions, thanks!
- The error is strange. Some students are getting this error exclusively, on various browsers, and some aren't getting it at all. So it seems like it might be tied to login credentials somehow.
- The Event Log in Mastodon is showing students who are getting this error as logging in. So no help there. But I can send you the Mastodon logs if you like; I don't see anything there that seems helpful.
Good point about the browser console. I can try to get a student who is having this problem to help me with that.
-
@girish Update: I was just able to impersonate one of the users having this problem. When I tried to log in on Mastodon, I also got a blank white screen.
In the browser (Linux Firefox), there are no errors in the Console. Here are the only log entries that came up around this time:
Jan 18 14:43:09 15:M 18 Jan 2022 21:43:09.128 * Background saving terminated with success Jan 18 14:46:50 172.18.0.1 - - [18/Jan/2022:21:46:50 +0000] "GET /about HTTP/1.1" 301 5 "-" "Mozilla (CloudronHealth)" Jan 18 14:47:00 172.18.0.1 - - [18/Jan/2022:21:47:00 +0000] "GET /about HTTP/1.1" 301 5 "-" "Mozilla (CloudronHealth)" Jan 18 14:47:07 [e71d8c61-e3b5-4d23-bedb-8c847ec483b2] method=GET path=/api/v1/trends format=html controller=Api::V1::TrendsController action=index status=200 duration=3.13 view=0.38 db=0.41
View Source returns an empty document.
-
@girish Just tried again and got these logs:
Jan 18 14:51:50 172.18.0.1 - - [18/Jan/2022:21:51:50 +0000] "GET /about HTTP/1.1" 301 5 "-" "Mozilla (CloudronHealth)" Jan 18 14:51:53 172.18.0.1 - - [18/Jan/2022:21:51:53 +0000] "GET /packs/js/public-197b4c6c11335d189f0d.chunk.js.map HTTP/1.1" 200 47869 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" Jan 18 14:51:53 172.18.0.1 - - [18/Jan/2022:21:51:53 +0000] "GET /packs/js/locale_en-b2cbaebad015671e1ba8.chunk.js.map HTTP/1.1" 200 556 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" Jan 18 14:51:53 172.18.0.1 - - [18/Jan/2022:21:51:53 +0000] "GET /packs/js/common-3869dfcbde1ff39e38cf.js.map HTTP/1.1" 200 3657773 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" Jan 18 14:51:53 172.18.0.1 - - [18/Jan/2022:21:51:53 +0000] "GET /packs/css/default-4fb6b0ab.chunk.css.map HTTP/1.1" 200 736008 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" Jan 18 14:51:55 [f0cfd5d6-782a-40ba-8fa3-9fd4e28e3e80] method=POST path=/auth/sign_in format=html controller=Auth::SessionsController action=create status=422 error='ActiveRecord::RecordInvalid: Validation failed: Username must contain only letters, numbers and underscores' duration=66.27 view=0.00 db=1.48 Jan 18 14:51:55 [f0cfd5d6-782a-40ba-8fa3-9fd4e28e3e80] Jan 18 14:51:55 [f0cfd5d6-782a-40ba-8fa3-9fd4e28e3e80] ActiveRecord::RecordInvalid (Validation failed: Username must contain only letters, numbers and underscores): Jan 18 14:51:55 [f0cfd5d6-782a-40ba-8fa3-9fd4e28e3e80] Jan 18 14:51:55 [f0cfd5d6-782a-40ba-8fa3-9fd4e28e3e80] app/models/concerns/ldap_authenticable.rb:29:in `ldap_get_user' Jan 18 14:51:55 [f0cfd5d6-782a-40ba-8fa3-9fd4e28e3e80] app/models/concerns/ldap_authenticable.rb:12:in `authenticate_with_ldap' Jan 18 14:51:55 [f0cfd5d6-782a-40ba-8fa3-9fd4e28e3e80] app/controllers/auth/sessions_controller.rb:66:in `find_user_from_params' Jan 18 14:51:55 [f0cfd5d6-782a-40ba-8fa3-9fd4e28e3e80] app/controllers/auth/sessions_controller.rb:59:in `find_user' Jan 18 14:51:55 [f0cfd5d6-782a-40ba-8fa3-9fd4e28e3e80] app/controllers/concerns/sign_in_token_authentication_concern.rb:11:in `sign_in_token_required?' Jan 18 14:51:55 172.18.0.1 - - [18/Jan/2022:21:51:55 +0000] "POST /auth/sign_in HTTP/1.1" 422 0 "https://ism.mediastudies.social/auth/sign_in" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" Jan 18 14:51:56 172.18.0.1 - - [18/Jan/2022:21:51:56 +0000] "GET /sw.js HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" Jan 18 14:51:58 verb Subscribe timeline:access_token:74 Jan 18 14:51:59 verb d5fcdc17-4215-46df-8a26-e9c20735496e Starting stream from timeline:107616470286852558 for 107616470286852558 Jan 18 14:51:59 verb Subscribe timeline:107616470286852558 Jan 18 14:51:59 verb d5fcdc17-4215-46df-8a26-e9c20735496e Starting stream from timeline:public:local for 107616470286852558 Jan 18 14:51:59 [39ce2b48-7679-4a4a-a29b-7a70a3b4201c] method=GET path=/api/v1/timelines/home format=html controller=Api::V1::Timelines::HomeController action=show status=200 duration=4.32 view=0.34 db=0.46
This makes it look like the error might arise from the use of a dash in the username. I guess Mastodon does not know how to handle the issue; since Cloudron handles the username creation, and doesn't catch that problem, it passes the problem to Mastodon. Perhaps Cloudron should automatically cleanse usernames for Mastodon, but that would require informing users so they follow that convention.
-
@ntnsndr great catch. Indeed, this is already reported upstream - https://github.com/mastodon/mastodon/issues/12020 . I will put a note in our docs about this restriction, not sure what else we can do on Cloudron side (I guess we can do some automatic translation, but doing this for a single app seems unnecessary. FWIW, many other apps have random other restrictions. For example, gogs won't allow "push" , "pull" as usernames. It's hard to know all these rules and implement them, given they can change in apps from version to version as well.