AsteroidOS / AsteroidOSSync

Android application to synchronize a phone with a watch running asteroid-btsyncd.
GNU General Public License v3.0
101 stars 37 forks source link

Android 14 - Connection drops / app stops working #213

Open Kahros opened 9 months ago

Kahros commented 9 months ago

Device: Samsung S23 Ultra OS: Android 14 Version of app: 0.29 Watch: Catfish

I am able to get this software installed, permissions set, connected to my watch, and functional but after a period of time, app features stop working. For me to resolve this, I force-close the app and reopen it.

Possibly related, gadgetbridge has a similar issue, except if I change any settings within the app, I need to force-close it for it to send notifications to the watch - gadgetbridge works consistently there after provided I don't mess with anything.

I saw that back in April, there was a fox for Bluetooth buffer overflow causing issues. Maybe this is a similar problem?

I'm unaware how to pull logs. If anyone can direct me as how how, I'll include them.

librarydemise457892 commented 3 months ago

Hi,

Apologies for the delay I meant to upload my experience with this issue awhile ago but I've been pressed for time. I am experiencing the same issue.

Device: Pixel 6 OS: Latest Graphene OS (Android 14) Version of app: Latest from F droid (0.29) and every other build that is runnable on A14, including the previous debug builds Watch: Catfish

At first I thought it was to do with the Bluetooth regressions in A14 but once they were resolved it was ruled out as the issue still occurs. Based on your description it is not a Graphene specific bug either.

I have attached a quick log that Graphene generated but will get the full crash dump from ADB later.

Error in AsteroidOS Sync ec4cd4a131fc.txt Error in AsteroidOS Sync ada966394367.txt

Our sample size is still quite small but I will ask in the Matrix chat as well as do some further testing of my own.

Subsonic-dev commented 3 months ago

Hi,

Apologies for the delay I meant to upload my experience with this issue awhile ago but I've been pressed for time. I am experiencing the same issue.

Device: Pixel 6 OS: Latest Graphene OS (Android 14) Version of app: Latest from F droid (0.29) and every other build that is runnable on A14, including the previous debug builds Watch: Catfish

At first I thought it was to do with the Bluetooth regressions in A14 but once they were resolved it was ruled out as the issue still occurs. Based on your description it is not a Graphene specific bug either.

I have attached a quick log that Graphene generated but will get the full crash dump from ADB later.

Error in AsteroidOS Sync ec4cd4a131fc.txt Error in AsteroidOS Sync ada966394367.txt

Our sample size is still quite small but I will ask in the Matrix chat as well as do some further testing of my own.

I no longer have access to this account so will be posting logs from this one going forward. Attached is the logcat from the crash. AsteroidOS Sync log 5f9946f4da85.txt

@Kahros Try using the following to get logs of the crash so we can compare: adb logcat -v time > logcat.txt

@sevmonster Are you still running Graphene on a P6P with Catfish? Have you encountered this issue?

sevmonster commented 3 months ago

I sold my watch and cannot test this issue, sorry.

Subsonic-dev commented 2 months ago

The problem mentioned in issue #217 looks to be the same problem as discussed here.

Somewhat unsurprising if by looking at the logs it turns out to be the same thing, whatever arbitrary code change in A14 that is broken/causes the sync app to crash persists in A15. Perhaps even crashing more.

If that turns out to be the case I suggest renaming this issue to A14 + rather make a new issue for every subsequent release until we figure out why it crashes. Will make tracking the issue and save some headaches.

I haven't had a chance to look into this more yet but I'm hoping for some down time in October when I can revisit this issue.

TheCaster commented 2 months ago

Okay, so after experiencing the same problems. I recompiled and installed over Android Studio on Pixel 6 with GrapheneOS. Interesting enough, the crashes don't to appear then?

Subsonic-dev commented 2 months ago

Okay, so after experiencing the same problems. I recompiled and installed over Android Studio on Pixel 6 with GrapheneOS. Interesting enough, the crashes don't to appear then?

That is curious. Are you running the latest stable build of GOS? Not that it should make any difference but are you running play services? If you built the Sync app from source it should be similar to the current F droid build.

There have been a few GOS updates since I last tested so I will try again after work.

TheCaster commented 2 months ago

@Subsonic-dev Android 14 with latest updates. Play Services are installed, but not in the profile where I am running the AsteroidOS Sync App, therefor it - should - not be accessible. I am also a little bit surprised ...

TheCaster commented 1 month ago

@Subsonic-dev The problem does not always seem to occur. The best way to recreate in Debugging is it to disconnect from the watch and reopen the application after that without shutting it down. The reconnect and sync loop (especially when updating the battery status < 100%) seem to help in creating the specific error. Research suggests that the MTU for the Bluetooth connection could be a problem. However, I cannot say for sure, as it is relatively difficult to trace the error ... (Especially if, like me, you very rarely tinker with Android)

MeowcaTheoRange commented 3 weeks ago

Happening to me too, between Pixel 6a with Calyx OS (5.11.0) and Skipjack (1.1-nightly)