-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the consolecustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.p: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Milestone
Description
I have successfully ported my Flutter application to the web. In debug mode I do not get any errors though if I run the application in profile or release mode (or build it) I get the following network error:
Error while fetching an original source: NetworkError when attempting to fetch resource.
Source URL: org-dartlang-sdk:///sdk/lib/async/future_impl.dart
Logged as:
Error: js_helper.dart:1342:36
wrapException js_helper.dart:1342
call$0 async_patch.dart:693
_microtaskLoop schedule_microtask.dart:43
_startMicrotaskLoop schedule_microtask.dart:52
call$1 async_patch.dart:51
invokeClosure js_helper.dart:2017
function main.dart.js:4082
But still, in debug mode it runs as expected.
Steps to Reproduce
My application's source code is available here: https://gitlab.com/testapp-system/testapp-flutter
- Run
flutter run -d web. Will work properly - Run
flutter run -d web --release. Won't work
Expected results: A friendly login screen
Actual results: An empty screen
This may be similar to #46912 .
Logs
Flutter output
flutter run -d web --release -v
[ +15 ms] executing: [/opt/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +18 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] a1fa1a3d261f5cee1e8dd2e7a67132f465054d83
[ ] executing: [/opt/flutter/] git describe --match v*.*.* --first-parent --long --tags
[ +9 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ ] v1.14.3-28-ga1fa1a3d2
[ +4 ms] executing: [/opt/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +4 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/master
[ ] executing: [/opt/flutter/] git ls-remote --get-url origin
[ +4 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +27 ms] executing: [/opt/flutter/] git rev-parse --abbrev-ref HEAD
[ +5 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] master
[ +18 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.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +1 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.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +15 ms] executing: /home/jami/Android/Sdk/platform-tools/adb devices -l
[ +4 ms] Exit code 0 from: /home/jami/Android/Sdk/platform-tools/adb devices -l
[ ] List of devices attached
[ +13 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.
[ +1 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.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +87 ms] Found plugin share at /home/jami/.pub-cache/hosted/pub.dartlang.org/share-0.6.3+5/
[ +5 ms] Found plugin shared_preferences at /home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6/
[ ] Found plugin shared_preferences_macos at
/home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+2/
[ +4 ms] Found plugin shared_preferences_web at
/home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+2/
[ +7 ms] Found plugin url_launcher at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.1/
[ ] Found plugin url_launcher_macos at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+1/
[ +1 ms] Found plugin url_launcher_web at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.0+2/
[ +1 ms] Found plugin webview_flutter at /home/jami/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.19+5/
[ +38 ms] Found plugin share at /home/jami/.pub-cache/hosted/pub.dartlang.org/share-0.6.3+5/
[ ] Found plugin shared_preferences at /home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6/
[ ] Found plugin shared_preferences_macos at
/home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+2/
[ +1 ms] Found plugin shared_preferences_web at
/home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+2/
[ +4 ms] Found plugin url_launcher at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.1/
[ ] Found plugin url_launcher_macos at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+1/
[ ] Found plugin url_launcher_web at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.0+2/
[ ] Found plugin webview_flutter at /home/jami/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.19+5/
[ +27 ms] Generating
/home/jami/StudioProjects/testapp-flutter/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +53 ms] Launching lib/main.dart on Web Server in release mode...
[ +1 ms] Building application for the web...
[ +132 ms] Found plugin share at /home/jami/.pub-cache/hosted/pub.dartlang.org/share-0.6.3+5/
[ ] Found plugin shared_preferences at /home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6/
[ ] Found plugin shared_preferences_macos at
/home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+2/
[ +1 ms] Found plugin shared_preferences_web at
/home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+2/
[ +3 ms] Found plugin url_launcher at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.1/
[ ] Found plugin url_launcher_macos at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+1/
[ ] Found plugin url_launcher_web at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.0+2/
[ ] Found plugin webview_flutter at /home/jami/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.19+5/
[ +9 ms] Found plugin share at /home/jami/.pub-cache/hosted/pub.dartlang.org/share-0.6.3+5/
[ ] Found plugin shared_preferences at /home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6/
[ ] Found plugin shared_preferences_macos at
/home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+2/
[ +1 ms] Found plugin shared_preferences_web at
/home/jami/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+2/
[ +2 ms] Found plugin url_launcher at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.1/
[ ] Found plugin url_launcher_macos at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+1/
[ ] Found plugin url_launcher_web at /home/jami/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.0+2/
[ ] Found plugin webview_flutter at /home/jami/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.19+5/
[ +2 ms] Generating
/home/jami/StudioProjects/testapp-flutter/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +4 ms] Compiling lib/main.dart for the Web...
[ +7 ms] Initializing file store
[ +12 ms] Done initializing file store
[ +52 ms] invalidated build due to missing files:
/home/jami/StudioProjects/testapp-flutter/packages/flutter_tools/lib/src/build_system/targets/web.dart
[ +2 ms] web_entrypoint: Starting due to {InvalidatedReason.inputMissing}
[ +1 ms] web_entrypoint: Complete
[+1434 ms] dart2js: Starting due to {InvalidatedReason.inputChanged}
[+17779 ms] dart2js: Complete
[ +189 ms] web_release_bundle: Starting due to {InvalidatedReason.inputChanged}
[ +61 ms] web_release_bundle: Complete
[ +122 ms] web_service_worker: Starting due to {InvalidatedReason.inputChanged}
[ +82 ms] web_service_worker: Complete
[ +1 ms] Persisting file store
[ +5 ms] Done persisting file store
[ +11 ms] Compiling lib/main.dart for the Web... (completed in 19.8s)
[ +11 ms] Building application for the web... (completed in 19.9s)
[ ] lib/main.dart is being served at http://[::1]:46081
[ ] Warning: Flutter's support for web development is not stable yet and hasn't
[ ] been thoroughly tested in production environments.
[ ] For more information see https://flutter.dev/web
[ ] 🔥 To hot restart changes while running, press "r". To hot restart (and refresh the browser), press "R".
[ ] For a more detailed help message, press "h". To quit, press "q".
[+43610 ms] Application finished.
[ +18 ms] "flutter run" took 63,870ms.
Flutter analyze
flutter analyze
Analyzing testapp-flutter...
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: ClassScore.classId • lib/classScore.dart:12:7 • must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: JoinTestScoreTile.name • lib/classScore.dart:211:7 • must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: ResponsiveDrawerScaffold.body, ResponsiveDrawerScaffold.title,
ResponsiveDrawerScaffold.appBarLeading, ResponsiveDrawerScaffold.appBarActions,
ResponsiveDrawerScaffold.appBarBottom, ResponsiveDrawerScaffold.floatingActionButtonLocation,
ResponsiveDrawerScaffold.floatingActionButton • lib/drawer.dart:178:7 • must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: EditClass.classData • lib/editClass.dart:10:7 • must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: StudentList.itemBuilder • lib/editClass.dart:238:7 • must_be_immutable
info • Avoid empty statements • lib/editExercise.dart:82:59 • empty_statements
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: EditJoinTest.testData • lib/editJoinTest.dart:14:7 • must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: Exercises.selectedExercises • lib/exercises.dart:11:7 • must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: ExercisesTabBody.selectedExercises • lib/exercises.dart:131:7 •
must_be_immutable
info • This method overrides a method annotated as @mustCallSuper in 'AutomaticKeepAliveClientMixin', but doesn't
invoke the overridden method • lib/exercises.dart:193:10 • must_call_super
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: TopicExerciseTile.exercises, TopicExerciseTile.selectedExercises •
lib/exercises.dart:210:7 • must_be_immutable
info • The value of the field 'optionStyle' isn't used • lib/login.dart:39:26 • unused_field
info • Avoid using unnecessary statements • lib/randomTest.dart:125:21 • unnecessary_statements
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: RandomBear.type, RandomBear.offset, RandomBear.scale • lib/style.dart:67:7 •
must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: CenterProgress.label • lib/style.dart:97:7 • must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: TestScoreDetailTile.testId, TestScoreDetailTile.timestamp •
lib/userScore.dart:153:7 • must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: TestScoreDetail.score, TestScoreDetail.testId, TestScoreDetail.timestamp •
lib/userScore.dart:211:7 • must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: JoinTestTimer.time, JoinTestTimer.color • lib/writeTest.dart:152:7 •
must_be_immutable
info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its
instance fields aren't final: ExerciseBox.data, ExerciseBox.selectedAnswers • lib/writeTest.dart:214:7 •
must_be_immutable
info • The getter doesn't override an inherited getter • lib/writeTest.dart:425:12 •
override_on_non_overriding_member
20 issues found. (ran in 7.6s)
Flutter doctor
flutter doctor -v
[✓] Flutter (Channel master, v1.14.4-pre.28, on Linux, locale en_US.UTF-8)
• Flutter version 1.14.4-pre.28 at /opt/flutter
• Framework revision a1fa1a3d26 (3 days ago), 2020-01-22 14:58:46 -0800
• Engine revision 83a64b7233
• Dart version 2.8.0 (build 2.8.0-dev.3.0 ef0c7f16e6)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /my/path/toAndroid/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /opt/android-studio-beta/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• CHROME_EXECUTABLE = /usr/bin/chromium
[✓] Linux toolchain - develop for Linux desktop
• clang++ 9.0.1
• GNU Make 4.2.1
[✓] Android Studio (version 3.6)
• Android Studio at /opt/android-studio-beta
• Flutter plugin version 42.2.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] Connected device (3 available)
• Linux • Linux • linux-x64 • Linux
• Chrome • chrome • web-javascript • unknown
• Web Server • web-server • web-javascript • Flutter Tools
• No issues found!
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the consolecustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.p: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.