Closed govarthananve closed 3 months ago
Thank you for the report. Reproduced this on Flutter master channel as well.
I think this is working as intended. As outlined in the bootstrap docs here https://docs.flutter.dev/platform-integration/web/bootstrapping
if you want to customize the bootstrapping process, you can either:
a) provide all your bootstrapping code in web/flutter_bootstrap.js
and leave the script tag that loads that script in the index.html
b) remove the flutter_bootstrap.js
script tag and do everything in the index.html
c) do step a, but inline its contents into the index.html instead, using the template token specific to that purpose
However, your code sample indicates you mixed up the two approaches by including both the bootstrap script and the template tokens
@navaronbracke is correct. The code ends up loading bootstrap code twice.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Steps to reproduce
Expected results
without flutter 3.22 Uncaught SyntaxError: Identifier '_scriptUrls' has already been declared
Actual results
without any console error
Code sample
Code sample
```dartScreenshots or Video
Screenshots / Video demonstration
[Upload media here]Logs
Logs
```console main.dart.js:1 Uncaught SyntaxError: Identifier '_scriptUrls' has already been declared (at main.dart.js:1:1) This app is linked to the debug service: ws://127.0.0.1:60804/YOHJ6ybC1gI=/ws ```Flutter Doctor output
Doctor output
```console flutter doctor -v [✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale en-IN) • Flutter version 3.22.2 on channel stable at /Users/govarthanan/BT/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 761747bfc5 (11 days ago), 2024-06-05 22:15:13 +0200 • Engine revision edd8546116 • Dart version 3.4.3 • DevTools version 2.34.3 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at /Users/govarthanan/Library/Android/sdk • Platform android-33, build-tools 33.0.1 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15F31d • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.3) • 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 17.0.10+0-17.0.10b1087.21-11572160) [✓] IntelliJ IDEA Community Edition (version 2024.1.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • 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 [✓] VS Code (version 1.90.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.90.0 [✓] Connected device (2 available) • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.5 23F79 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.62 ! Error: Browsing on the local area network for AMA’s iPhone . Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) ! Error: Browsing on the local area network for GiPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources • All expected network resources are available. • No issues found! ```