Flutter taking an unexpectedly long time for connecting to browser

前端 未结 6 1613
情深已故
情深已故 2021-02-13 04:04

I\'m building flutter web project and after implenting login page via firebase I ran flutter run -d chrome. But it\'s stuck while attempting to connect to browser, its just atte

相关标签:
6条回答
  • 2021-02-13 04:19

    Same issue here. When trying the sample project, it works. I think the problem has something to do with dependencies, but have not figured out in detail.

    Update: Could be related: https://github.com/flutter/flutter/issues/40876 and https://github.com/flutter/flutter/issues/39998

    Update #2: I could reproduce the issue a described in https://github.com/flutter/flutter/issues/39998

    1) Create fresh flutter project with web support -> works.

    2) add import 'dart:io'; to main.dart -> blank screen

    0 讨论(0)
  • 2021-02-13 04:23

    Same issue . It wasn't able to get the instance of browser.

    I tried removing unused imports, in my case "import 'dart:ffi';" this was the unused import and ta daa ... it worked !!!.

    i just don't know what exactly the problm was.

    0 讨论(0)
  • 2021-02-13 04:24

    I have fixed that issue by installing the latest JDK and JRE and added both path to environment variables. it fixes my flutter speed but flutter run and apk building still taking the same.

    0 讨论(0)
  • 2021-02-13 04:34

    Try with flutter run -d web-server, then open URL on Chrome manually.

    0 讨论(0)
  • 2021-02-13 04:38

    Same issue: It use to take lot of time to load and 'r', the hot reload command never worked.

    For me cleaning builds by "flutter clean" did the magic.

    0 讨论(0)
  • 2021-02-13 04:40
    1. Remove all unused dependencies
    2. flutter run -d web-server

    The answer mentioned by @Giampaolo is a great workaround!

    0 讨论(0)
提交回复
热议问题