poml88 / LibreWrist

iOS and watchOS to display glucose readings from the Freestyle Libre cloud.
MIT License
2 stars 0 forks source link

Apple Watch app won't open #4

Open julio8a opened 5 days ago

julio8a commented 5 days ago

WatchOS 11.0.1 iOS 18.0.1

Phone app works fine.

Apple Watch app doesn't open at all. When I click it, I get a brief loader with the app icon, then it just closes every time.

poml88 commented 5 days ago

Hi again, thanks for your report. I would have some questions: Did it ever work with iOS 18 / watchOS 11. Did you have some change recently, any updates of OS? Or a sensor change, so it might be confused with some data from the previous sensor? Did you try to completely remove the watchOS app from the watch? The two ways I know are either on the watch app overview view or using the „watch“ app on the phone. Ah, and: are you maybe on mmol/l? do the other apps work? LibreLinkUp, LibreWatch etc.? Is it Libre3? US version? Did you choose any particular watch face and complication?

librewrist phone and watch apps use almost the same code.

Thanks for your help!

julio8a commented 5 days ago

Did it ever work with iOS 18 / watchOS 11. I installed it very recently when I was on 18.0.1 and 11.0.1 so I can't say.

Did you have some change recently, any updates of OS? No Or a sensor change, so it might be confused with some data from the previous sensor? No

Did you try to completely remove the watchOS app from the watch? The two ways I know are either on the watch app overview view or using the „watch“ app on the phone. Okay, I tried this (uninstalled it from watch) then reinstalled. After reinstall I get the "Warning" message and description. After I click "Accept" it says "no creditials (yet)" message. After I go back to mobile app, I click connect. The credential message goes away and it says no data since 9999. After a few seconds the watch app crashes. Trying to launch it again doesn't bring anything up and just continues to crash every time I try to open it.

Ah, and: are you maybe on mmol/l? mg/dl

do the other apps work? LibreLinkUp, LibreWatch etc.? both LibreLinkUp and LibreWatch work fine

Is it Libre3? US version? Libre3, US

Did you choose any particular watch face and complication? It crashes weather it's a complication or just opening the app from home screen.

poml88 commented 5 days ago

Interesting, thanks, so the app starts, but when it receives its first data it throws exception. Question: could you possibly give me access to your follower account to test on Xcode here? You could change your password to something for a short while and then back.

or what you could do is to invite my support email address as a follower and then delete this follower account anytime.

At the moment I cannot reproduce this here. I asked a friend as well, everything fine there too.

julio8a commented 5 days ago

I can invite you to LibreLinkUp

poml88 commented 5 days ago

Ok, let's try!

julio8a commented 5 days ago

What's the best way to get your email address?

poml88 commented 5 days ago

I just tried exactly the procedure you described above .. no problem here. Is it version 1.0.9.25? You can see it after re-installation, before sending credentials on the donate view...

julio8a commented 5 days ago

I am on v1.0.8.24

I checked the app store and 1.0.8 is the latest (1 day ago).

poml88 commented 5 days ago

Oh, sorry, email is librewrist a t cmdline d o t net. It's also on the GitHub front page and in the phone app...

Oh, my bad, indeed. .8.24 is the last on the App Store.

julio8a commented 5 days ago

Sent!

poml88 commented 5 days ago

Received. Trying to connect...

poml88 commented 5 days ago

Interesting, it tells me "no data since 540 mins". Is that our time difference? 9 hours, should be. Yes, indeed. Interesting. The graph ends at 13:25, that is correct.

julio8a commented 5 days ago

I am PST 1:25pm (13:25) right now, which would be true if you are in Europe?

poml88 commented 5 days ago

Another bug: It continues to use my authtoken. I did send new credentials, but I still see my own data...

poml88 commented 5 days ago

I re-installed the watch app -- now your data. The bad news: It is working fine. :-/

poml88 commented 5 days ago

Maybe you can try my follower account. Can send you the password.

julio8a commented 5 days ago

Ah!!! Bummer! Okay, I'll do some more troubleshooting. Will try to uninstall the entire app and start all over! Will keep you posted.

julio8a commented 5 days ago

Maybe you can try my follower account. Can send you the password.

Sure, what would work best to get the password from you?

poml88 commented 5 days ago

Email? I see you have a profile on your GitHub page with a website which has contact data?

poml88 commented 5 days ago

Or even easier: Do you have a second email address? Just make yourself another follower account, that is what I just did...

julio8a commented 5 days ago

That form on my website works! :)

poml88 commented 5 days ago

Ok, it says the form was sent. I will have to go to sleep soon... Approaching 11pm...

julio8a commented 5 days ago

I got it. I'll do some testing today and will post back with any updates. Have a good night!

poml88 commented 5 days ago

Well, thanks to you: One bug fixed. I am clearing the auth_token now when new credentials are received by the watch!

poml88 commented 5 days ago

Maybe, if you would use TestFlight, I could get a crash report via TestFlight. I think TestFlight offers this. I will add the latest version to TestFlight. The link to TestFlight is on this page. But be aware: There are some bugs with Apple when switching between AppStore and TestFlight builds. Some things might be strange, like complications / widgets and would require a reboot of the device...

https://developer.apple.com/documentation/xcode/acquiring-crash-reports-and-diagnostic-logs

https://help.apple.com/xcode/mac/current/#/deve2819c518

Seem it would work even with the App Store app... You have to opt in... Then I will get a report.

julio8a commented 4 days ago

I did turn on those settings. I also downloaded one of the analytics files from yesterday. See attached (bug type 309): LibreWristWatch Watch App-2024-10-15-203654.txt

poml88 commented 4 days ago

Great, thanks! I will check it! Meanwhile I got an email from someone who has a similar problem: The iOS app is closing, just as your watch app. I wonder if in the TestFlight builds there is even more info. Would it be possible you try the testflight build? BTW Build 1.0.9.26 should be out, could you try this please as well?

julio8a commented 4 days ago

Okay, I did install the testFlight app and made sure the app and watch app were on 1.0.9.26.

The same thing happens when I open the watch app (only). It crashes after clicking connect. Not sure if there's anything else I need to do to send that crash report info or if you just see it at this point. I tried running the apple watch a few times to get a few crashes. :D

poml88 commented 4 days ago

Ok, thanks a lot. I should see the crash report in xcode now. I am not at home right now, will do it asap.

poml88 commented 4 days ago

Ok, as I thought: Normally this is an "index out of range", so if you try to read from an array a certain index and it does not exist it will throw exception. And as I thought it is in reloadLibreLinkUp. Good, now let's find where...

poml88 commented 4 days ago

Hm, it seems that let lastMeasurement = LibreLinkUpHistory.shared.libreLinkUpGlucose[0] fails, so there is no index 0.

poml88 commented 4 days ago

Strangely enough, I see 3 crash logs. But they are all from my Spanish speaking friend and all say they are from TestFlight. So, you Julio, you sent me a log as well, I did not yet figure out how to see this in Xcode.

julio8a commented 4 days ago

Is there anything I need to do in the TestFlight app to send the crash report? I didn't do anything other than open the watch app and watch it crash a few times.

poml88 commented 4 days ago

Very strange, I do not see any crash logs of the watch app. I will check that! Or google it to find out. anyway, I added a check that the index [0] really exists. There will be a new version on TestFlight soon (waiting for Apple's approval). Version 1.0.10.27. Can you please try it and tell me what you see, if you see anything? Thanks for your help!

julio8a commented 4 days ago

Sounds good, I'll keep an eye on TestFlight for .27. 🤞

poml88 commented 4 days ago

Google says it can take up to 1 day for crash logs to appear in Xcode. So maybe tomorrow. But I think it is the same issue, because phone and watch are using the same code from a shared swift file.

poml88 commented 3 days ago

Hi, the TestFlight .27 is available now. The crash should be gone. But the question is: What happens now? I do not understand why the array was empty.... And why was it not a problem when I followed your data?

julio8a commented 3 days ago

Same thing. It says no data for 999 min. After a few seconds it crashes. Trying to run the app again on the watch shows the loading icon for half a second and keeps crashing.

poml88 commented 3 days ago

It is still the watch app, right? Can you try to remove and reinstall the watch app and look on the debug info it is indeed the right version?

poml88 commented 3 days ago

In principle it makes no sense at all, because it is the same library for watch and phone. For the other bug reporter it is the phone app crashing. And in that crash report it was clearly that array. I did receive a crash report from the watch from someone now, but there is not much info in there... There must be a way to debug this, I have no idea right now...

julio8a commented 3 days ago

Yeah, it's just the watch app crashing. Everything works great on the phone app. After installing the .27 update from TestFlight I uninstalled the watch app and reinstalled it. Before I hit the connect button again on the phone app I checked the version on the watch app to make sure it was .27 and it was. Then I hit the connect button and the crashing started.

julio8a commented 3 days ago

In principle it makes no sense at all, because it is the same library for watch and phone. For the other bug reporter it is the phone app crashing. And in that crash report it was clearly that array. I did receive a crash report from the watch from someone now, but there is not much info in there... There must be a way to debug this, I have no idea right now...

So strange. I've still been using the LibeWatch on my watch, as that app sends glucose data to HealthApp, so I would primarily still use that one until LibreWrist can send glucose data to HealthApp and it works on my watch. :D

Oh my phone, I use the LibreWrist app and the widget which work great!

poml88 commented 3 days ago

Maybe your issue is a different one than I thought. But I have only one crash report yet and that one does not tell me anything. Maybe it is a certain UI setting on your watch.

julio8a commented 3 days ago

uh, not sure what I would update on my side to get this to work. I think for now I'm okay using LibreWatch on my watch and the widget/app from LibreWrist on my phone. Like I mentioned earlier, I still need to open LibreWatch on my watch to send my glucose data to Apple Health App.

Maybe as more updates come it'll magically start working without knowing why. lol

poml88 commented 3 days ago

There is no crash report yet for 1.0.10.27. Maybe it will be there tomorrow. From what I can see it is something with the UI... I'll go through the file again. I will keep an eye open. Maybe, if you can try a new TestFlight version from Time to time and I will get more crash reports I will discover what happens. Maybe also other people will report the same issue. Sorry about that. Will look into that HealthKit thing in the meantime.

julio8a commented 3 days ago

Sounds good. I'll keep using TestFlight and keep trying it as new releases come out. Hopefully, something will show up on your end at some point.

poml88 commented 3 days ago

Last questions: Did the watch app ever work, or never? Did you actually try to reboot the watch?⌚️

julio8a commented 3 days ago

The watch app has never worked since installation.

I just tried to reboot my Apple watch just now and got the same crash when launching the LibreWrist watch app.

poml88 commented 3 days ago

Ok. Your watch is in English? Any particular settings for the UI? :-)

julio8a commented 3 days ago

Yes, my watch is in English.

What settings in the UI would you be referring to? anything specific?