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

Unexpected Error - Renpho ES-CS20M #967

Closed Avasond closed 1 year ago

Avasond commented 1 year ago

Describe the bug Scale fails to sync with app and crashes.

To Reproduce

  1. Go to add scale
  2. QN-Scale
  3. Attempt to add entry
  4. "An Unexpected Error Occured"

OpenScale Build: 2.5.1 Scale Model: ES-CS20M Scale Firmware Version: 2.0

Expected behavior Scale sync with OpenScale

Build version: [2.5.1](http://2.5.0.1/) 
Build date: 1981-01-01 01:01:02 
Current date: 2023-07-15 12:43:47 
Device: Samsung SM-G986U 
OS version: Android 13 (SDK 33) 

Stack trace:  
[java.lang.NullPointerException:](http://java.lang.nullpointerexception/) no valid characteristic provided
    at [java.util.Objects.requireNonNull(Objects.java:245)](http://java.util.objects.requirenonnull%28objects.java:245)/)
    at [com.welie.blessed.BluetoothPeripheral.writeCharacteristic(BluetoothPeripheral.java:1229)](http://com.welie.blessed.bluetoothperipheral.writecharacteristic%28bluetoothperipheral.java:1229)/)
    at [com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:303)](http://com.health.openscale.core.bluetooth.bluetoothcommunication.writebytes%28bluetoothcommunication.java:303)/)
    at [com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:291)](http://com.health.openscale.core.bluetooth.bluetoothcommunication.writebytes%28bluetoothcommunication.java:291)/)
    at [com.health.openscale.core.bluetooth.BluetoothQNScale.onNextStep(BluetoothQNScale.java:111)](http://com.health.openscale.core.bluetooth.bluetoothqnscale.onnextstep%28bluetoothqnscale.java:111)/)
    at [com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:610)](http://com.health.openscale.core.bluetooth.bluetoothcommunication.nextmachinestep%28bluetoothcommunication.java:610)/)
    at [com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:612)](http://com.health.openscale.core.bluetooth.bluetoothcommunication.nextmachinestep%28bluetoothcommunication.java:612)/)
    at [com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:612)](http://com.health.openscale.core.bluetooth.bluetoothcommunication.nextmachinestep%28bluetoothcommunication.java:612)/)
    at [com.health.openscale.core.bluetooth.BluetoothCommunication.resumeMachineState(BluetoothCommunication.java:210)](http://com.health.openscale.core.bluetooth.bluetoothcommunication.resumemachinestate%28bluetoothcommunication.java:210)/)
    at [com.health.openscale.core.bluetooth.BluetoothCommunication$1.onServicesDiscovered(BluetoothCommunication.java:464)](http://com.health.openscale.core.bluetooth.bluetoothcommunication%241.onservicesdiscovered%28bluetoothcommunication.java:464)/)
    at [com.welie.blessed.BluetoothPeripheral$1$1.run(BluetoothPeripheral.java:210)](http://com.welie.blessed.bluetoothperipheral%241%241.run%28bluetoothperipheral.java:210)/)
    at [android.os.Handler.handleCallback(Handler.java:942)](http://android.os.handler.handlecallback%28handler.java:942)/)
    at [android.os.Handler.dispatchMessage(Handler.java:99)](http://android.os.handler.dispatchmessage%28handler.java:99)/)
    at [android.os.Looper.loopOnce(Looper.java:226)](http://android.os.looper.looponce%28looper.java:226)/)
    at [android.os.Looper.loop(Looper.java:313)](http://android.os.looper.loop%28looper.java:313)/)
    at [android.app.ActivityThread.main(ActivityThread.java:8757)](http://android.app.activitythread.main%28activitythread.java:8757)/)
    at [java.lang.reflect.Method.invoke(Native](http://java.lang.reflect.method.invoke%28native/) Method)
    at [com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)](http://com.android.internal.os.runtimeinit%24methodandargscaller.run%28runtimeinit.java:571)/)
    at [com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)](http://com.android.internal.os.zygoteinit.main%28zygoteinit.java:1067)/)