GithubHelp home page GithubHelp logo

Comments (12)

kevmoo avatar kevmoo commented on June 17, 2024 2

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.

brian-superlist avatar brian-superlist commented on June 17, 2024 1

Just tested & it fixed the issue. Thanks again!

from flutterfire.

TarekkMA avatar TarekkMA commented on June 17, 2024

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.

Knupper avatar Knupper commented on June 17, 2024

@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.

TarekkMA avatar TarekkMA commented on June 17, 2024

@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.

Knupper avatar Knupper commented on June 17, 2024

@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.

TarekkMA avatar TarekkMA commented on June 17, 2024

It doesn't show any errors for me, can you please use the stable version of flutter and try again?

from flutterfire.

Knupper avatar Knupper commented on June 17, 2024

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.

brian-superlist avatar brian-superlist commented on June 17, 2024

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.

Lyokone avatar Lyokone commented on June 17, 2024

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.

brian-superlist avatar brian-superlist commented on June 17, 2024

Appreciate the response and fast fix! I'll give it a shot now and report back.

from flutterfire.

Lyokone avatar Lyokone commented on June 17, 2024

Thanks for reporting back πŸš€

from flutterfire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.