Comments (9)
Happens the same to me with auto_route dependency in flutter 3.22:
https://pub.dev/packages/auto_route
Update 16/05/24:
Apparently it is not a problem with the package, it is a problem with the latest version of Flutter, in my case it now always appears
Update 17/05/24:
I figured it out a solution for this warning. The problem seems to be with index.html in flutter web due to deprecated packages in Flutter 3.22:
- Inside
<head>
tag Replace:
<script>
// The value below is injected by flutter build, do not touch.
const serviceWorkerVersion = null;
</script>
By:
<script>
// The value below is injected by flutter build, do not touch.
const flutter_service_worker_version = null;
</script>
- And if you are using WebView embedding:
Inside <body>
tag replace:
<script>
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function(engineInitializer) {
engineInitializer.initializeEngine().then(function(appRunner) {
appRunner.runApp();
});
}
});
});
</script>
By:
<script>
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.load({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function(engineInitializer) {
engineInitializer.initializeEngine().then(function(appRunner) {
appRunner.runApp();
});
}
});
});
</script>
Hope it helps :)
from getx.
from getx.
flutter 3.22
from getx.
My web build is busted. First I tried to address the flutter_service_worker_version error, and now when I build, in my index.html I have double quotes around the version value like this:
<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = ""1234567899"";
</script>
So then I manually delete the double quotes, and I still have the following errors:
flutter.js:3 Uncaught (in promise) FlutterLoader.load requires _flutter.buildConfig to be set
<script>
window.addEventListener('load', function (ev) {
// Download main.dart.js
_flutter.loader.load({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function (engineInitializer) {
engineInitializer.initializeEngine().then(function (appRunner) {
appRunner.runApp();
});
}
});
});
</script>
So it's like whack-a-mole at this point.
Any ideas what the root cause of this is? I used to be able to build web app fine, until upgrades.
from getx.
Try to changed the index.html from this discussion
https://stackoverflow.com/questions/78152396/how-do-i-replace-serviceworkerversion-with-flutter-service-worker-version
from getx.
Try to changed the index.html from this discussion https://stackoverflow.com/questions/78152396/how-do-i-replace-serviceworkerversion-with-flutter-service-worker-version
I had it like that basically (except had double quotes, tried changing to single...no difference).
A huge rabbit hole since trying to fix the serviceworker deprecation. I eventually reverted back to an old copy of index.html, and it works. So I will leave for now.
I wonder if I need to rebuild the web files , perhaps my files in that dir are too old (too many flutter versions ago)? And perhaps they changes several things by now.
from getx.
Inside <head> tag Replace:
@nekomaruh I tried your solution but I get this error ReferenceError: serviceWorkerVersion is not defined
which makes sense given that variable is not defined.
from getx.
Inside tag Replace:
@nekomaruh I tried your solution but I get this error
ReferenceError: serviceWorkerVersion is not defined
which makes sense given that variable is not defined.
For me the solution was to delete the contents of /web dir (backing up any mods to index.html) and then remake using:
flutter create --platforms web .
It was much easier than trying to fix all the changes that have occurred since I last made my project.
from getx.
I'm having a problem after update my flutter version to 3.22, I modify the index.html to new mode of app initialization. My application have some textfields, and after upgrade the number keyboard doesn't work, because the six and four keys moves the cursor to right and left and not show the number on field, how can i resolve this?
from getx.
Related Issues (20)
- Add privacy manifest file for iOS
- Returns to an existing page and cannot refresh the controller HOT 3
- Maximum Flutter Version support for GetX4? HOT 1
- CupertinoRouteTransitionMixin.isPopGestureInProgress(route) exception HOT 7
- Concerns About the Future Maintenance of GetX HOT 1
- Support to Flutter web WASM HOT 2
- Get.reload not work !!! HOT 1
- [5.0.0-release-candidate-6] Kindly push the latest commits and release for pub.dev HOT 21
- FlutterError - type 'Null' is not a subtype of type 'Controller' in type cast
- Grey screen Errors in Release Mode HOT 9
- Need change dark mode theme HOT 5
- getx is dead? HOT 1
- Navigation Transition HOT 1
- Can't load Kernel binary: Invalid kernel binary format version HOT 1
- Please add new transition type: Transition.predictiveBack HOT 1
- Get 5.0.0 Nested Navigation duplicate routes HOT 5
- You need to call "Get.put(xx)" or "Get.lazyPut(()=>xx()) HOT 7
- Nested Navigation State Not Retained on Back to "Navigation" Tab HOT 2
- Unable to ecustomize `rootDelegate.pickPagesForRootNavigator` HOT 1
- Keyboard not appearing after swipe-back gesture when returning to a screen with TextField using GetX HOT 1
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 getx.