Skip to content

BLE Disconnect on File Write Operations #377

@makermelissa

Description

@makermelissa

CircuitPython Version

10.0.0-beta.3

Workflow(s)

BLE

Browser(s)

Chrome (latest)

Console Log

[Violation] 'click' handler took 1097ms
index.js:21 Uncaught (in promise) Error: Modal has not been opened yet. No instance available
    at gi.getModal (index.js:21:14076)
    at DR._markStepCompleted (index.js:112:6919)
    at DR.connectionStep (index.js:112:6850)
    at DR.updateConnected (index.js:112:24682)
    at DR.onDisconnected (index.js:112:3749)
getModal @ index.js:21
_markStepCompleted @ index.js:112
connectionStep @ index.js:112
updateConnected @ index.js:112
onDisconnected @ index.js:112Understand this error
[Violation] 'click' handler took 4949ms
index.js:40 caught connection error NetworkError: Failed to execute 'getPrimaryService' on 'BluetoothRemoteGATTServer': GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
    at IE.checkConnection (index.js:40:4356)
    at IE.move (index.js:40:11590)
    at Ou._handleRenameButton (index.js:32:103194) NetworkError: Failed to execute 'getPrimaryService' on 'BluetoothRemoteGATTServer': GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
    at IE.checkConnection (https://code-beta.circuitpython.org/assets/js/index.js:40:4356)
    at IE.move (https://code-beta.circuitpython.org/assets/js/index.js:40:11590)
    at Ou._handleRenameButton (https://code-beta.circuitpython.org/assets/js/index.js:32:103194)
index.js:40 caught write error TypeError: Cannot read properties of null (reading 'writeValueWithoutResponse')
    at IE._write (index.js:40:4911)
    at IE.move (index.js:40:11812)
    at async DR.showBusy (index.js:112:4411)
    at async Ou._handleRenameButton (index.js:32:103156) TypeError: Cannot read properties of null (reading 'writeValueWithoutResponse')
    at IE._write (https://code-beta.circuitpython.org/assets/js/index.js:40:4911)
    at IE.move (https://code-beta.circuitpython.org/assets/js/index.js:40:11812)
    at async DR.showBusy (https://code-beta.circuitpython.org/assets/js/index.js:112:4411)
    at async Ou._handleRenameButton (https://code-beta.circuitpython.org/assets/js/index.js:32:103156)
index.js:40 caught write error TypeError: Cannot read properties of null (reading 'writeValueWithoutResponse')
    at IE._write (index.js:40:4911)
    at IE.move (index.js:40:11833)
    at async DR.showBusy (index.js:112:4411)
    at async Ou._handleRenameButton (index.js:32:103156) TypeError: Cannot read properties of null (reading 'writeValueWithoutResponse')
    at IE._write (https://code-beta.circuitpython.org/assets/js/index.js:40:4911)
    at IE.move (https://code-beta.circuitpython.org/assets/js/index.js:40:11833)
    at async DR.showBusy (https://code-beta.circuitpython.org/assets/js/index.js:112:4411)
    at async Ou._handleRenameButton (https://code-beta.circuitpython.org/assets/js/index.js:32:103156)
index.js:40 caught write error TypeError: Cannot read properties of null (reading 'writeValueWithoutResponse')
    at IE._write (index.js:40:4911)
    at IE.move (index.js:40:11854)
    at async DR.showBusy (index.js:112:4411)
    at async Ou._handleRenameButton (index.js:32:103156) TypeError: Cannot read properties of null (reading 'writeValueWithoutResponse')
    at IE._write (https://code-beta.circuitpython.org/assets/js/index.js:40:4911)
    at IE.move (https://code-beta.circuitpython.org/assets/js/index.js:40:11854)
    at async DR.showBusy (https://code-beta.circuitpython.org/assets/js/index.js:112:4411)
    at async Ou._handleRenameButton (https://code-beta.circuitpython.org/assets/js/index.js:32:103156)
index.js:40 caught write error TypeError: Cannot read properties of null (reading 'writeValueWithoutResponse')
    at IE._write (index.js:40:4911)
    at IE.move (index.js:40:11903)
    at async DR.showBusy (index.js:112:4411)
    at async Ou._handleRenameButton (index.js:32:103156) TypeError: Cannot read properties of null (reading 'writeValueWithoutResponse')
    at IE._write (https://code-beta.circuitpython.org/assets/js/index.js:40:4911)
    at IE.move (https://code-beta.circuitpython.org/assets/js/index.js:40:11903)
    at async DR.showBusy (https://code-beta.circuitpython.org/assets/js/index.js:112:4411)
    at async Ou._handleRenameButton (https://code-beta.circuitpython.org/assets/js/index.js:32:103156)

Steps

  1. Make sure a CIRCUITPY drive is NOT showing
  2. Connect to the board
  3. Click Save As
  4. Rename an existing file
  5. Errors in console

Description

I'm seeing at least 3 different kinds of errors and I'm not sure how interrelated they are:

-There are click handler violations to begin with. This is caused by a click event showing the modal and not returning control in a reasonable amount of time. Not sure how to work around this.

  • Getting Failed to execute 'getPrimaryService' on 'BluetoothRemoteGATTServer': GATT Server is disconnected. Cannot retrieve services. and not sure why since it seems to be connected just fine. Perhaps an issue with the simplified BLE Workflow.
  • Getting caught write error TypeError: Cannot read properties of null (reading 'writeValueWithoutResponse') and I'm not sure what that means

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions