Skip to content

Workaround for the bad response issue#77

Merged
microbit-matt-hillsdon merged 1 commit intoappsfrom
bad-response-workaround
Mar 3, 2026
Merged

Workaround for the bad response issue#77
microbit-matt-hillsdon merged 1 commit intoappsfrom
bad-response-workaround

Conversation

@microbit-matt-hillsdon
Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon commented Jan 20, 2026

See microbit-foundation/python-editor-v3#89

Ultimately this needs a fix in DAPLink to clear the queue when the host reconnects but that won't have much impact on existing devices.

Repro steps via the demo:

  • Disable the retries in this PR
  • Write a MakeCode project that spams serial
  • Connect via the demo
  • Start serial via the button
  • Reload the page
  • Connect and see it fail ~50% of the time

The disconnect on tab visibility has been a long-standing workaround and these disconnects play an important role in letting folks use multiple micro:bit apps. So on the apps branch we now have an explicit PAUSED state as an optional feature of the USB connection (on by default to play nice across apps). Apps can handle PAUSED differently from DISCONNECTED (e.g. Python can not clear serial scrollback for PAUSED).

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 21, 2026

Deploying microbit-connection with  Cloudflare Pages  Cloudflare Pages

Latest commit: c29cd9b
Status:🚫  Build failed.

View logs

@microbit-matt-hillsdon microbit-matt-hillsdon changed the base branch from main to apps March 2, 2026 17:28
See microbit-foundation/python-editor-v3#89

Ultimately this needs a fix in DAPLink to clear the queue on reset but that
won't have much impact on existing devices.
@microbit-matt-hillsdon microbit-matt-hillsdon changed the title Attempt a workaround for the bad response issue Workaround for the bad response issue Mar 2, 2026
Copy link
Contributor

@microbit-robert microbit-robert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit eb212cc into apps Mar 3, 2026
3 of 4 checks passed
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the bad-response-workaround branch March 3, 2026 10:02
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

Successfully merging this pull request may close these issues.

2 participants