Comments (7)
I can reproduce this bug.
- flutter create web_sample
- cd web_sample
- flutter build web --no-web-resources-cdn
- cd build/web
- dart pub global run dhttpd (I installed dhttpd globally with Pub)
- open a new chrome window and open the network tab
- go to localhost, under the port of dhttpd
- All assets, except a variant of the Roboto font (a TTF file) come from localhost. The Roboto font comes from
fonts.gstatic.com
(ignore thepageScript.js
in my screenshot, that is a local chrome extension that I have)
[✓] Flutter (Channel stable, 3.22.0, on macOS 14.4.1 23E224 darwin-x64, locale
en-BE)
• Flutter version 3.22.0 on channel stable at
/Users/navaronbracke/Documents/flutter
• Upstream repository [email protected]:navaronbracke/flutter.git
• FLUTTER_GIT_URL = [email protected]:navaronbracke/flutter.git
• Framework revision 5dcb86f68f (12 days ago), 2024-05-09 07:39:20 -0500
• Engine revision f6344b75dc
• Dart version 3.4.0
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/navaronbracke/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/navaronbracke/Library/Android/sdk
• 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)
[✓] VS Code (version 1.89.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.88.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 14.4.1 23E224 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.209
[✓] Network resources
• All expected network resources are available.
• No issues found!
from flutter.
I checked this on my end and saw the same result as @navaronbracke shared above.
KFOmCnqEu92Fr1Me5WZLCzYlKw.ttf
font comes from https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Me5WZLCzYlKw.ttf
. But I see script files come from local host (canvaskit.js for eg).
@cfsbhawkins As I see above, canvaskit.js
file is still fetched from CDN. Do you have any specific configuration on web
module? Could you confirm this on a new Flutter project?
from flutter.
I checked this on my end and saw the same result as @navaronbracke shared above.
KFOmCnqEu92Fr1Me5WZLCzYlKw.ttf
font comes fromhttps://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Me5WZLCzYlKw.ttf
. But I see script files come from local host (canvaskit.js for eg).@cfsbhawkins As I see above,
canvaskit.js
file is still fetched from CDN. Do you have any specific configuration onweb
module? Could you confirm this on a new Flutter project?
Yes can confirm on a new project pulls from gstatic cdn after upgrade to 3.22
Steps to reproduce
- New Project created under 3.19.6
- Build with flutter build web --no-web-resources-cdn --web-renderer canvaskit --release
- Launch site with dhttpd, canvaskit comes from local copies, that roboto font is only one that loads from CDN.
- run flutter upgrade
- delete web folder in project to create new index.html from 3.22 template.
- run flutter create --platforms=web .
- Build with flutter build web --no-web-resources-cdn --web-renderer canvaskit --release
- Launch site with dhttpd, canvaskit and js files load from google CDN and not local image.
from flutter.
Repo: https://github.com/cfsbhawkins/web_test
from flutter.
Thanks for your update, @cfsbhawkins. I see the issue. On a newly created project or re-created web
module, canvaskit.js
and canvaskit.wasm
files are used from gstatic.com
instead of localhost.
flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.1 23B74 darwin-x64, locale en-VN)
• Flutter version 3.22.1 on channel stable at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision a14f74ff3a (11 hours ago), 2024-05-22 11:08:21 -0500
• Engine revision 55eae6864b
• Dart version 3.4.1
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode15.3.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• 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
• android-studio-dir = /Applications/Android Studio.app/
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.89.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.88.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.76
[✓] Network resources
• All expected network resources are available.
• No issues found!
[!] Flutter (Channel master, 3.22.0-44.0.pre.10, on macOS 14.1 23B74 darwin-x64, locale en-VN)
• Flutter version 3.22.0-44.0.pre.10 on channel master at /Users/huynq/Documents/GitHub/flutter_master
! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fe0932f2c0 (76 minutes ago), 2024-05-22 22:19:25 -0400
• Engine revision b8b82454e3
• Dart version 3.5.0 (build 3.5.0-178.0.dev)
• DevTools version 2.36.0-dev.10
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode15.3.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• 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
• android-studio-dir = /Applications/Android Studio.app/
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.89.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.88.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.76
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
from flutter.
from flutter.
Putting the following in the web/flutter_bootstrap.js fixes the issue:
{{flutter_js}}
{{flutter_build_config}}
_flutter.loader.load({
config: {
canvasKitBaseUrl: "canvaskit/"
},
serviceWorkerSettings: {
serviceWorkerVersion: {{flutter_service_worker_version}}
}
});
from flutter.
Related Issues (20)
- Can't interact with app build for integration testing HOT 5
- [google_maps_flutter] setMapStyle should not be deprecated HOT 2
- [two_dimensional_scrollables] TapGestureRecognizer of TableSpan not working after setState() HOT 8
- [Impeller] Latest Vulkan SDK introduces validation failures.
- List/Detail template crashes on horizontal orientation of foldable android emulators HOT 2
- SliverAppBar should allow for a custom scroll physics or some control over collapse/expand speed, or should at least give an option to mirror native iOS behavior HOT 3
- please add menu mode to FilterChip HOT 1
- Add display dpi information to MediaQuery to calculate display size HOT 7
- adb devices does find my phone.flutter devices does not find my phone. HOT 2
- 3.22.1 does not support win7 HOT 2
- How do I use the same name and Bundle ID for my iOS and MacOS app? Can anyone help? HOT 1
- Failed to launches my Flutter WASM compiled web app (WebAssembly.compileStreaming() Compiling function failed HOT 4
- Keyboard Flickering Issue on Android Devices HOT 2
- Building Android always leaves a java process running. HOT 3
- [iOS Crash] Exiting from iOS multitasking UI may cause crash due to exit. HOT 10
- App hanging for at least 2000 ms - Issue only in production environment, unable to replicate HOT 2
- availableCameras HOT 1
- [go_router] Unwanted rerender with go_router when using push HOT 3
- Flutter arch document HOT 2
- Go Router test with StatefulShellRoute mock throws type error: The following _TypeError was thrown building KeyedSubtree-[GlobalKey#3ccf0]: type 'Null' is not a subtype of type 'StatefulElement' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.