• Hi forum,

    this morning I received an update on Gadgetbridge. I connected it to my BangleJS2 (kickstarter, Firmware 2v17) and it crashed. I tried multiple times, but it always crashed. I restarted my bangle (long press button) but still same issue.

    So I connected it to Android Studio and filtered its output to "gadg". I opened Gadgebridge and it wasn't connected. I waited a few seconds and connected it. After some time, Android said it crashed and I had the option to wait or clode Gadgetbridge. I hit wait. This message came up again, this time I hit close.

    This is this logcat output:
    https://gist.github.com/graphcon/ba077e1­6278e3c112fc0be1830eec96d

    This is the ANR part:
    ANR in com.espruino.gadgetbridge.banglejs
    PID: 15614
    Reason: executing service com.espruino.gadgetbridge.banglejs/nodom­ain.freeyourgadget.gadgetbridge.service.­DeviceCommunicationService
    ErrorId: 3d41d4dd-f870-4f0c-ae22-d83a58b21c0f
    Frozen: false
    Load: 1.91 / 1.38 / 1.67
    ----- Output from /proc/pressure/memory -----
    some avg10=0.07 avg60=0.65 avg300=0.45 total=2037021908
    full avg10=0.03 avg60=0.37 avg300=0.22 total=1061692332
    ----- End output from /proc/pressure/memory -----

    CPU usage from 8047ms to 20103ms later (2023-05-19 09:21:59.563 to 2023-05-19 09:22:11.619):
    39% 2995/com.google.android.bluetooth: 24% user + 14% kernel / faults: 5330 minor 40 major
    27% 15614/com.espruino.gadgetbridge.banglejs­: 18% user + 9.4% kernel / faults: 24066 minor
    17% 1639/adbd: 8.2% user + 9.5% kernel / faults: 3589 minor
    16% 1972/system_server: 11% user + 4.7% kernel / faults: 3701 minor
    15% 16392/com.zhiliaoapp.musically: 10% user + 5.7% kernel / faults: 17904 minor 166 major
    10% 592/logd: 3% user + 7.2% kernel / faults: 1013 minor 11 major
    0.3% 1585/media.swcodec: 0.1% user + 0.1% kernel / faults: 25153 minor 209 major
    7.7% 4405/com.google.android.as: 4.7% user + 3% kernel / faults: 21673 minor 1139 major
    6.5% 1201/android.hardware.bluetooth@1.0-serv­ice-qti: 2.4% user + 4% kernel
    6.2% 22823/logcat: 2% user + 4.2% kernel
    5.5% 2759/cds_ol_rx_threa: 0% user + 5.5% kernel
    3.8% 2787/com.android.systemui: 3% user + 0.8% kernel / faults: 7433 minor 132 major
    3.1% 22717/kworker/u16:18-LPASS_CNTL: 0% user + 3.1% kernel
    2.2% 32446/com.google.android.gms.persistent:­ 1.5% user + 0.6% kernel / faults: 3080 minor 120 major
    2% 1264/media.hwcodec: 1.1% user + 0.9% kernel
    1.9% 20562/kworker/u16:14-events_unbound: 0% user + 1.9% kernel
    0.8% 20501/kworker/u16:2-events_unbound: 0% user + 0.8% kernel
    1.4% 20563/kworker/u16:15-events_unbound: 0% user + 1.4% kernel
    1.4% 22716/kworker/u16:17-WCNSS_DATA: 0% user + 1.4% kernel
    0.9% 3149/com.android.phone: 0.7% user + 0.2% kernel / faults: 847 minor 397 major
    0.1% 4502/com.android.nfc: 0% user + 0% kernel / faults: 1817 minor 548 major
    0.9% 9230/com.google.android.apps.turbo: 0.9% user + 0% kernel / faults: 2925 minor 232 major
    0% 1554/media.extractor: 0% user + 0% kernel / faults: 3505 minor 67 major
    0.9% 3011/com.android.hbmsvmanager: 0.6% user + 0.2% kernel / faults: 1507 minor 445 major
    0.8% 5376/com.whatsapp: 0.4% user + 0.3% kernel / faults: 567 minor 53 major
    0.4% 31705/com.facebook.katana: 0.1% user + 0.2% kernel / faults: 405 minor 279 major
    0.7% 1252/vendor.google.wifi_ext@1.0-service-­vendor: 0.4% user + 0.3% kernel / faults: 181 minor 2 major
    0% 1559/media.codec: 0% user + 0% kernel / faults: 1976 minor 52 major
    0.4% 3041/.qtidataservices: 0.2% user + 0.1% kernel / faults: 1139 minor 353 major
    0.4% 4568/com.google.android.connectivityther­malpowermanager: 0.2% user + 0.1% kernel / faults: 593 minor 571 major
    0% 4582/com.qualcomm.qti.services.secureui:­sui_service: 0% user + 0% kernel / faults: 769 minor 590 major
    0.6% 1246/rlsservice: 0% user + 0.5% kernel
    0.6% 2893/com.android.networkstack.process: 0.5% user + 0% kernel / faults: 741 minor 143 major
    0% 3029/.dataservices: 0% user + 0% kernel / faults: 576 minor 529 major
    0.3% 3045/com.google.android.grilservice: 0.2% user + 0% kernel / faults: 608 minor 377 major
    0% 3069/org.codeaurora.ims: 0% user + 0% kernel / faults: 665 minor 486 major
    0% 4533/com.android.ims.rcsservice: 0% user + 0% kernel / faults: 597 minor 499 major
    0.6% 18089/kworker/u16:0-kverityd: 0% user + 0.6% kernel
    0.5% 11/rcu_preempt: 0% user + 0.5% kernel
    0.5% 130/kswapd0: 0% user + 0.5% kernel
    0% 3044/com.qti.phone: 0% user + 0% kernel / faults: 579 minor 525 major
    0.5% 3109/com.qualcomm.qti.devicestatisticsse­rvice: 0.4% user + 0% kernel / faults: 568 minor 521 major
    0% 3121/com.google.android.apps.cbrsnetwork­monitor: 0% user + 0% kernel / faults: 560 minor 506 major

    Can you tell me how to fix this?

  • Hi, sorry to hear that.

    1. Did you enlist as a beta tester for Bangle.js Gadgetbridge on the Google Play Store? I believe otherwise you wouldn't have gotten the update (thank you for testing though!). But that also means you should be able to get the previous version by unregistering as beta tester and reinstalling the app.

    2. What Android device are you using? What Android version is it on?

    3. The changes to the app are made in this PR by me. I've been running it for a couple of months on a Sony Xperia 10 IV with Android 13.

  • this morning I received an update on Gadgetbridge. I connected it to my BangleJS2 (kickstarter, Firmware 2v17) and it crashed. I tried multiple times, but it always crashed.

    I assume Gadgetbridge crashed, and not the Bangle.js watch. Correct?

  • Thanks for all the details!

    Just to add the quick fix for this might be to go to https://play.google.com/apps/testing/com­.espruino.gadgetbridge.banglejs and to choose not to be a tester any more - then you'll get the old version.

    It seems like a lot of information was getting transferred to the Bangle when you connected - it's possible that just the sheer volume of stuff made it appear that Gadgetbridge had crashed - it may not actually be related to the new version at all.

    You could try tapping on the gear icon next to the Bangle, scrolling down and enabling 'Allow high MTU' - it's possible that would speed up the data transfer and fix it for you.

    However the slightly odd thing is that the Bangle was saying it couldn't handle the data fast enough - what clock do you have installed on the Bangle?

  • When/if you get the time, could you reinstall the new 0.73.o version, go through the initial permission granting process and try connecting again?

    If that still fails, could you go to the app info page of Bangle.js Gadgetbridge in the Android system settings to see if all permissions are indeed granted or if some aren't? Especially 'Location' and 'Nearby Devices' permissions would be interesting to know if they weren't granted somehow.

  • I just had a look at the data transferred and it's a big binary blob by the look of it. Over those maybe 15 seconds it's trying to transfer over 30kB of data in one big base64-encoded data stream.

    Do you have any apps installed on the Bangle (like the AGPS updater, or something custom?) that could be trying to request a big file over HTTP or something like that when you first connect?

    It's entirely possible that the hang is from Gadgetbridge trying to service that request - I don't believe it has actually crashed, it's just very busy trying to send all that data - I guess the question is whether we can do something to ensure that it stays responsive while sending that data out.

  • Just an update on this - I realised I was missing base64 data off the front which made this seem like it was binary when it wasn't.

    It seems to be some HTML calendar data - you might actually want to delete all the writing to characteristic lines from that gist - I'm not 100% sure but there could be some personal data in there.

    Do you have anything installed that might be causing this? Or it's possible that the calendar syncing code doesn't sanity check the data it sends and you have an event coming up in the next day or so that has a huge HTML-based description in it

  • I've pushed an updated Gadgetbridge 0.74.0a - so hopefully this will be fixed for you now

  • Hi guys,

    sorry for my late reply, email notification on updates to this thread were delivered to my spam folder so I didn't see them write away.

    I'm not sure if I was able to follow you all along. I see the question about my Android device: it's a Google Pixel 5 with Android 13 (Kernel version 4.19.261-g768ca1b2052f-ab... as of March 16th).
    I also activated 'Allow high MTU' and kept hitting "wait" when Android's message of ANR was displayed until logcat stopped more or less.

    Then I cleared logcat, turned off my bandle js and stopped Gadgetbrige app from within the app (Burger menu bottom entry). Logcat was quiet. I started my BangleJS (saw a message in logcat appearing), then started Gadgetbridge and then connected. I copy pasted it to an new Gist: https://gist.github.com/graphcon/3abe2d6­f83c2ffe95c21a7013f8ae15b
    I feat, it doesn't start from when I started my bangle as there might be a limit of displayed messages. Not sure if I can expand this. Please tell me, if it isn't enough, I will then look into it.

    I then kept hitting "wait" when ANR message appeared, but it doesn't seem to change anything.
    There were no private messages/notifications while recording this logcat.

    Also, I don't have any calendar apps on my bangle, does it always pull my events?
    I use Circles Clock https://github.com/espruino/BangleApps/t­ree/master/apps/circlesclock

    I did the same again (turn off bangle, stop gadgetbridge, ...). My bangle showed some messages at the bottom like "fifo full". It's still running and logcat shows a lot of "writing to characteristic" messages. But I received some personal messages so I can't provide you the logcat this time.

  • I've pushed an updated Gadgetbridge 0.74.0a - so hopefully this will be fixed for you now

    This hasn't shown up on the Google Play Store for me yet, in case @Graphity doesn't see it as well. It will become available eventually I assume.

    EDIT:

    I see the question about my Android device: it's a Google Pixel 5 with Android 13 (Kernel version 4.19.261-g768ca1b2052f-ab... as of March 16th).

    Thanks, that's good to know.

  • Oh, sure, I'll wait then :)

  • I' sorry guys, Gadgetbridge doesn't stop responding anymore. So the issue was somehow fixed (probably because I was resetting bangleJS and Gadgetbridge). I still have 0.73.0-banglejs installed. So I can't reproduce the issue which also means I can't tell you, if it is fixed in that update.

    Sorry for that.
    But of course: Thanks a lot for your efforts! I really like my bangle and the support from this forum!

  • So the issue was somehow fixed (probably because I was resetting bangleJS and Gadgetbridge).

    Nice! :)

  • Great! If it was calendar related, it might be that the calendar item that had lots of text in it was a few days ago and so wasn't loaded any more

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Gadgetbridge 0.73.0-banglejs keeps crashing when connecting

Posted by Avatar for Graphity @Graphity

Actions