Comments (12)
I started on a fix here - #12850
The lint I added gives a LOT of pointers. There is still more to do here. We really need to run all of the web test with wasm, too βΒ to find all of these issues!
from flutterfire.
Just tested & it fixed the issue. Thanks again!
from flutterfire.
Hello @Knupper thank you for reporting this issue, I've tested the example app and I didn't get any issues when running and clicking the button no issues is logged to the console.
Can you use the following and test again.:
flutter build web --wasm
flutter pub global activate dhttpd
cd build/web
dhttpd '--headers=Cross-Origin-Embedder-Policy=credentialless;Cross-Origin-Opener-Policy=same-origin'
from flutterfire.
@TarekkMA thanks for testing it. With the unchanged example project it works fine for me as well. But if i update my html file to match the recommended specification from this article i get the error i described above.
Here is how my index.html looks like
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>example</title>
</head>
<body>
<script src="flutter_bootstrap.js" async></script>
</body>
</html>
Now i am confused, is the update of the index.html file not needed or is there still a problem? If i revert it to my old file i get warnings in the wasm build process.
warnings:
Warning: In index.html:43: Local variable for "serviceWorkerVersion" is deprecated. Use
"{{flutter_service_worker_version}}" template token instead.
Warning: In index.html:52: "FlutterLoader.loadEntrypoint" is deprecated. Use "FlutterLoader.load" instead.
from flutterfire.
@Knupper I've deleted the web directory and created it again using flutter create . --platforms=web
and it seemed to work.
Can you provide a repo where there is a complete example showing such issue or provide more details?
from flutterfire.
@TarekkMA of course, here is the example project
Here a short video how i reproduce the issue.
https://github.com/firebase/flutterfire/assets/8080117/0bc6e2d5-76db-49d0-80cd-b8e35f8fe1f1
from flutterfire.
It doesn't show any errors for me, can you please use the stable version of flutter and try again?
from flutterfire.
I have tested it with 3.22.1 again and i get the same console output after clicking on "fetch activate" in the example app.
i am using a mac book pro with an m1 chip on macOS 14.5.
from flutterfire.
Heya, we're running into the same thing at Superlist. It looks like the minimal repro causes this error.
I've tried stable, master, and a custom fork of Flutter that we run. All exhibit this issue:
main.dart.wasm:0x982d67 Uncaught RuntimeError: unreachable
at RemoteConfig.fetchAndActivate closure at file:///Users/hetzner/.pub-cache/hosted/pub.dev/firebase_remote_config_web-1.6.7/lib/src/interop/firebase_remote_config.dart:104:13 (main.dart.wasm:0x982d67)
at closure wrapper at file:///Users/hetzner/.pub-cache/hosted/pub.dev/firebase_remote_config_web-1.6.7/lib/src/interop/firebase_remote_config.dart:104:13 trampoline (main.dart.wasm:0x982e63)
at _rootRunUnary (main.dart.wasm:0x486a5a)
at _CustomZone.runUnary (main.dart.wasm:0x583651)
at _Future._propagateToListeners (main.dart.wasm:0x486610)
at _Future._completeWithValue (main.dart.wasm:0x486cc7)
at _Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 (main.dart.wasm:0x48bf3d)
at closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 trampoline (main.dart.wasm:0x48bf53)
at _rootRun (main.dart.wasm:0x484f61)
at _rootRun tear-off trampoline (main.dart.wasm:0x583ffe)
$RemoteConfig.fetchAndActivate closure at file:///Users/hetzner/.pub-cache/hosted/pub.dev/firebase_remote_config_web-1.6.7/lib/src/interop/firebase_remote_config.dart:104:13 @ main.dart.wasm:0x982d67
$closure wrapper at file:///Users/hetzner/.pub-cache/hosted/pub.dev/firebase_remote_config_web-1.6.7/lib/src/interop/firebase_remote_config.dart:104:13 trampoline @ main.dart.wasm:0x982e63
$_rootRunUnary @ main.dart.wasm:0x486a5a
$_CustomZone.runUnary @ main.dart.wasm:0x583651
$_Future._propagateToListeners @ main.dart.wasm:0x486610
$_Future._completeWithValue @ main.dart.wasm:0x486cc7
$_Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 @ main.dart.wasm:0x48bf3d
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 trampoline @ main.dart.wasm:0x48bf53
$_rootRun @ main.dart.wasm:0x484f61
$_rootRun tear-off trampoline @ main.dart.wasm:0x583ffe
$_CustomZone.run @ main.dart.wasm:0x5836ac
$_CustomZone.runGuarded @ main.dart.wasm:0x5838ad
$_CustomZone.bindCallbackGuarded closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1249:12 @ main.dart.wasm:0x58426e
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1249:12 trampoline @ main.dart.wasm:0x584285
$_startMicrotaskLoop @ main.dart.wasm:0x485136
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x4851a1
$_invokeCallback @ main.dart.wasm:0x4118e5
(anonymous) @ main.dart.mjs:837
IndexedDB (async)
(anonymous) @ environment.ts:177
validateIndexedDBOpenable @ environment.ts:171
isWindowSupported @ isSupported.ts:42
_1680 @ main.dart.mjs:558
$FirebaseMessagingWeb.isSupported @ main.dart.wasm:0x991a43
$mainCommon inner @ main.dart.wasm:0x48d4fa
$_awaitHelperWithTypeCheck closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:97:16 @ main.dart.wasm:0x485dc8
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:97:16 trampoline @ main.dart.wasm:0x485ecf
$_rootRunUnary @ main.dart.wasm:0x486a5a
$_CustomZone.runUnary @ main.dart.wasm:0x583651
$_Future._propagateToListeners @ main.dart.wasm:0x486610
$_Future._completeWithValue @ main.dart.wasm:0x486cc7
$_Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 @ main.dart.wasm:0x48bf3d
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 trampoline @ main.dart.wasm:0x48bf53
$_rootRun @ main.dart.wasm:0x484f61
$_rootRun tear-off trampoline @ main.dart.wasm:0x583ffe
$_CustomZone.run @ main.dart.wasm:0x5836ac
$_CustomZone.runGuarded @ main.dart.wasm:0x5838ad
$_CustomZone.bindCallbackGuarded closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1249:12 @ main.dart.wasm:0x58426e
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1249:12 trampoline @ main.dart.wasm:0x584285
$_startMicrotaskLoop @ main.dart.wasm:0x485136
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x4851a1
$_invokeCallback @ main.dart.wasm:0x4118e5
(anonymous) @ main.dart.mjs:837
setTimeout (async)
(anonymous) @ sender.ts:94
_send @ sender.ts:91
notifyServiceWorker @ indexed_db.ts:299
(anonymous) @ indexed_db.ts:356
await in (anonymous) (async)
_withPendingWrite @ indexed_db.ts:330
_remove @ indexed_db.ts:348
removeCurrentUser @ persistence_user_manager.ts:77
directlySetCurrentUser @ auth_impl.ts:790
initializeCurrentUser @ auth_impl.ts:293
await in initializeCurrentUser (async)
(anonymous) @ auth_impl.ts:181
Promise.then (async)
queue @ auth_impl.ts:794
_initializeWithPersistence @ auth_impl.ts:159
_initializeAuthInstance @ initialize.ts:86
(anonymous) @ register.ts:104
getOrInitializeService @ provider.ts:318
initialize @ provider.ts:242
initializeAuth @ emulator.ts:44
_1765 @ main.dart.mjs:591
$getAuthInstance @ main.dart.wasm:0x48b18f
$FirebaseAuthWeb.registerWith closure at file:///Users/hetzner/.pub-cache/hosted/pub.dev/firebase_auth_web-5.12.0/lib/firebase_auth_web.dart:90:32 inner @ main.dart.wasm:0x48ae71
$FirebaseAuthWeb.registerWith closure at file:///Users/hetzner/.pub-cache/hosted/pub.dev/firebase_auth_web-5.12.0/lib/firebase_auth_web.dart:90:32 @ main.dart.wasm:0x48adce
$closure wrapper at file:///Users/hetzner/.pub-cache/hosted/pub.dev/firebase_auth_web-5.12.0/lib/firebase_auth_web.dart:90:32 trampoline @ main.dart.wasm:0x48adfe
$FirebaseCoreWeb.initializeApp closure at file:///Users/hetzner/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.0/lib/src/firebase_core_web.dart:327:28 @ main.dart.wasm:0x993623
$closure wrapper at file:///Users/hetzner/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.0/lib/src/firebase_core_web.dart:327:28 trampoline @ main.dart.wasm:0x993bd0
$MappedIterator.moveNext @ main.dart.wasm:0x47799b
$Future.wait @ main.dart.wasm:0x52ec8a
$FirebaseCoreWeb.initializeApp inner @ main.dart.wasm:0x993b10
$_awaitHelperWithTypeCheck closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:97:16 @ main.dart.wasm:0x485dc8
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:97:16 trampoline @ main.dart.wasm:0x485ecf
$_rootRunUnary @ main.dart.wasm:0x486a5a
$_CustomZone.runUnary @ main.dart.wasm:0x583651
$_Future._propagateToListeners @ main.dart.wasm:0x486610
$_Future._completeWithValue @ main.dart.wasm:0x486cc7
$_Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 @ main.dart.wasm:0x48bf3d
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:721:29 trampoline @ main.dart.wasm:0x48bf53
$_rootRun @ main.dart.wasm:0x484f61
$_rootRun tear-off trampoline @ main.dart.wasm:0x583ffe
$_CustomZone.run @ main.dart.wasm:0x5836ac
$_CustomZone.runGuarded @ main.dart.wasm:0x5838ad
$_CustomZone.bindCallbackGuarded closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1249:12 @ main.dart.wasm:0x58426e
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1249:12 trampoline @ main.dart.wasm:0x584285
$_startMicrotaskLoop @ main.dart.wasm:0x485136
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x4851a1
$_invokeCallback @ main.dart.wasm:0x4118e5
(anonymous) @ main.dart.mjs:837
from flutterfire.
With #12852, I've tested your issue and it seems resolved. Waiting for proper review before merging, but if you wanna test on your project quickly you can use latest release of FlutterFire CLI and override locally using
dart pub global activate flutterfire_cli 1.0.1-dev.1 --overwrite
flutterfire install git:fix/12820
from flutterfire.
Appreciate the response and fast fix! I'll give it a shot now and report back.
from flutterfire.
Thanks for reporting back π
from flutterfire.
Related Issues (20)
- [firebase_firestore]: Type 'bool' is not a subtype of type 'Map<String, dynamic>?' in type cast HOT 7
- [firebase_auth]: -[__NSCFString objectForKeyedSubscript:]: unrecognized selector sent to instance.. HOT 1
- [firebase_crashlytics]: iOS Crashlytics failing with "Crashlytics skipped rotating the Install ID during urgent mode because it is run on the main thread, which can't succeed" HOT 2
- [firebase_analytics]: Analytics does not sends any events from iframe HOT 12
- Initial task failed for action RecaptchaAction(action=getOobCode)with exception - An internal error has occurred. [ unexpected end of stream on com.android.okhttp.Address@80d85b16 ] HOT 7
- [firebase_messaging]: Lost RemoteMessage data in notification HOT 2
- π [firebase_database] Support Server Timestamps in Firebase Realtime Database HOT 1
- [cloud_firestore]: setState Causes snapshot.data.docChanges to Reinitialize Without Actual Firestore Changes. HOT 3
- π [cloud_firestore] Support offline query indexes HOT 2
- [firebase_crashlytics]: Fatal Exception: FlutterError (null)._startMicrotaskLoop (dart:async) HOT 1
- [firebase_auth]: flutter web - hangs with exception for web HOT 1
- [π] Flutter handle errors not up to date HOT 1
- [firebase_app_check]: Should depend upon a stable release HOT 1
- [firebase_database]: Firebase Database not auto synced after regain connection HOT 1
- [firebase_analytics]: iOS 13 required? HOT 2
- [firebase_analytics]: `AnalyticsEventItem.asMap()` to `Map<String, Object>` instead of `Map<String, dynamic>` HOT 2
- [Core]: "No app has been configured yet" message on iOS HOT 7
- [firebase_analytics]: Play Console raises error for missing com.google.android.gms.permission.AD_ID HOT 3
- [firebase_app_check]: Flutter iOS module is not building when using firebase_app_check package HOT 3
- [cloud_firestore]: Lots of warnings generated when running on macos 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 flutterfire.