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
Android 13 sync app disconecting from catfish #192
Comments
Update: Re flashed the watch tonight to nightly build 20230210035535 and reinstalled the app after having not played around with it since writing the above last week (not had time to test). Issue still persists across builds. |
Update 2: |
I also had this issue, and the problem isn't just that it is disconnecting, the Bluetooth stack is crashing. #194 |
I see. I'm glad I finally found someone else who is able to replicate this and it's not just me. We have a similar setup with Graphene on Pixel 6 and 6 pro respectively. I've been trying to keep track of this issue and although I've seen only a handful of people with different watches (and some A13 roms but never 12) in matrix chat describing something similar none of them got back to me (and those that did couldn't replicate it). I did experience the same on Gadget bridge as per the recommendations of that thread and above. |
Yeah I've been using Gadgetbridge and while it has been more stable, I have been seeing possible crashes an hour or more into the Bluetooth connection, though logcat is never running when I notice it happening. (Gadgetbridge also doesn't stay connected in the background regardless, so even if it didn't crash it doesn't really matter.) So Android 13 ROMs and multiple brands of watches, not just catfish? I was leaning toward this might be a bug in the Bluetooth stack and I think that points more there. Have you or anyone else brought this to GrapheneOS or Google? |
Same here on gadgetbridge. I can't confirm it at the moment but I've been in touch with a user who goes by totalsonic1 who I believe is having similar issues on other A13 roms (Bliss 16.5 and Arrow OS 13) but will need them to confirm what watch they are having issues with and then confirm it's the same issue and not a similar one. I linked them this thread so hopefully they can post their experience here. As for who I've brought this to, nobody aside from here. Didn't bring it to graphene as based on Matrix chat and some digging seemed like a broader Android 13 issue. Haven't told Google/Android team as don't have logs and honestly not really sure where I would start posting to bring it to them. I'm not sure if anyone else is tracking this issue. |
logcat_02-27-2023_21-32-48.txt
Does your crash look similar? |
Tell me how you got this and I'll try to recreate it. Problem happens frequently so don't imagine it would be too difficult. |
Don't worry about it. A scant amount of research has revealed the issue. NordicSemiconductor/Android-BLE-Library#420 (comment) Apparently before Android 13, the BLE stack was allowing out-of-spec buffer sizes for characteristics. This is not an Android bug, it is an AsteroidOS bug. If the characteristic size is larger than 512 under Android 13 it will overflow the buffer and crash. Previous versions of Android would silently allow this behavior. |
Ahh I was looking in all the wrong places then... DodoRadio did say something to me in Matrix chat about it being an issue with BT LE in Android 13 but I would never have found this. Hopefully this helps someone. |
At this point the app is basically unusable on Android 13 until this is resolved. I haven't gotten logs for Gadgetbridge but I will assume if it is crashing too it'll be for a similar reason. Maybe some watches/implementations don't have this issue, I am ignorant to app internals—but this bug still has the ability to manifest under I assume any Android 13 device. |
I have found how to run logcat (https://www.xda-developers.com/how-to-take-logs-android/) and will try to grab some logs later this week. Hopefully some of those people I contacted with different setups can comment and share their experience to help paint a better picture of this issue. |
This characteristic caused the overflow on my device:
574B! I have a feeling this might be related to Nextcloud News sending huge notifications. After clearing it, I am not getting crashes just yet. This would make sense given the notification update characteristic UUID. @librarydemise457892 You can use https://github.com/darshanparajuli/LogcatReader edit: I was right, that packet is for my newsfeed notification. |
I will look into this. Edit: I see the option for ADB approval in the app. I will try this. |
You don't need root, and if you use Termux ( I've managed to sidestep the issue by blacklisting apps that might send large notifications. It's not optimal since those notifications are generally ones I want (chat and email) but it's better than Bluetooth crashing every time my feeds update or I get an email. |
I tried using the logcat app you linked but I could not recreate this. I gave it all the authorizations it asked for but when I tried to pair my watch with my phone, it did replicate the behavior of not being able to connect, but when I looked in the logs there were no messages with a corresponding time stamp for the issue. I rebooted and double checked that logcat had full access to logs and tried again a few more times but I could not get it to produce a log to explain this behavior. I'll need to try again later. I see a new PR has been merged so hopefully there is a new build that fixes this soon. EDIT: I retested using adb logcat -v time > logcat.txt and managed to find the corresponding error which corroborates what Sev experienced (Followed by several large blocks of 03-28 16:36:19.428 F/libc (10208): FORTIFY: memcpy: prevented 600-byte write into 513-byte buffer |
Perillamint was so kind to share a compiled version in the matrix chat. |
You need to uninstall the old app because it's using a different signature. I think the PR fixed the issue. Haven't had any crashes with long notifications. I will continue testing this version. |
Installed successfully and running now. Will report back on stability but already an improvement as it can connect. |
I haven't had any spontaneous disconnections or crashes since installing the debug build. |
Yeah sorry for the slow reply. Took some extra time to test it and no drop outs or crashes. Only issue is some notifications don't come through for certain apps but believe that is out of the scope of this issue, and I can open a new one and close this issue once this new builds hits stable release. Thanks to everyone who worked on this we got there. |
hi :) |
Unable to maintain connectivity in the sync app with catfish on Android 13. Watch briefly connects to app but then immediately disconnects. If you do manage to get it connected (see edge cases below) it will connect for a couple of hours before then exhibiting the above issues. Watch behaves normally with all other tested devices and it seems to only be an issue with the sync app.
Tested on:
Android 13 (both f droid most recent and test build mentioned below)
Ubuntu touch (using telescope)
Couldn't test on any other android phones (only tested on 13 but nobody in matrix seems to be having this issue) to reproduce the issue and couldn't get the starfish client for Sailfish Os to install.
Steps to reproduce:
*Issue does always not occur on clean install of the app. Issue occurs once it has been connected for a couple of hours at which point it disconnects, can then be reconnected for 5 seconds before disconnecting again. I tested a clean install again today and the issue persisted.
Attempted troubleshooting:
Observations;
Android 13 ( Graphene OS across several builds from 04/02/23 onwards)
Catfish running build id 202301128132217
Asteroid OS sync app from F droid version 0.27 AND unsigned build from @Doomsdayrs based on pull requests #189 / #190 (all pictures where taken showing the test build rather than the fdroid build)
This is my first github issue so please let me know if there is an issue format for this repository. Additionally if you walk me through it I can test and provide the logs.
The text was updated successfully, but these errors were encountered: