Skip to content
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

[Web] CardField is not working when making a Wasm build #2080

Open
geronimol opened this issue Feb 19, 2025 · 0 comments
Open

[Web] CardField is not working when making a Wasm build #2080

geronimol opened this issue Feb 19, 2025 · 0 comments
Labels
needs triage Needs triage

Comments

@geronimol
Copy link

geronimol commented Feb 19, 2025

Describe the bug
CardField is not working when using Wasm build.

To Reproduce
Steps to reproduce the behavior:

  1. Run example for web using flutter run -d chrome --wasm
    Note: You will need to migrate the index.html by replacing the body like so:
<body>
  <script src="flutter_bootstrap.js" async></script>
</body>

Also change the pubspec.yaml dependencies to the latest versions

  flutter_stripe: ^11.4.0
  flutter_stripe_web: ^6.4.0
  1. Go to the CardField widget(Card Payments -> Simple - Using webhooks).

If you inspect the browser console, you will see this:

══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
main.dart.mjs:60 The following _JavaScriptError was thrown during a scheduler callback:
main.dart.mjs:60 JavaScriptError
main.dart.mjs:60 
main.dart.mjs:60 When the exception was thrown, this was the stack:
main.dart.mjs:60 at module0._WidgetsFlutterBinding&BindingBase&GestureBinding&SchedulerBinding._invokeFrameCallback (http://localhost:50580/main.dart.wasm:wasm-function[7510]:0x3afe0c)
main.dart.mjs:60     at module0._WidgetsFlutterBinding&BindingBase&GestureBinding&SchedulerBinding.handleDrawFrame (http://localhost:50580/main.dart.wasm:wasm-function[7507]:0x3afb5b)
main.dart.mjs:60     at module0._WidgetsFlutterBinding&BindingBase&GestureBinding&SchedulerBinding._handleDrawFrame (http://localhost:50580/main.dart.wasm:wasm-function[7500]:0x3af966)
main.dart.mjs:60     at module0._WidgetsFlutterBinding&BindingBase&GestureBinding&SchedulerBinding._handleDrawFrame tear-off trampoline (http://localhost:50580/main.dart.wasm:wasm-function[7502]:0x3af98a)
main.dart.mjs:60     at module0.invoke (http://localhost:50580/main.dart.wasm:wasm-function[4005]:0x378ea9)
main.dart.mjs:60     at module0.EnginePlatformDispatcher.invokeOnDrawFrame (http://localhost:50580/main.dart.wasm:wasm-function[6804]:0x3a43bf)
main.dart.mjs:60     at module0.initializeEngineServices closure at org-dartlang-sdk:///lib/_engine/engine/initialization.dart:157:39 (http://localhost:50580/main.dart.wasm:wasm-function[6461]:0x39e199)
main.dart.mjs:60     at module0.closure wrapper at org-dartlang-sdk:///lib/_engine/engine/initialization.dart:157:39 trampoline (http://localhost:50580/main.dart.wasm:wasm-function[6816]:0x3a449d)
main.dart.mjs:60 ════════════════════════════════════════════════════════════════════════════════════════════════════

Expected behavior
CardField working the same as Javascript build.

@geronimol geronimol added the needs triage Needs triage label Feb 19, 2025
@geronimol geronimol changed the title [Web] CardField not working on production(Wasm) [Web] CardField not working in production build(Wasm) Feb 19, 2025
@geronimol geronimol changed the title [Web] CardField not working in production build(Wasm) [Web] CardField is not working when making a Wasm build Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs triage
Projects
None yet
Development

No branches or pull requests

1 participant