Skip to content
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

app crashes when trying to add user to BF720 #1089

Open
khusmann opened this issue Nov 20, 2024 · 0 comments
Open

app crashes when trying to add user to BF720 #1089

khusmann opened this issue Nov 20, 2024 · 0 comments

Comments

@khusmann
Copy link

Describe the bug
When trying to add a user to the BF720, the app crashes. But it's able to work fine with existing users.

To Reproduce
Steps to reproduce the behavior:

Situation 1: fresh setup (crashes)

  1. Start with a clear, factory reset scale (factory reset by holding down reset button until it says "clr")
  2. Scale shows "use app"
  3. Connect with openScale
  4. Accept pairing request
  5. OpenScale crashes
  6. Restart openscale and try connecting to scale again
  7. OpenScale silently creates profile 01 with default settings
  8. OpenScale successfully receives measurements from this profile

Situation 2: existing setup, existing user (works)

  1. Start with a user manually setup on the scale (using the buttons on the scale)
  2. Connect with open scale
  3. Accept pairing request
  4. Choose the existing user
  5. Enter the user's PIN
  6. Everything works with the user

Situation 3: existing setup, new user (crashes)

  1. Start with a user manually setup on the scale (using the buttons on the scale)
  2. Connect with open scale
  3. Accept pairing request
  4. Choose to create a new user
  5. it crashes
  6. Restart openscale and try connecting to scale again
  7. OpenScale silently creates new profile with default settings
  8. OpenScale successfully receives measurements from this profile

Reproduced with latest dev version: Yes

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

No crashy!

Additional context
Add any other context about the problem here.

Debug log
Attach a debug log (see Settings -> About -> Save debug log to file) that is captured while reproducing the issue.

--------- beginning of crash
11-20 14:33:33.862 16381 16381 E AndroidRuntime: FATAL EXCEPTION: main
11-20 14:33:33.862 16381 16381 E AndroidRuntime: Process: com.health.openscale.pro, PID: 16381
11-20 14:33:33.862 16381 16381 E AndroidRuntime: java.lang.NullPointerException: no valid characteristic provided
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at j$.util.Objects.requireNonNull(Unknown Source:5)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.welie.blessed.BluetoothPeripheral.writeCharacteristic(BluetoothPeripheral.java:1229)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:303)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:291)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothBeurerBF105.writeTargetWeight(BluetoothBeurerBF105.java:132)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothBeurerBF105.writeUserDataToScale(BluetoothBeurerBF105.java:72)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.onNextStep(BluetoothStandardWeightProfile.java:196)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:610)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.resumeMachineState(BluetoothCommunication.java:210)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.handleUserControlPointNotify(BluetoothStandardWeightProfile.java:290)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.onBluetoothNotify(BluetoothStandardWeightProfile.java:256)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothBeurerBF105.onBluetoothNotify(BluetoothBeurerBF105.java:82)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication$1.onCharacteristicUpdate(BluetoothCommunication.java:493)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.welie.blessed.BluetoothPeripheral$1$5.run(BluetoothPeripheral.java:287)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:959)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:100)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:232)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:317)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8592)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
11-20 14:33:33.862 16381 16381 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: FATAL EXCEPTION: main
11-20 14:41:21.380 20843 20843 E AndroidRuntime: Process: com.health.openscale.pro, PID: 20843
11-20 14:41:21.380 20843 20843 E AndroidRuntime: java.lang.NullPointerException: no valid characteristic provided
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at j$.util.Objects.requireNonNull(Unknown Source:5)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.welie.blessed.BluetoothPeripheral.writeCharacteristic(BluetoothPeripheral.java:1229)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:303)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:291)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothBeurerBF105.writeTargetWeight(BluetoothBeurerBF105.java:132)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothBeurerBF105.writeUserDataToScale(BluetoothBeurerBF105.java:72)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.onNextStep(BluetoothStandardWeightProfile.java:196)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:610)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.resumeMachineState(BluetoothCommunication.java:210)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.handleUserControlPointNotify(BluetoothStandardWeightProfile.java:290)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.onBluetoothNotify(BluetoothStandardWeightProfile.java:256)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothBeurerBF105.onBluetoothNotify(BluetoothBeurerBF105.java:82)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication$1.onCharacteristicUpdate(BluetoothCommunication.java:493)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.welie.blessed.BluetoothPeripheral$1$5.run(BluetoothPeripheral.java:287)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:959)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:100)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:232)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:317)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8592)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
11-20 14:41:21.380 20843 20843 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: FATAL EXCEPTION: main
11-20 14:47:30.205 21256 21256 E AndroidRuntime: Process: com.health.openscale.pro, PID: 21256
11-20 14:47:30.205 21256 21256 E AndroidRuntime: java.lang.NullPointerException: no valid characteristic provided
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at j$.util.Objects.requireNonNull(Unknown Source:5)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.welie.blessed.BluetoothPeripheral.writeCharacteristic(BluetoothPeripheral.java:1229)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:303)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.writeBytes(BluetoothCommunication.java:291)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothBeurerBF105.writeTargetWeight(BluetoothBeurerBF105.java:132)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothBeurerBF105.writeUserDataToScale(BluetoothBeurerBF105.java:72)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.onNextStep(BluetoothStandardWeightProfile.java:196)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.nextMachineStep(BluetoothCommunication.java:610)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication.resumeMachineState(BluetoothCommunication.java:210)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.handleUserControlPointNotify(BluetoothStandardWeightProfile.java:290)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothStandardWeightProfile.onBluetoothNotify(BluetoothStandardWeightProfile.java:256)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothBeurerBF105.onBluetoothNotify(BluetoothBeurerBF105.java:82)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.health.openscale.core.bluetooth.BluetoothCommunication$1.onCharacteristicUpdate(BluetoothCommunication.java:493)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.welie.blessed.BluetoothPeripheral$1$5.run(BluetoothPeripheral.java:287)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:959)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:100)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:232)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:317)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8592)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
11-20 14:47:30.205 21256 21256 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant