Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start over if the initial connection fails twice #500

Merged
merged 6 commits into from
Nov 18, 2024

Conversation

microbit-robert
Copy link

@microbit-robert microbit-robert commented Nov 14, 2024

Reset state after failing to connect or reconnect twice.
Additional fix when the link micro:bit is unplugged and the tab is not in focus.
Additional fix for to ensure radio connect fail dialog specifies the correct micro:bit (link/remote).

@microbit-robert
Copy link
Author

We currently get stuck with a "connecting..." dialog on the second failure. This needs testing thoroughly to ensure that there are no unforeseen side-effects.

Copy link

Preview build will be at
https://review-createai.microbit.org/connect-failures/

Copy link

@microbit-grace microbit-grace left a comment

Choose a reason for hiding this comment

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

Just tried the following for Bluetooth so far and here is what I got:

  • connect via bt - looks good
  • tab switching - looks good
  • failed to connect (unplug micro:bit whist connecting) - Looks good
  • failed to connect twice (unplug micro:bit whist connecting, click connect) - Looks good (got failed to reconnect twice dialog)
  • bluetooth auto reconnect (Connect via bt, then click reset) - Looks good, reconnect successfully
  • bluetooth connection loss dialog (Connect via bt, unplug micro:bit) - looks good
  • bluetooth reconnect fail dialog (Connect via bt, disconnect, unplug micro:bit, click reconnect) - looks good
  • bluetooth reconnect fail twice (connection loss/reconnect fail dialog, reconnect, get connect fail twice dialog) - looks good
  • bluetooth connect after reconnect fail twice (get connect fail twice dialog, go through bt flow again) - I unexpectedly got a reconnect fail twice dialog when needing to select micro:bit for bt.
Screenshot 2024-11-15 at 09 18 27

Will have a go at radio bridge testing in a bit!

@microbit-robert
Copy link
Author

bluetooth connect after reconnect fail twice (get connect fail twice dialog, go through bt flow again) - I unexpectedly got a reconnect fail twice dialog when needing to select micro:bit for bt.

This happens on staging already and is not related to this change.

@microbit-grace
Copy link

microbit-grace commented Nov 15, 2024

This happens on staging already and is not related to this change.

Oh interesting, I tried connection loss fail on staging and then went through the fail twice flow and didn't get the issue. I assumed it was working ok in staging and was introduced in this PR.

But after hearing that you have experienced it in staging, I just tried it again, but this time with reconnect fail as the first failure and managed to recreate it in staging. Private link to task

Edited to add task link

@microbit-robert
Copy link
Author

This happens on staging already and is not related to this change.

Oh interesting, I tried connection loss fail on staging and then went through the fail twice flow and didn't get the issue. I assumed it was working ok in staging and was introduced in this PR.

But after hearing that you have experienced it in staging, I just tried it again, but this time with reconnect fail as the first failure and managed to recreate it in staging. Private link to task

Edited to add task link

A fix for this problem. Everything probably needs retesting again. 576a891

@microbit-grace
Copy link

A fix for this problem. Everything probably needs retesting again. 576a891

Thanks bluetooth scenarios look good, will test radio bridge shortly

@microbit-grace
Copy link

microbit-grace commented Nov 15, 2024

For radio bridge,

  • if I unplug the link micro:bit whilst connecting, I seem to be getting the fail twice start over reconnect dialog.
  • If I unplug the data collection micro:bit whilst connecting, I get a failed to connect to radio link micro:bit dialog. But when switching tabs and returning back, the dialog disappears and it goes to reconnecting again which eventually goes to connection loss I think

@microbit-grace
Copy link

microbit-grace commented Nov 15, 2024

  • if I unplug the link micro:bit whilst connecting, I seem to be getting the fail twice start over reconnect dialog.

Discussed with Rob and decided the scenario is not a huge problem.

If I unplug the data collection micro:bit whilst connecting, I get a failed to connect to radio link micro:bit dialog. But when switching tabs and returning back, the dialog disappears and it goes to reconnecting again which eventually goes to connection loss I think

8a04862

@microbit-robert
Copy link
Author

We think this is now in a good place.

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit a09d4dc into main Nov 18, 2024
1 check passed
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the connect-failures branch November 18, 2024 09:51
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.

3 participants