Skip to content

[Bug]: Nordic BLE library does not ask for permissions from user before instantly killing the application, so permissions can never be granted #3719

Description

@AshleighTheCutie

Contact Details

amoore@ashleighhost.net

Checklist

  • I am able to reproduce the bug with the latest version.

  • I made sure that there are no existing OPEN or CLOSED issues which I could contribute my information to.

  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.

  • This issue contains only one bug.

  • I have read and understood the Contribution Guidelines.

  • I agree to follow this project's Code of Conduct

Affected app version

2.7.7-open.1 (29319401)

Affected Android version

Android 13

Affected phone model

BLU G93

Affected node model

N/A

Affected node firmware version

N/A

Steps to reproduce the bug

  1. Attempt to open the app
  2. App instantly closes

Actual behavior

  1. Attempt to open the app
  2. App instantly closes

Expected behavior

The app requests Nearby Devices and Location permissions before attempting to open the BLE library.

Screenshots/Screen recordings

https://homesrv.ashleighhost.net/imagehost/br/mt/mt_01.mp4

Relevant log output

11-16 19:26:34.957  1663  1737 I ActivityManager: Start proc 15795:com.geeksville.mesh/u0a187 for service {com.geeksville.mesh/com.geeksville.mesh.service.MeshService}
11-16 19:26:35.135 15795 15819 E AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-5
11-16 19:26:35.135 15795 15819 E AndroidRuntime: Process: com.geeksville.mesh, PID: 15795
11-16 19:26:35.135 15795 15819 E AndroidRuntime: java.lang.SecurityException: BLUETOOTH_CONNECT permission not granted
11-16 19:26:35.135 15795 15819 E AndroidRuntime:        at no.nordicsemi.kotlin.ble.client.android.internal.NativeCentralManagerImpl.getBondedPeripherals(r8-map-id-f7cb2f9b56882737a8b21f4c91908661a8295e873d82abb03b3d3b96b940f374:25)
11-16 19:26:35.135 15795 15819 E AndroidRuntime:        at com.geeksville.mesh.repository.bluetooth.BluetoothRepository.updateBluetoothState$app_fdroidRelease(r8-map-id-f7cb2f9b56882737a8b21f4c91908661a8295e873d82abb03b3d3b96b940f374:156)
11-16 19:26:35.135 15795 15819 E AndroidRuntime:        at com.geeksville.mesh.repository.bluetooth.BluetoothRepository$1.invokeSuspend(r8-map-id-f7cb2f9b56882737a8b21f4c91908661a8295e873d82abb03b3d3b96b940f374:185)
11-16 19:26:35.135 15795 15819 E AndroidRuntime:        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(r8-map-id-f7cb2f9b56882737a8b21f4c91908661a8295e873d82abb03b3d3b96b940f374:9)
11-16 19:26:35.135 15795 15819 E AndroidRuntime:        at kotlinx.coroutines.DispatchedTask.run(r8-map-id-f7cb2f9b56882737a8b21f4c91908661a8295e873d82abb03b3d3b96b940f374:115)
11-16 19:26:35.135 15795 15819 E AndroidRuntime:        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(r8-map-id-f7cb2f9b56882737a8b21f4c91908661a8295e873d82abb03b3d3b96b940f374:118)
11-16 19:26:35.135 15795 15819 E AndroidRuntime:        Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@ecc138c, Dispatchers.Default]
11-16 19:26:35.142  1663  1706 I ActivityManager: getDialogForbid packageName=com.geeksville.mesh ,proc state= 4
11-16 19:26:35.143  1663  1706 W ActivityManager: App crash: don't show dialog for proc com.geeksville.mesh
11-16 19:26:35.145  1663 23839 I ActivityManager: Killing 15795:com.geeksville.mesh/u0a187 (adj 200): crash
11-16 19:26:35.146  1663 23839 W ActivityManager: Bringing down service while still waiting for start foreground: ServiceRecord{db4a71c u0 com.geeksville.mesh/.service.MeshService}

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions