Problem while running Flutter web project
There are issues with source maps on the latest SDK for Windows. I believe the root cause is this: https://github.com/dart-lang/sdk/issues/37364
Note there is a pending fix which should resolve your issue.
Rishabh
Experienced Software Engineer with a demonstrated history of working in the e-learning industry. Skilled in Core Java, Management, Flutter, and Dart. Strong engineering professional with a Bachelor's degree focused in Computer Science from Bipin Chandra Tripathi Kumaon Engineering College.
Updated on December 12, 2022Comments
-
Rishabh over 1 year
I started a new Flutter web Project and following all steps of the installation correctly. When I started to Debugging it or running it. This is the log I am getting while running. It opens the chrome window also and nothing is rendering on the screen. I didn't modify any of pre-generated file like
main.dart
and others.[INFO] Connecting to the build daemon... [INFO] Generating build script... [INFO] Generating build script completed, took 527ms [INFO] [INFO] Starting daemon... [INFO] Initializing inputs [INFO] Reading cached asset graph... [INFO] Reading cached asset graph completed, took 490ms [INFO] Checking for updates since last build... [INFO] Checking for updates since last build completed, took 1.5s [INFO] Initializing inputs [INFO] Reading cached asset graph... [INFO] Reading cached asset graph completed, took 490ms [INFO] [INFO] Checking for updates since last build... [INFO] Checking for updates since last build completed, took 1.5s [INFO] [INFO] Setting up file watchers... [INFO] Setting up file watchers completed, took 5ms [INFO] Registering build targets... [INFO] Starting initial build... [INFO] Serving DevTools at http://127.0.0.1:57020 [INFO] Starting resource servers... [INFO] Serving `web` on http://127.0.0.1:57011 [INFO] About to build [web]... [INFO] Running build... [INFO] 1.0s elapsed, 0/0 actions completed. [INFO] Running build completed, took 1.2s [INFO] Caching finalized dependency graph... [INFO] Caching finalized dependency graph completed, took 474ms [INFO] Succeeded after 1.7s with 0 outputs (0 actions) [INFO] ------------------------------------------------------------------------ Unhandled exception: FormatException: Unexpected character (at character 1) Not Found ^ #0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1392:5) #1 _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1259:9) #2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:924:22) #3 _parseJson (dart:convert-patch/convert_patch.dart:29:10) #4 JsonDecoder.convert (dart:convert/json.dart:493:36) #5 JsonCodec.decode (dart:convert/json.dart:151:41) #6 jsonDecode (dart:convert/json.dart:94:10) #7 parse package:source_maps/parser.dart:27 #8 Sources.scriptParsed (package:dwds/src/sources.dart:55:19) <asynchronous suspension> #9 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10) #10 CastStreamSubscription._onData (dart:_internal/async_cast.dart:81:11) #11 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10) #12 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11) #13 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7) #14 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11) #15 _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11) #16 WipDomain.eventStream.<anonymous closure>.<anonymous closure> (package:webkit_inspection_protocol/webkit_inspection_protocol.dart:301:26) #17 _HandlerEventSink.add (dart:async/stream_transformers.dart:228:7) #18 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24) #19 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10) #20 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11) #21 _DelayedData.perform (dart:async/stream_impl.dart:591:14) #22 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:707:11) #23 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:667:7) #24 _microtaskLoop (dart:async/schedule_microtask.dart:41:21) #25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) #26 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13) #27 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
-
Sunny almost 5 yearsflutter doctor shows any error?
-
Rishabh almost 5 years@Sunny nothing
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [Version 10.0.17134.860], locale en-IN) [√] Android toolchain - develop for Android devices (Android SDK version 29.0.0) [√] Android Studio (version 3.4) [√] VS Code (version 1.36.1) [√] Connected device (2 available) • No issues found!
-
Sunny almost 5 yearsThen clean and try again
-
Rishabh almost 5 years@Sunny Already tried nothing happened
-
-
Nidhin Paul almost 5 yearsThis issue is resolved, but we have not (yet) shipped an SDK with the fix.
-
Rishabh almost 5 years@KevinMoore So I have to wait for next update or if there is an alternate way to fix this.