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.

Flutter web app sometimes only shows a blank/white page

See original GitHub issue

Hi, Since a few days my vscode debugging (ui click on green arrow) doesn’t work anymore. When I start flutter with chrome the application shows up for milliseconds and then disappears. There are no errors displayed in the logs. When I reload the page in chrome (F5) the application shows up again. When using Android Studio the debugging works as it should. When add --release to the launch.json it works as expected.

Things I have tried and didn’t fix it:

  • reverted my code to a month ago to see if it was a code mistake
  • reverted flutter vscode extension version to months ago
  • deleted vscode cache /Library/Application Support/Code/Cache & /Library/Application Support/Code/CachedData
  • reverted flutter to stable 2.2.2
  • Created a new flutter application with flutter create but vscode debugs normal
  • Switch to flutter master channel

How i fixed it

After downgrading vscode dart extension from 3.24.2 to 3.23.1 it worked again. I guess there must be a problem in the new dart extension version.

Note:

I always had an issue with hot reload since upgrading to null safety months ago. Whenever I try to hot reload(Android studio & vscode), the application disappears and the ios & android simulator goes blank/white screen. Might be connected to this issue might not. I didn’t file an issue for that yet. I have searched a long time for a solution to this but couldn’t find any

flutter analyze

No Issues found

flutter doctor -v

[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale de-DE)
    • Flutter version 2.2.3 at /Users/jonaskuschel/Developer/flutter
    • Framework revision f4abaa0735 (vor 6 Tagen), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/jonaskuschel/Library/Android/sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] VS Code (version 1.57.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.23.0

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114

If you need any more info or logs feel free to ask.

Thank you for your support!

Jonas

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
DanTupcommented, Jul 12, 2021

I’m wondering if this might be related to sending the VM Service extension values back at startup. This is something that was “fixed” by #3426 but caused some other issues (like #3454). I’ve changed how this works and wonder if that fixes things for you. Could you try the latest nightly build to see if it’s still an issue?

If this solves the issue, then I guess it’s already fixed and you can just use that version until the next release. If not, we’ll need to find a way that I can reproduce it, or we’ll have to build something between v3.23 and v3.24 for you to test to see if we can narrow down which change has affected it.

Thanks!

0reactions
DanTupcommented, Jul 14, 2021

Great! Thanks for confirming!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I get white screen when building flutter web
This answer was written when flutter-web was a separate project and webdev was the way to go for running your app. Now you...
Read more >
Flutter Web Page blank white screen · Issue #109789 - GitHub
No project is working in Flutter, I installed the sdk and installed android studio, I am using vs code, my stable version, but...
Read more >
[Solved] Flutter Webview Blank White Screen - YouTube
See how to solve flutter webview blank screen or keep loading page for ios when you use webveiew_flutter. It shows blank or white...
Read more >
Blank Gray Screen on Flutterflow on running the app
Hello guys, I am currently using FlutterFlow. Even there are no bugs and warnings, I am still not able to run my flutterflow...
Read more >
Why do I get white screen when building flutter web-Flutter
[Solved]-Why do I get white screen when building flutter web-Flutter · move your lib directory and pubspec.yml file to a safe place. ·...
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