build icon indicating copy to clipboard operation
build copied to clipboard

web_compilers: Need a better error when there are unsupported platforms

Open kevmoo opened this issue 6 years ago • 23 comments

Just went through this

[WARNING] build_web_compilers:entrypoint on web/main.dart: Skipping compiling repo_manager|web/main.dart with ddc because some of its
transitive libraries have sdk dependencies that not supported on this platform:

repo_manager|lib/src/util.dart
pana|lib/src/utils.dart
github|lib/server.dart
github|lib/src/server/hooks.dart

https://github.com/dart-lang/build/blob/master/docs/faq.md#how-can-i-resolve-skipped-compiling-warnings

I'd love to see the link going from web/main.dart through to the library causing the problem.

kevmoo avatar Apr 18 '19 23:04 kevmoo

Should we make a more general tool for this and just link it? I don't think we want gigantic error messages...

jakemac53 avatar Apr 19 '19 15:04 jakemac53

gigantic error message is better than incomplete error message. I had to do a lot of guess work to figure out what was causing the problem!

kevmoo avatar Apr 19 '19 16:04 kevmoo

There are other use cases for wanting to know why you depend on some dart library though - which is why I was thinking a more general tool might make sense?

jakemac53 avatar Apr 19 '19 16:04 jakemac53

I think a reasonable path forward here would be to output a file when we hit this case that represents all the paths to these bad libraries, probably DOT file format so users can easily visualize that in whatever they would like?

jakemac53 avatar Apr 19 '19 16:04 jakemac53

Actually nvm I think something simpler is probably fine, will just output the shortest path to each unsupported module. Note this will be module paths not import paths.

jakemac53 avatar Apr 19 '19 17:04 jakemac53

Ok, so I tried doing that with just the module graph and it ends up just being confusing, see this output from repo_manager before it was fixed.

[WARNING] build_web_compilers:entrypoint on web/main.dart:
Some modules contained libraries that were incompatible with the current platform (ddc).

Module name: repo_manager|lib/src/analysis_data.dart

Problematic libraries:
  repo_manager|lib/src/util.dart
  repo_manager|lib/src/license_utils.dart

Module dependency path:
  repo_manager|lib/src/analysis_data.dart

Module name: pana|lib/src/json_converters.dart

Problematic libraries:
  pana|lib/src/utils.dart

Module dependency path:
  repo_manager|lib/src/analysis_data.dart
    pana|lib/models.dart
      pana|lib/src/json_converters.dart

Module name: github|lib/server.dart

Problematic libraries:
  github|lib/server.dart
  github|lib/src/server/hooks.dart

Module dependency path:
  repo_manager|lib/src/analysis_data.dart
    github|lib/server.dart

https://github.com/dart-lang/build/blob/master/docs/faq.md#how-can-i-resolve-skipped-compiling-warnings

The dart files here are misleading - none of the listed paths actually exist in terms of the real dart imports. Obviously the formatting etc could be cleaned up but I think we would have to drop back to the actual dart import paths to provide useful feedback which would be a fair bit more expensive.

jakemac53 avatar Apr 19 '19 17:04 jakemac53

How can we go about debugging this in the meantime? I'm getting same error combined with "Unable to read module information for package:flutter, make sure you have a dependency on it in your pubspec.". Of course there is no flutter in pub deps or elsewhere, only flutter_web. I can't figure out what the problem is. The only thing that works is downgrading build_web_compilers to 1.2.2. Then the error "Unable to read module information for package:flutter" still prints, but it seems that it is not treated as fatal. Resulting web app works without observed defects.

GreenAppers avatar Aug 10 '19 21:08 GreenAppers

Ah. Finally found it. An import dart:io.

GreenAppers avatar Aug 10 '19 23:08 GreenAppers

What except dart:io could cause this? I've searched, io package doesn't seem to be referenced in my code

rostopira avatar Sep 26 '19 14:09 rostopira

I've removed every import from and web endpoint, except flutter/material and still getting an error I've a lot of libraries in pubspec.yaml, but they are used in different endpoint Dev channel v1.10.6

rostopira avatar Sep 26 '19 14:09 rostopira

If you are importing from lib/src/ in your own package that can cause this (you can end up importing a module that contains more libraries in the same package that you didn't actually directly import).

Also flutter itself definitely has dart:io imports but we have a (hopefully temporary) whitelist for it. You might need to update flutter to get that?

jakemac53 avatar Sep 26 '19 14:09 jakemac53

I have lib/web_main.dart (without any imports except material) and using flutter build web -t lib/web_main.dart --verbose command for build. I have no issues when using flutter run -d web however

I'm already on latest flutter even tried master channel

rostopira avatar Sep 26 '19 15:09 rostopira

I don't believe flutter build web uses this package. What error are you seeing?

jakemac53 avatar Sep 26 '19 15:09 jakemac53

[   +3 ms] Some modules contained libraries that were incompatible with the current platform.
[        ] #0      Module.computeTransitiveDependencies
(package:build_modules/src/modules.dart:176:7)
           <asynchronous suspension>
           #1      bootstrapDart2Js (package:flutter_tools/src/build_runner/build_script.dart:425:45)
           <asynchronous suspension>
           #2      FlutterWebEntrypointBuilder.build
           (package:flutter_tools/src/build_runner/build_script.dart:248:13)
           <asynchronous suspension>
           #3      runBuilder.buildForInput (package:build/src/generate/run_builder.dart:45:21)

rostopira avatar Sep 26 '19 15:09 rostopira

Even tried this as entry point:

import 'package:flutter/material.dart';

main() => WidgetsApp(color: Color(0xFFFF0000));

Still error

rostopira avatar Sep 26 '19 15:09 rostopira

Interesting... cc @jonahwilliams maybe something changed here so it is using this package for release builds as well.

In that case we likely need to whitelist the flutter packages in the call to computeTransitiveDependencies for this builder.

jakemac53 avatar Sep 26 '19 15:09 jakemac53

The most strange thing, that it were working fine yesterday, and still working fine in project which doesn't have dependencies in pubspec except flutter

rostopira avatar Sep 26 '19 15:09 rostopira

It is possible that this is compiling some additional entrypoints? There should be some additional log lines that tell you what app it was actually trying to compile (should be right above this).

jakemac53 avatar Sep 26 '19 15:09 jakemac53

Here is full log, but I don't see anything about other entry-points

$ flutter build web -t lib/dummy_main.dart --verbose
[  +15 ms] executing: [/Users/rostopira/flutter/] git -c log.showSignature=false log -n 1
--pretty=format:%H
[  +30 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] cc3ca9a916cb1da851a1f36432154a534787da99
[        ] executing: [/Users/rostopira/flutter/] git describe --match v*.*.* --first-parent --long
--tags
[  +10 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.10.6-0-gcc3ca9a91
[   +6 ms] executing: [/Users/rostopira/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +8 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/dev
[        ] executing: [/Users/rostopira/flutter/] git ls-remote --get-url origin
[  +11 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +36 ms] executing: [/Users/rostopira/flutter/] git rev-parse --abbrev-ref HEAD
[   +9 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] dev
[   +4 ms] executing: sw_vers -productName
[  +14 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +11 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.15
[        ] executing: sw_vers -buildVersion
[  +10 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 19A558d
[   +8 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[  +47 ms] Found plugin app_review at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/app_review-1.0.0/
[   +7 ms] Found plugin battery at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/battery-0.3.0+5/
[   +5 ms] Found plugin cloud_firestore at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+4/
[   +1 ms] Found plugin cloud_functions at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_functions-0.4.1+1/
[   +5 ms] Found plugin device_info at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-0.4.0+2/
[   +1 ms] Found plugin dimon_audio_manager_plugin at
/Users/rostopira/IdeaProjects/dimon_audio_manager_plugin/
[   +1 ms] Found plugin fast_qr_reader_view at
/Users/rostopira/flutter/.pub-cache/git/fast_qr_reader_view-05d629020b19b426c5d8f20a88d5a810ff304d7b/
[   +2 ms] Found plugin firebase_admob at
/Users/rostopira/flutter/.pub-cache/git/firebase_admob-6e8342daec214c53a8c67d718375b47d6314fe34/
[   +1 ms] Found plugin firebase_analytics at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-5.0.2/
[   +1 ms] Found plugin firebase_auth at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+5/
[   +1 ms] Found plugin firebase_core at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+9/
[   +1 ms] Found plugin firebase_crashlytics at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-0.1.0+3/
[   +1 ms] Found plugin firebase_remote_config at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_remote_config-0.2.0+7/
[   +1 ms] Found plugin firebase_storage at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.6/
[   +3 ms] Found plugin flutter_inapp_purchase at
/Users/rostopira/IdeaProjects/flutter_inapp_purchase/
[   +5 ms] Found plugin flutter_webrtc at /Users/rostopira/IdeaProjects/flutter-webrtc/
[  +11 ms] Found plugin package_info at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+6/
[   +3 ms] Found plugin path_provider at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.3.0/
[   +6 ms] Found plugin shared_preferences at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+4/
[   +5 ms] Found plugin url_launcher at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.1.3/
[   +2 ms] Found plugin webview_flutter at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.14+1/
[  +28 ms] Found plugin app_review at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/app_review-1.0.0/
[   +2 ms] Found plugin battery at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/battery-0.3.0+5/
[   +1 ms] Found plugin cloud_firestore at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+4/
[   +1 ms] Found plugin cloud_functions at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_functions-0.4.1+1/
[   +2 ms] Found plugin device_info at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-0.4.0+2/
[        ] Found plugin dimon_audio_manager_plugin at
/Users/rostopira/IdeaProjects/dimon_audio_manager_plugin/
[   +1 ms] Found plugin fast_qr_reader_view at
/Users/rostopira/flutter/.pub-cache/git/fast_qr_reader_view-05d629020b19b426c5d8f20a88d5a810ff304d7b/
[   +1 ms] Found plugin firebase_admob at
/Users/rostopira/flutter/.pub-cache/git/firebase_admob-6e8342daec214c53a8c67d718375b47d6314fe34/
[   +1 ms] Found plugin firebase_analytics at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-5.0.2/
[        ] Found plugin firebase_auth at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+5/
[        ] Found plugin firebase_core at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+9/
[        ] Found plugin firebase_crashlytics at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-0.1.0+3/
[        ] Found plugin firebase_remote_config at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_remote_config-0.2.0+7/
[        ] Found plugin firebase_storage at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.6/
[   +1 ms] Found plugin flutter_inapp_purchase at
/Users/rostopira/IdeaProjects/flutter_inapp_purchase/
[   +2 ms] Found plugin flutter_webrtc at /Users/rostopira/IdeaProjects/flutter-webrtc/
[   +6 ms] Found plugin package_info at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+6/
[   +2 ms] Found plugin path_provider at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.3.0/
[   +4 ms] Found plugin shared_preferences at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+4/
[   +4 ms] Found plugin url_launcher at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.1.3/
[   +1 ms] Found plugin webview_flutter at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.14+1/
[  +18 ms] executing: /usr/bin/xcodebuild -version
[  +89 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[        ] Xcode 11.0
           Build version 11A419c
[  +20 ms] Compiling lib/dummy_main.dart for the Web...
[   +6 ms] Found plugin app_review at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/app_review-1.0.0/
[   +2 ms] Found plugin battery at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/battery-0.3.0+5/
[   +1 ms] Found plugin cloud_firestore at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+4/
[        ] Found plugin cloud_functions at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_functions-0.4.1+1/
[   +2 ms] Found plugin device_info at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-0.4.0+2/
[        ] Found plugin dimon_audio_manager_plugin at
/Users/rostopira/IdeaProjects/dimon_audio_manager_plugin/
[   +1 ms] Found plugin fast_qr_reader_view at
/Users/rostopira/flutter/.pub-cache/git/fast_qr_reader_view-05d629020b19b426c5d8f20a88d5a810ff304d7b/
[   +1 ms] Found plugin firebase_admob at
/Users/rostopira/flutter/.pub-cache/git/firebase_admob-6e8342daec214c53a8c67d718375b47d6314fe34/
[        ] Found plugin firebase_analytics at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-5.0.2/
[        ] Found plugin firebase_auth at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+5/
[        ] Found plugin firebase_core at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+9/
[        ] Found plugin firebase_crashlytics at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-0.1.0+3/
[        ] Found plugin firebase_remote_config at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_remote_config-0.2.0+7/
[        ] Found plugin firebase_storage at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.6/
[   +1 ms] Found plugin flutter_inapp_purchase at
/Users/rostopira/IdeaProjects/flutter_inapp_purchase/
[   +1 ms] Found plugin flutter_webrtc at /Users/rostopira/IdeaProjects/flutter-webrtc/
[   +5 ms] Found plugin package_info at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.0+6/
[   +1 ms] Found plugin path_provider at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.3.0/
[   +2 ms] Found plugin shared_preferences at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+4/
[   +2 ms] Found plugin url_launcher at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.1.3/
[   +1 ms] Found plugin webview_flutter at
/Users/rostopira/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.14+1/
[+6770 ms] Starting daemon...
[ +145 ms] Initializing inputs
[   +6 ms] Reading cached asset graph...
[ +165 ms] Reading cached asset graph completed, took 164ms

[ +175 ms] Checking for updates since last build...
[ +627 ms] Checking for updates since last build completed, took 627ms

[   +6 ms] Initializing inputs
[   +1 ms] Reading cached asset graph...
[        ] Reading cached asset graph completed, took 164ms
[        ] Checking for updates since last build...
[        ] Checking for updates since last build completed, took 627ms
[ +775 ms] About to build [web, test]...
[   +3 ms] Running build...
[ +211 ms] Unable to read module information for package:googleapis_auth, make sure you have a
dependency on it in your pubspec.
[   +6 ms] Unable to read module information for package:service_worker, make sure you have a
dependency on it in your pubspec.
[ +197 ms] Running dart2js with
--libraries-spec="/Users/rostopira/flutter/bin/cache/flutter_web_sdk/libraries.json" -O4 -o
packages/baby_monitor/dummy_main_web_entrypoint.dart.js
--packages=".package-d6c66ca705cc98cfe0512669021b2805" -Ddart.vm.product=true
package:baby_monitor/dummy_main_web_entrypoint.dart

[  +20 ms] Some modules contained libraries that were incompatible with the current platform.
[   +1 ms] #0      Module.computeTransitiveDependencies
(package:build_modules/src/modules.dart:176:7)
           <asynchronous suspension>
           #1      bootstrapDart2Js (package:flutter_tools/src/build_runner/build_script.dart:425:45)
           <asynchronous suspension>
           #2      FlutterWebEntrypointBuilder.build
           (package:flutter_tools/src/build_runner/build_script.dart:248:13)
           <asynchronous suspension>
           #3      runBuilder.buildForInput (package:build/src/generate/run_builder.dart:45:21)
           <asynchronous suspension>
           #4      MappedListIterable.elementAt (dart:_internal/iterable.dart:415:29)
           #5      ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
           #6      Future.wait (dart:async/future.dart:393:26)
           #7      runBuilder.<anonymous closure> (package:build/src/generate/run_builder.dart:51:36)
           #8      _rootRun (dart:async/zone.dart:1124:13)
           #9      _CustomZone.run (dart:async/zone.dart:1021:19)
           #10     _runZoned (dart:async/zone.dart:1516:10)
           #11     runZoned (dart:async/zone.dart:1500:12)
           #12     scopeLogAsync (package:build/src/builder/logging.dart:22:3)
           #13     runBuilder (package:build/src/generate/run_builder.dart:51:9)
           <asynchronous suspension>
           #14     _SingleBuild._runForInput.<anonymous closure>.<anonymous closure>.<anonymous
           closure> (package:build_runner_core/src/generate/build_impl.dart:472:19)
           #15     _NoOpBuilderActionTracker.trackStage
           (package:build_runner_core/src/generate/performance_tracker.dart:300:15)
           #16     _SingleBuild._runForInput.<anonymous closure>.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:470:23)
           <asynchronous suspension>
           #17     NoOpTimeTracker.track (package:timing/src/timing.dart:222:44)
           #18     _SingleBuild._runForInput.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:429:22)
           #19     Pool.withResource (package:pool/pool.dart:127:28)
           <asynchronous suspension>
           #20     _SingleBuild._runForInput
           (package:build_runner_core/src/generate/build_impl.dart:425:17)
           #21     _SingleBuild._runBuilder.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:373:38)
           #22     MappedIterator.moveNext (dart:_internal/iterable.dart:393:18)
           #23     Future.wait (dart:async/future.dart:393:26)
           #24     _SingleBuild._runBuilder
           (package:build_runner_core/src/generate/build_impl.dart:372:36)
           <asynchronous suspension>
           #25     _SingleBuild._runPhases.<anonymous closure>.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:319:20)
           <asynchronous suspension>
           #26     _NoOpBuildPerformanceTracker.trackBuildPhase
           (package:build_runner_core/src/generate/performance_tracker.dart:184:15)
           #27     _SingleBuild._runPhases.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:315:47)
           <asynchronous suspension>
           #28     NoOpTimeTracker.track (package:timing/src/timing.dart:222:44)
           #29     _SingleBuild._runPhases
           (package:build_runner_core/src/generate/build_impl.dart:309:32)
           #30     logTimedAsync (package:build_runner_core/src/logging/logging.dart:25:30)
           <asynchronous suspension>
           #31     _SingleBuild._safeBuild.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:266:26)
           <asynchronous suspension>
           #32     _rootRun (dart:async/zone.dart:1124:13)
           #33     _CustomZone.run (dart:async/zone.dart:1021:19)
           #34     _runZoned (dart:async/zone.dart:1516:10)
           #35     runZoned (dart:async/zone.dart:1500:12)
           #36     _SingleBuild._safeBuild
           (package:build_runner_core/src/generate/build_impl.dart:261:5)
           #37     _SingleBuild.run (package:build_runner_core/src/generate/build_impl.dart:208:24)
           <asynchronous suspension>
           #38     BuildImpl.run (package:build_runner_core/src/generate/build_impl.dart:96:42)
           #39     BuildRunnerDaemonBuilder.build
           (package:build_runner/src/daemon/daemon_builder.dart:100:35)
           <asynchronous suspension>
           #40     Server._build.<anonymous closure> (package:build_daemon/src/server.dart:122:25)
           #41     Pool.withResource (package:pool/pool.dart:127:28)
           <asynchronous suspension>
           #42     Server._build (package:build_daemon/src/server.dart:119:13)
           #43     Server.listen.<anonymous closure>.<anonymous closure>
           (package:build_daemon/src/server.dart:85:17)
           <asynchronous suspension>
           #44     _rootRunUnary (dart:async/zone.dart:1132:38)
           #45     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
           #46     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
           #47     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
           #48     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
           #49     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:764:19)
           #50     _StreamController._add (dart:async/stream_controller.dart:640:7)
           #51     _StreamController.add (dart:async/stream_controller.dart:586:5)
           #52     new WebSocketImpl.fromSocket.<anonymous closure>
           (package:web_socket_channel/src/copy/web_socket_impl.dart:719:21)
           #53     _rootRunUnary (dart:async/zone.dart:1132:38)
           #54     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
           #55     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
           #56     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
           #57     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
           #58     _SinkTransformerStreamSubscription._add
           (dart:async/stream_transformers.dart:68:11)
           #59     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
           #60     _WebSocketProtocolTransformer._messageFrameEnd
           (package:web_socket_channel/src/copy/web_socket_impl.dart:316:22)
           #61     _WebSocketProtocolTransformer.add
           (package:web_socket_channel/src/copy/web_socket_impl.dart:214:46)
           #62     _SinkTransformerStreamSubscription._handleData
           (dart:async/stream_transformers.dart:120:24)
           #63     _rootRunUnary (dart:async/zone.dart:1132:38)
           #64     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
           #65     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
           #66     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
           #67     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
           #68     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:764:19)
           #69     _StreamController._add (dart:async/stream_controller.dart:640:7)
           #70     _StreamController.add (dart:async/stream_controller.dart:586:5)
           #71     _Socket._onData (dart:io-patch/socket_patch.dart:1829:41)
           #72     _rootRunUnary (dart:async/zone.dart:1136:13)
           #73     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
           #74     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
           #75     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
           #76     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
           #77     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:764:19)
           #78     _StreamController._add (dart:async/stream_controller.dart:640:7)
           #79     _StreamController.add (dart:async/stream_controller.dart:586:5)
           #80     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1377:33)
           #81     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:897:14)
           #82     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
           #83     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
           #84     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
           #85     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

[+1052 ms] 1.5s elapsed, 72/73 actions completed.
[+1098 ms] 2.6s elapsed, 72/73 actions completed.
[+1100 ms] 3.7s elapsed, 72/73 actions completed.
[+1000 ms] 4.7s elapsed, 72/73 actions completed.
[ +183 ms] Dart2Js finished with:

                    Compiled 15,336,016 characters Dart to 220,198 characters JavaScript in 4.34
                    seconds
                    Dart file package:baby_monitor/dummy_main_web_entrypoint.dart compiled to
                    JavaScript: packages/baby_monitor/dummy_main_web_entrypoint.dart.js

[ +156 ms] Running build completed, took 4.9s

[        ] Caching finalized dependency graph...
[   +2 ms] Caching finalized dependency graph completed, took 107ms

[   +3 ms] Some modules contained libraries that were incompatible with the current platform.
[        ] #0      Module.computeTransitiveDependencies
(package:build_modules/src/modules.dart:176:7)
           <asynchronous suspension>
           #1      bootstrapDart2Js (package:flutter_tools/src/build_runner/build_script.dart:425:45)
           <asynchronous suspension>
           #2      FlutterWebEntrypointBuilder.build
           (package:flutter_tools/src/build_runner/build_script.dart:248:13)
           <asynchronous suspension>
           #3      runBuilder.buildForInput (package:build/src/generate/run_builder.dart:45:21)
           <asynchronous suspension>
           #4      MappedListIterable.elementAt (dart:_internal/iterable.dart:415:29)
           #5      ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
           #6      Future.wait (dart:async/future.dart:393:26)
           #7      runBuilder.<anonymous closure> (package:build/src/generate/run_builder.dart:51:36)
           #8      _rootRun (dart:async/zone.dart:1124:13)
           #9      _CustomZone.run (dart:async/zone.dart:1021:19)
           #10     _runZoned (dart:async/zone.dart:1516:10)
           #11     runZoned (dart:async/zone.dart:1500:12)
           #12     scopeLogAsync (package:build/src/builder/logging.dart:22:3)
           #13     runBuilder (package:build/src/generate/run_builder.dart:51:9)
           <asynchronous suspension>
           #14     _SingleBuild._runForInput.<anonymous closure>.<anonymous closure>.<anonymous
           closure> (package:build_runner_core/src/generate/build_impl.dart:472:19)
           #15     _NoOpBuilderActionTracker.trackStage
           (package:build_runner_core/src/generate/performance_tracker.dart:300:15)
           #16     _SingleBuild._runForInput.<anonymous closure>.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:470:23)
           <asynchronous suspension>
           #17     NoOpTimeTracker.track (package:timing/src/timing.dart:222:44)
           #18     _SingleBuild._runForInput.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:429:22)
           #19     Pool.withResource (package:pool/pool.dart:127:28)
           <asynchronous suspension>
           #20     _SingleBuild._runForInput
           (package:build_runner_core/src/generate/build_impl.dart:425:17)
           #21     _SingleBuild._runBuilder.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:373:38)
           #22     MappedIterator.moveNext (dart:_internal/iterable.dart:393:18)
           #23     Future.wait (dart:async/future.dart:393:26)
           #24     _SingleBuild._runBuilder
           (package:build_runner_core/src/generate/build_impl.dart:372:36)
           #25     _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
           #26     _SingleBuild._runBuilder
           (package:build_runner_core/src/generate/build_impl.dart:370:40)
           #27     _SingleBuild._runPhases.<anonymous closure>.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:319:20)
           #28     _asyncThenWrapperHelper.<anonymous closure>
           (dart:async-patch/async_patch.dart:71:64)
           #29     _rootRunUnary (dart:async/zone.dart:1132:38)
           #30     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
           #31     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
           #32     Future._propagateToListeners.handleValueCallback
           (dart:async/future_impl.dart:678:45)
           #33     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
           #34     Future._completeWithValue (dart:async/future_impl.dart:522:5)
           #35     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
           #36     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
           #37     _SingleBuild._matchingPrimaryInputs
           (package:build_runner_core/src/generate/build_impl.dart)
           #38     _asyncThenWrapperHelper.<anonymous closure>
           (dart:async-patch/async_patch.dart:71:64)
           #39     _rootRunUnary (dart:async/zone.dart:1132:38)
           #40     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
           #41     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
           #42     Future._propagateToListeners.handleValueCallback
           (dart:async/future_impl.dart:678:45)
           #43     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
           #44     Future._completeWithValue (dart:async/future_impl.dart:522:5)
           #45     Future.wait.<anonymous closure> (dart:async/future.dart:400:22)
           #46     _rootRunUnary (dart:async/zone.dart:1132:38)
           #47     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
           #48     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
           #49     Future._propagateToListeners.handleValueCallback
           (dart:async/future_impl.dart:678:45)
           #50     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
           #51     Future._completeWithValue (dart:async/future_impl.dart:522:5)
           #52     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
           #53     _rootRun (dart:async/zone.dart:1124:13)
           #54     _CustomZone.run (dart:async/zone.dart:1021:19)
           #55     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
           #56     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
           #57     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
           #58     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
           #59     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
           #60     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

[   +1 ms] Failed after 5.1s
[   +6 ms] Compiling lib/dummy_main.dart for the Web... (completed in 13.8s)
[   +2 ms] "flutter web" took 14,146ms.
Failed to compile lib/dummy_main.dart for the Web.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      buildWeb (package:flutter_tools/src/web/compile.dart:62:5)
<asynchronous suspension>
#2      BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:56:11)
<asynchronous suspension>
#3      FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:527:18)
#4      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#5      _rootRunUnary (dart:async/zone.dart:1132:38)
#6      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#7      _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#8      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#9      Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#10     Future._completeWithValue (dart:async/future_impl.dart:522:5)
#11     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#12     _rootRun (dart:async/zone.dart:1124:13)
#13     _CustomZone.run (dart:async/zone.dart:1021:19)
#14     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#15     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#16     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#17     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#18     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#19     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

rostopira avatar Sep 26 '19 15:09 rostopira

Huh, I think maybe flutter tool is stripping out our logger info lines? @jonahwilliams

It looks like it did in fact compile the dummy_main.dart file which I assume is the simple one you made. It is failing when presumably trying to compile some other file.

jakemac53 avatar Sep 26 '19 15:09 jakemac53

Well, IDK why I didn't tried it yesterday, but commenting out all other entrypoints (I have 3) fixed issue. So yeah, it's trying to build other entrypoints

rostopira avatar Sep 27 '19 07:09 rostopira

I've made simple project with two entrypoints to reproduce https://github.com/rostopira/bug_reproduce Should I open new issue for this?

rostopira avatar Sep 27 '19 07:09 rostopira

FWIW we've disabled the unsupported platform checks in the latest flutter

jonahwilliams avatar Oct 07 '19 19:10 jonahwilliams

note that you can use the import_path package to find the import path to libraries that aren't usable on the web

jakemac53 avatar Sep 01 '23 18:09 jakemac53