question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

device pulldown not populated when there's no network connection

See original GitHub issue

When I was without a network connection, I noticed that the device pulldown didn’t populate. I tracked this down to:

  • the flutter daemon process was blocked on startup due to another flutter process having the startup lock (Waiting for another flutter command to release the startup lock...)
  • this process was the one listing flutter samples (flutter create --list-samples)
  • there were 15 sample listing processes running
  • when run off-line, these process try an exponential, non-terminating attempts to connect to and download the catalog of samples
  • there’s a race condition in FlutterSamplesManager that will cause new requests to fire off if the initial one hasn’t completed yet; it looks like FlutterSamplesManager.getSamples() is called several times a second and will fire off many (dozens?) of flutter create --list-samples
Download failed -- attempting retry 1 in 1 second...
Download failed -- attempting retry 2 in 2 seconds...
Download failed -- attempting retry 3 in 4 seconds...
Download failed -- attempting retry 4 in 8 seconds...
Download failed -- attempting retry 5 in 16 seconds...
Download failed -- attempting retry 6 in 32 seconds...

Concretely for flutter_tools:

  • flutter create --list-samples needs to release the startup lock
  • flutter create --list-samples should not re-try the download indefinitely

Instead of a command to download the samples index, we may want to change to a mechanism where the index if built on the flutter chromium bots, and included as part of the SDK. This would mirror how other sdk artifacts are provisioned.

@DanTup @pq

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
devoncarewcommented, May 16, 2019

I think having this being just another sdk artifact makes sense. That way the samples are in-sync with the sdk you’d use to create them.

0reactions
devoncarewcommented, May 28, 2019

@pq, moving this into M36. There are ~2 issues in the IntelliJ code we should address, even taking into account the fix in flutter_tools:

  • FlutterSamplesManager can fire start many copies of flutter create --list-samples in parallel
  • FlutterSamplesManager lets the process run indefinitely (it should have a hard limit of something like 30 seconds, to account for the older flutter_tools)
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix no service or signal on a Samsung or Android phone
Still having problems? Try to manually connect to your service provider. All you need to do is to turn Airplane Mode on and...
Read more >
No Internet Connection? How to Troubleshoot Internet Issues
To restart your modem and router, unplug the power cable for 10 seconds and plug it back in. The equipment will take a...
Read more >
How to troubleshoot Android Wi-Fi connection problems
Step 4: Verify network connection with Ping · Start by using your device's built-in browser app to check Internet access. · If you...
Read more >
Fix network connection issues in Windows - Microsoft Support
Try these things to troubleshoot network connection issues in Windows 11. Make sure Wi-Fi is on. Select Start > Settings > Network &...
Read more >
What should I do if my device can't find a signal or can't ...
What should I do if my device can't find a signal or can't register on the network · Check your data usage; Add...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found