-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Hot Restart broken on Flutter Web with --web-renderer html
#109093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
i am facing same issue since few days. Restart button is not working but when i manually restart by pressing
|
Hi @NkITaa, Thanks for filing the issue. I am able to reproduce the issue on the latest master channel and it is working fine on beta and the stable channel. master ❌Screen.Recording.2022-08-09.at.2.50.50.PM.movstable/beta ✅Screen.Recording.2022-08-09.at.2.52.18.PM.mov✅ : No Issue Surprisingly Hot restart works for canvaskit and fails for html renderer This works
This doesn't
flutter doctor -v (mac)
|
--web-renderer html
cc: @yjbanov |
@maheshmnj Glad to help :D P.S are non Google workers allowed to contribute to Flutter? |
Certainly yes. The starting point for learning how to contribute is https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md |
Will look at it, thanks :D |
The issue seems to be that #108776 fixed the app loading process, but did not update the <script>
window.addEventListener('load', function(ev) {
_flutter.loader.loadEntrypoint({
onEntrypointLoaded: onEntrypointLoaded,
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
}
});
async function onEntrypointLoaded(engineInitializer) {
const appRunner = await engineInitializer.initializeEngine();
appRunner.runApp();
}
});
</script> |
OK, when I wrote the modular flutter.js file I regressed a workaround for the promise-based initialization that deleted the JS function that is called from the engine when it's ready so it's only called the first time. Then the engine falls back to "auto" mode. There's a corner case in the new flutter/packages/flutter_tools/lib/src/web/file_generators/flutter_js.dart Lines 193 to 212 in 1f236a9
that is deleting the internal implementation of the method (the cached |
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 |
Uh oh!
There was an error while loading. Please reload this page.
So I Updated my Flutter today.
I can run my Flutter Web with
without a problem. But when I want to hot restart it I just get a white screen.
These are all of the versions of flutter, dart etc. that Im using
I even created a whole new flutter web project with:
and the problem persisted. So I saw the default starting screen of any new flutter project but it was not responsive. I couldn't click the increment button after hot restart
I ran flutter doctor and everything seems good as well:
The text was updated successfully, but these errors were encountered: