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

Missing User or Token #532

Open
JulesJulws opened this issue Apr 7, 2023 · 13 comments
Open

Missing User or Token #532

JulesJulws opened this issue Apr 7, 2023 · 13 comments

Comments

@JulesJulws
Copy link

Hi,

many thanks for this great invention. But for a few weeks now, I am not able to connect my sensor. It always shows the error message missing user or token.
Libre 3 and Libre Link works properly and the correct Libre Link credentials are entered in GD.
Could you please help? I really want to use GD again!
Many thanks!

@daringlyorganic
Copy link

Same issue for me also.

@DAcodedBEAT
Copy link

Is this still an issue? Building from source seemed to work for me

@JulesJulws
Copy link
Author

JulesJulws commented Jul 19, 2023 via email

@JulesJulws
Copy link
Author

JulesJulws commented Jul 19, 2023 via email

@DAcodedBEAT
Copy link

DAcodedBEAT commented Jul 19, 2023

@JulesJulws I don't think your error message was sent correctly. Can you send your message on Github?

@JulesJulws
Copy link
Author

It seems I need an invitation?

IMG_2084

@DAcodedBEAT
Copy link

@JulesJulws The version on TestFlight is outdated so even if a TestFlight invite was open, the code would be outdated and would not be able to get the data from Libre Link Up (which has your Libre 3 data).

In order to get this app working, I had to update the code to make the application buildable in Xcode (#564), build the code manually on my machine, and scan the sensor to login.

If @creepymonster can make a new release and push it to TestFlight, you can try to use that (assuming TestFlight invites become available) but he seems to be inactive on GitHub.

@zestysoft
Copy link

@DAcodedBEAT I'm running into this issue too. It happened after swapping out my sensor for a new one. I was on holiday and couldn't swap out the sensor for two+ days if that matters? Everything was working before I left -- I had recompiled and installed the app after updating to ios 17.

Just today, I deleted the app from the phone, did a git pull and re-built the app, and re-inputted the librelink creds (I use a password manager for this, so i know that hasn't changed) but after scanning the sensor, still receive the same "Missing user or token" error.

Previous to this, I went into "Manage Connections" in LibreLinkUp, removed myself, and then re-added in case there was some kind of stale token thing going on.

The Libre 3 app and LibreLinkUp apps show current data from the sensor.

Details:
iPhone 14 Pro Max running ios 17.0.3
LibreLinkUp 4.8.0.10

@zestysoft
Copy link

zestysoft commented Oct 7, 2023

Okay, I've stepped through the code a bit -- here's an example of the tou request response decode. I've truncated the token:
[GlucoseDirectApp/LibreLinkUpConnection.swift:310][tou(apiRegion:authToken:)][isMT: false] LibreLinkUp tou, response: Optional("{\"status\":4,\"data\":{\"step\":{\"type\":\"pp\",\"componentName\":\"AcceptDocument\",\"props\":{\"reaccept\":true,\"titleKey\":\"Common.privacyPolicy\",\"type\":\"pp\"}},\"user\":{\"accountType\":\"pat\",\"country\":\"US\",\"uiLanguage\":\"en-US\"},\"authTicket\":{\"token\":\"eyJhbGciO\",\"expires\":1696702627,\"duration\":3600000}}}\n")

So I guess it's not returning the user object in the way GD expects?

Ahh, here's where things break I think since it's not returning an id:
guard let userID = loginResponse.data?.user?.id

@DAcodedBEAT
Copy link

Okay, I've stepped through the code a bit -- here's an example of the tou request response decode. I've truncated the token: [GlucoseDirectApp/LibreLinkUpConnection.swift:310][tou(apiRegion:authToken:)][isMT: false] LibreLinkUp tou, response: Optional("{\"status\":4,\"data\":{\"step\":{\"type\":\"pp\",\"componentName\":\"AcceptDocument\",\"props\":{\"reaccept\":true,\"titleKey\":\"Common.privacyPolicy\",\"type\":\"pp\"}},\"user\":{\"accountType\":\"pat\",\"country\":\"US\",\"uiLanguage\":\"en-US\"},\"authTicket\":{\"token\":\"eyJhbGciO\",\"expires\":1696702627,\"duration\":3600000}}}\n")

So I guess it's not returning the user object in the way GD expects?

Ahh, here's where things break I think since it's not returning an id: guard let userID = loginResponse.data?.user?.id

@zestysoft Did get this sorted out? My confusion is that "status":4 is believed to be the state when the tou isn't accepted and you seem to be getting this response after attempting to accept the tou

@zestysoft
Copy link

@DAcodedBEAT Unfortunately no. From what I can see, it connects to the authentication server, gets a redirect, connects to that, gets a 200 with some details, and then reconnects a third time using those details which also returns a 200 with an object like you see above.

If I enter in the wrong password, I get an entirely different result, so I'm pretty certain my credentials are correct, or correct enough to auth into librelinkup.

I just checked my nightscout instance and it looks like librelinkup is returning similar status 4 info to that too. I'm going to delete that librelinkup account through their app and just re-do this whole thing.

@zestysoft
Copy link

Okay, deleted the account through their app (again, I was receiving up to date info in that app). I had to enter in the password to nuke the account so I know the creds were valid.

After recreating, everything is working again. I wonder if I should have logged out in the librelinkup app and re-authed -- I've ran into similar token issues that required using a web browser to log in and accept updated EULAs -- maybe it would have prompted me for something like that.

@DiLoT2D
Copy link

DiLoT2D commented Apr 10, 2024

Just ran into this issue.

  • locked out of librewiew
  • In GlucoseDirekt took out my account data
  • Switched to Transmitter „Bubble“
  • Closed both apps
  • Reopened libreview
  • Entered account Data with wrong Token
  • Entered account Data with correct Token. Made sure Graph is shown in librewiew
  • GlucoseDirect: switched to „Ohne Transmitter“
  • Scaned FL3
  • Entered libreview account Data without Token
  • Entered Token

Works now again

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

5 participants