microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
710 stars 588 forks source link

ChromeOS 105 WebUSB connection issues #4854

Closed microbit-carlos closed 1 year ago

microbit-carlos commented 1 year ago

@abchatra posting here for visibility.

Looks like the ChromeOS 105 release has broken WebUSB with the micro:bit, so it doesn't work with the MakeCode and the Python editor. The issue has been already logged in the Chromium tracker: https://bugs.chromium.org/p/chromium/issues/detail?id=1363712&q=usb&can=2

And a patch is under review: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/3897018/1

abchatra commented 1 year ago

I couldn't reproduce this on Chrome 105 on windows. So assuming ChormeOS only issue?

martinwork commented 1 year ago

@abchatra That is my understanding. In my tests with Chrome OS 106 on my Chromebook's beta channel, MakeCode and the Python Editor both see a failure as if the device is in use, like this

pxtapp.js:1 webusb: get devices
pxtapp.js:1 webusb: trying to connect (1 devices)
pxtapp.js:1 webusb: connect device: Arm BBC micro:bit CMSIS-DAP
pxtapp.js:1 webusb: serial number: 9906360200052820499b6b7610b03512000000006e052820  
pxtapp.js:1 webusb: open device
pxtapp.js:1 webusb: select configuration
pxtapp.js:1 webusb: got 6 interfaces
pxtapp.js:1 webusb: 2 matching interfaces; picking #5
pxtapp.js:1 webusb: using dedicated endpoints
pxtapp.js:1 webusb: claim interface
pxtapp.js:1 webusb: connection failed, Failed to execute 'claimInterface' on 'USBDevice': Unable to claim interface.
pxtapp.js:1 Uncaught (in promise) Error: Device in use or not found.
    at o.connectAsync (pxtapp.js:1:399151)
    at async DAPWrapper.reconnectAsync (editor.js:3368:9)
abchatra commented 1 year ago

@carlosperate @martinwork is this fixed now?

martinwork commented 1 year ago

@abchatra It's working for me in stable channel Chrome OS106.

abchatra commented 1 year ago

Ok will keep this alive until it is released.

microbit-carlos commented 1 year ago

It's been almost 5 months since ChromeOS 106 was released, so we can close this as resolved.