-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Latest beta mobile app doesn't send the Bearer token for external accounts #7922
Comments
@sdomi We were unable to reproduce this internally. Is there any other information that you can help share (e.g. app/server logs or other info)? |
@amyblais thanks for the quick response! for now I've only gathered some data from
|
@larkox QA was unable to reproduce this, but I'm adding you here in case you're familiar with these errors. |
@sdomi There might be some clues in the server logs. Can you enable the debug server logs and see what happens with those requests? It may be also useful checking the app logs (Profile -> Settings -> Report a problem). There may be other errors, but let me know if you see any there about the loading of images. |
@sdomi Also, what device are you on? We've tested this on Samsung S22 (Android 14) and Pixel 5a. |
I'm on Pixel 7 Pro, latest GrapheneOS. this shouldn't affect the app tho. I will provide more debug info later today - sorry for the belated response, lots of things happening the past few days. |
okay, managed to look through it:
The codepath I found is roughtly:
My working theory is that a redirect to the browser wasn't intended, and instead it all should take place inside of the app? Either that, or something later was meant to save those cookies into the cookiejar and didn't. I've got HARs dumped, but after comparing them request by request, they're exactly the same outside of the middle part of the auth flow. Redacting them would be kind of a pain to do, so I decided not to bother (sorry!). "good" flow through the app: server returns broken flow with GitLab: this request is still in the browser; the next one from the app goes to |
@sdomi Were you able to check also the server logs? Maybe the body of the unauthorized response has also the real reason, but the one in the server logs should be more clear. |
@larkox the server response is as follows:
this is, again, caused by neither the BEARER token nor the cookie being attached to the request. (slightly redacted) server logs attached below |
@sdomi looking a bit more into the code, I see that some logs get sanitized when the instance is not in developer mode, in particular the "detail_error" field you see there. Not sure if it is an option to enable developer mode in your instance to get the logs. I could understand it is not possible, so let me know either way. |
@larkox i can set up a separate developer instance for repro purposes later. Don't want to mess around with this one too much as it's mission-critical for me and my friends :) will get back to you on that sometime soon |
@sdomi Thank you so much for helping into troubleshooting this bug! |
I encountered the same issue. The problem is that if getDeviceToken fails, there is no request to This bro figured out the problem: |
Summary
If the user logs in through SSO (GitLab), certain requests are not authenticated properly against the API.
. This is only true for requests for files or images - sending and receiving messages works.
This only happens on Android + External Login. If user logs in on Android through the internal login, images load just fine.
Environment Information
Steps to reproduce
Expected behavior
The timeline shows up fully.
Observed behavior (that appears unintentional)
Messages can be seen, but no images load. If requests are intercepted, they lack the Authorization header.
Possible fixes
n/a
The text was updated successfully, but these errors were encountered: