oliexdev / openScale

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

Openscale sync crashes after configuring mqtt #1064

Open thomaswr opened 2 months ago

thomaswr commented 2 months ago

Describe the bug I'm adding mqtt connection in openscale sync to mosquitto with username and password auth to port 1883.

After saving the app crashes:

Build version: 0.3.5 
Build date: 1981-01-01 01:01:02 
Current date: 2024-08-31 14:29:06 
Device: Google Pixel 6 Pro 
OS version: Android 14 (SDK 34) 

Stack trace:  
java.lang.SecurityException: com.health.openscale.sync: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3183)
    at android.os.Parcel.createException(Parcel.java:3167)
    at android.os.Parcel.readException(Parcel.java:3150)
    at android.os.Parcel.readException(Parcel.java:3092)
    at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5860)
    at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1853)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1793)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1781)
    at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:757)
    at i4.a.start(:2)
    at t5.b.q(:9)
    at t5.d.run(Unknown Source:91)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: android.os.RemoteException: Remote stack trace:
    at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14469)
    at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2648)
    at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2822)
    at android.os.Binder.execTransactInternal(Binder.java:1500)
    at android.os.Binder.execTransact(Binder.java:1444)

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Reproduced with latest dev version: ???

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 Attach a debug log (see Settings -> About -> Save debug log to file) that is captured while reproducing the issue.