With an APK from the SDK 34 technical preview, I captured this:
Data_Collector_STARTER E FATAL EXCEPTION: main
Process: appinventor.ai_xxxxxxxxxxxxxx.Data_Collector_STARTER, PID: 20544
java.lang.ExceptionInInitializerError
at edu.mit.appinventor.ble.BluetoothLEint$BLEReadOperation.subscribe(BluetoothLEint.java:357)
at edu.mit.appinventor.ble.BluetoothLEint$BLEReadOperation.run(BluetoothLEint.java:325)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8913)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Caused by: java.lang.IllegalArgumentException: UUID string too large
at java.util.UUID.fromStringJava11(UUID.java:238)
at java.util.UUID.fromString(UUID.java:226)
at edu.mit.appinventor.ble.BluetoothLEGattAttributes.(BluetoothLEGattAttributes.java:33)
at edu.mit.appinventor.ble.BluetoothLEint$BLEReadOperation.subscribe(BluetoothLEint.java:357)
at edu.mit.appinventor.ble.BluetoothLEint$BLEReadOperation.run(BluetoothLEint.java:325)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8913)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Interesting, I have an app (Bluetooth BLE) that was working fine with a build from few weeks ago. Today I made a small change in the screen, just a cosmetic.. and then the new build has the same error as you.
Caused by: java.lang.IllegalArgumentException: UUID string too large
This error started with the today build, the old apk still working.
This is the log:
AndroidRuntime: FATAL EXCEPTION: main
AndroidRuntime: Process: appinventor.ai_hsduuda.MeshTech_Reel, PID: 20159
AndroidRuntime: java.lang.ExceptionInInitializerError
AndroidRuntime: at edu.mit.appinventor.ble.BluetoothLEint$BLEReadOperation.subscribe(BluetoothLEint.java:357)
AndroidRuntime: at edu.mit.appinventor.ble.BluetoothLEint$BLEReadOperation.run(BluetoothLEint.java:325)
AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:958)
AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:230)
AndroidRuntime: at android.os.Looper.loop(Looper.java:319)
AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8919)
AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
AndroidRuntime: Caused by: java.lang.IllegalArgumentException: UUID string too large
AndroidRuntime: at java.util.UUID.fromStringJava11(UUID.java:238)
AndroidRuntime: at java.util.UUID.fromString(UUID.java:226)
AndroidRuntime: at edu.mit.appinventor.ble.BluetoothLEGattAttributes.(BluetoothLEGattAttributes.java:33)
@ABG
In my other thread, I spoke too soon. With the newer BLE extension, it does connect without issue now and builds without issue now, but like the other 2 gentlemen above, if I attempt to register for anything, the app immediately crashes.
If you recall from our conversation the other night, it was crashing immediately on connect with the older BLE extension version. With the newest one, 202403322, it connects but the moment it tries to register, that's when the crash occurs.
Can you confirm?
Thanks for the report. This appears to be due to a semantic change between Java 8 and 11 around UUIDs that went into affect starting with Android 14. I'll look at updating the BLE extension to be more robust to the Java 11 constraints.
Thanks everyone! The reason for the crash wasn't at all what I expected, so it's a relief to know it's not just me, and even better that you understand the probable cause!
Hi Anke,
Android 10 API 29 Moto g(8) play Connected
Android 11 API 30 Moto g8 No Connect
Android 13 API 33 Moto g13 Connected
Android 14 API 34 Moto g54 5G No Connect