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

Server Error in a invite link on some mobile phones #250

Closed
OliverViking opened this issue Jan 24, 2020 · 3 comments
Closed

Server Error in a invite link on some mobile phones #250

OliverViking opened this issue Jan 24, 2020 · 3 comments
Labels

Comments

@OliverViking
Copy link

@OliverViking OliverViking commented Jan 24, 2020

Describe the bug

I have a invite link with infinite uses and a expiry date of 1 day (url: invite/fFdblk). When opening it up on my iOS phone I get the "Server error" page, and the error:

{
  "code":500,
  "error_msg": "This is an unhelpful error message for a miscellaneous internal error."
}

I've tried multiple different mobile browsers on iOS, none of them work. I also have a report from one of our users saying they have the same issue on their Android phone with the Chrome browser.

Server logs:

Jan 24 16:16:45 MSCChat writefreely[2628]: ERROR: 2020/01/24 16:16:45 database.go:2278: Failed selecting invite: Error 1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
Jan 24 16:16:45 MSCChat writefreely[2628]: ERROR: 2020/01/24 16:16:45 handle.go:508: [Web handler] 500: Error 1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
Jan 24 16:16:45 MSCChat writefreely[2628]: 2020/01/24 16:16:45 Web internal error render
Jan 24 16:16:45 MSCChat writefreely[2628]: 2020/01/24 16:16:45 "GET /invite/fFdblk%!F(MISSING)0%!F(MISSING)%82" 500 2.979818ms "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Mobile/15E148 Safari/605.1.15"
Jan 24 16:16:45 MSCChat writefreely[2628]: 2020/01/24 16:16:45 http: multiple response.WriteHeader calls

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Generate a invite link
  2. Open up the invite link on a mobile phone

Expected behavior

Should allow the user to sign up using the invite link

Application configuration

  • Single mode or Multi-user mode?: Multi-user mode
  • Database?: mysql
  • Open registration?: no
  • Federation enabled?: yes

Version or last commit: v0.11.2

@thebaer
Copy link
Member

@thebaer thebaer commented Jan 24, 2020

Hey, thanks for the report! Based on the logs, it looks like you're actually requesting the page with a few extra characters on the end of your URL, shown here:

"GET /invite/fFdblk%!F(MISSING)0%!F(MISSING)%82"

The %!F(MISSING) is caused by Go -- you're probably requesting /invite/fFdblk%0%82 or something like that.

We can improve this to not fail so poorly in WriteFreely. But for now, I'd double-check your URLs and see if that works.

@thebaer thebaer added the enhancement label Jan 24, 2020
@OliverViking
Copy link
Author

@OliverViking OliverViking commented Jan 24, 2020

Thanks for the quick response!
You're right! It seems like Rocket.Chat's mobile app was including a 😄 emoji in the url when tapping it. (Even though there was a space between the emoji and the url)

Seems like this is more of an issue with their app then.

Would probably still be good to provide a better error message or something.

@thebaer
Copy link
Member

@thebaer thebaer commented Jan 24, 2020

Got it! Great to know :)

Yeah, I'll leave this issue open so we can fix the error state.

Thanks again for the report and fix confirmation.

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

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.