-
Notifications
You must be signed in to change notification settings - Fork 28.4k
[Web] App builds successfully, but then: "The type 'JSObject' can't be used as supertype." #143575
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Just to add, I've googled this issue & it seems to usually come from importing Any help is appreciated, thanks! |
I've also tried running |
Same issue here with 3.19.0 in IntelliJ IDEA. |
same error here, i try to run at macos/ios/android , all platform success, but web. and downgrade to 3.16.9 all thing works These packages are no longer being depended on:
- leak_tracker 10.0.0
- leak_tracker_flutter_testing 2.0.1
- leak_tracker_testing 2.0.1
- vm_service 13.0.0 what is happend? |
@IvanDeluxe does my fix work for you? |
I use firebase auth too, so probably this causes the issue. |
Firebase auth web doesn't work for web 0.3 or 0.5 only 0.4.2 |
Same issue, was after What is strange in amplify works fine with the stable channel. 🫣 |
In my case, the app works fine locally after I downgrade. but it shows the errors on Netlify when trying to deploy! any advice? |
Same issue after upgrading to 3.19.0 |
|
Faced this issue on Flutter Web. After upgrading to 3.19. But cleaning pub cache and upgrading all the dependencies resolved it. |
flutter pub upgrade worked for me |
flutter pub upgrade |
Faced this issue on Flutter Web. |
I also had a similar issue. Mine was mostly related to other package (which makes it transitive dependency). As Rutvik suggested in twitter, try to override dependency and it works. So, in all:
dependency_overrides:
web: 0.5.0 # latest version as of now |
Same issue here! Any news? Reproduction: edit: |
Same issue! |
Same issue and can confirm it happened right after updating to 3.19. Running |
flutter pub upgrade worked for me |
I also hit this issue before (see dart-lang/web#137) but I see
So, for anyone who is still facing this issue after executing |
can confirm |
|
Even I am facing the same issue after upgrading 3.19.0 |
Run all these commands if you are running on the web. RUN flutter doctor |
My issues where fixed after the latest release of the |
yes, after upgrade firebase_auth and pub upgrade, everything works. |
|
@techiehkr |
Error in the firefox developer console:
When building my app, looking at flutter.js, it should all be in one line however it isnt. Removing the extra newlines allows the page to load correctly. ![]()
Here is the code in question at if (!("serviceWorker" in navigator)) {
let errorMessage = "Service Worker API unavailable.";
if (!window.isSecureContext) {
errorMessage += "\nThe current context is NOT secure."
errorMessage += "\nRead more: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts";
}
return Promise.reject(
new Error(errorMessage)
);
}
Well, nevermind I think you should just disreguard this comment. It seems that even without removing the newlines from the flutter.js script, my project just randomly started working. Worth a shot trying to fix it though. |
@MeyerOppelt Your issue doesn't seem to relate to the originally reported issue, it could be an implementation issue. If you think it's a Flutter framework issue, please file another issue with all information in the issue template so we can verify it properly. Since the original issue reported can be solved by |
I started getting this issue after upgrading to The issue went away after I ran => |
i solved this issue. just do this: |
Solved by |
Just to understand the underlying cause, does this mean that even minor or patch upgrades to |
|
Solved by : flutter pub upgrade --major-versions |
In my case this comment was helpful. |
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 |
Steps to reproduce
Hi :)
We have an app in production currently running 3.16.9 & now after upgrading to latest flutter I can't seem to run the app:
flutter upgrade (3.16.9 => 3.19.0)
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
VS Code => Run Without Debugging
Actual results
The

Debug Console
is full of errors like:Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: