oliexdev / openScale

Open-source weight and body metrics tracker, with support for Bluetooth scales
GNU General Public License v3.0
1.68k stars 292 forks source link

App does not connect to QN scale #961

Closed akki-239 closed 1 year ago

akki-239 commented 1 year ago

Describe the bug Cannot connect the scale to the app. Gives error message, "an unexpected error has occurred."

To Reproduce Installed the app from Google Play Store Opened it and tried to connect to my QN scale from Actofit. Gives error message, "an unexpected error has occurred."

Reproduced with [latest dev version] Version 2.5.1 pro from Google Play store

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

Debug log Build version: 2.5.1-pro Build date: 1981-01-01 01:01:02 Current date: 2023-06-04 11:28:37 Device: Samsung SM-G781B OS version: Android 13 (SDK 33)

Stack trace:
java.lang.NullPointerException: no valid characteristic provided at java.util.Objects.requireNonNull(Objects.java:245) at com.welie.blessed.BluetoothPeripheral.writeCharacteristic(BluetoothPeripheral.java:1229) at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:303) at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:291) at com.health.openscale.core.bluetooth.BluetoothQNScale.onNextStep(BluetoothQNScale.java:111) at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:610) at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:612) at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:612) at com.health.openscale.core.bluetooth.BluetoothCommunication.resumeMachineState(BluetoothCommunication.java:210) at com.health.openscale.core.bluetooth.BluetoothCommunication$1.onServicesDiscovered(BluetoothCommunication.java:464) at com.welie.blessed.BluetoothPeripheral$1$1.run(BluetoothPeripheral.java:210) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)