amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

[amplify_flutter] Support using `--wasm` flutter cli argument.

Open asaarnak opened this issue 3 months ago • 20 comments

Because amplify_flutter is using Platform.isAndroid.

This is thrown: Unsupported operation: Platform._operatingSystem

Line: call $Platform.isAndroid

  (func $new AmplifyClassImpl (;33855;) (result (ref $AmplifyClassImpl))
    block $label1
      block $label0
        call $Platform.isAndroid implicit getter
        br_if $label0
        call $Platform.isIOS implicit getter
        i32.eqz
        br_if $label1
      end $label0
      call $AmplifyHybridImpl
      return
    end $label1
    call $AmplifyClassImpl.protected
    return
  )

The pub.dev suggests removing dart:io import from: package:amplify_flutter/amplify_flutter.dart package:amplify_flutter/src/amplify_impl.dart Image

asaarnak avatar Sep 12 '25 13:09 asaarnak

Hi @asaarnak, thank you for raising this issue, along with a PR! Please see the discussion on that thread, we appreciate community contribution! We will track this as a feature request

ekjotmultani avatar Sep 15 '25 00:09 ekjotmultani

Hi @ekjotmultani. I added an comment under the PR. Thanks.

I found the same issue with other packages while testing. The amplify_auth_cognito has same errors. Image

asaarnak avatar Sep 15 '25 07:09 asaarnak

@tyllark After these commits the application is starting and loading first page.

But when i try to login i get some errors about worker on this line:

await Amplify.Auth.signIn(
  username: email,
  options: const SignInOptions(
    pluginOptions: CognitoSignInPluginOptions(
      authFlowType: AuthenticationFlowType.customAuthWithoutSrp,
    ),
  ),
);

Its looking for a file workers.debug.dart.js but can't find it, also when running with --release tag then its looking for a file workers.release.dart.js and also it's looking it from packages/amplify_auth_cognito_dart and also from test/packages/amplify_auth_cognito_dart directory.

http://localhost:41167/packages/amplify_auth_cognito_dart/src/workers/workers.js
http://localhost:41167/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js
http://localhost:41167/test/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js

Image

main.dart.mjs:66 DEBUG | SignInStateMachine | Device secrets not present for user: [email protected]
main.dart.mjs:66 FINE: 2025-09-15 14:57:51.187: AWS.Amplify.AmplifyAuthCognito.SignInStateMachine: Device secrets not present for user: [email protected]
main.dart.mjs:66 FINE: 2025-09-15 14:57:51.228: AWS.ASFContextDataProvider.ASFWorker: Spawning worker at packages/amplify_auth_cognito_dart/src/workers/workers.js
Refused to execute script from 'http://localhost:43001/packages/amplify_auth_cognito_dart/src/workers/workers.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
:43001/#/login:1 Refused to execute script from 'http://localhost:43001/packages/amplify_auth_cognito_dart/src/workers/workers.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
main.dart.mjs:66 FINE: 2025-09-15 14:57:51.241: AWS.ASFContextDataProvider.ASFWorker: Error initializing worker: WorkerBeeExceptionImpl {
main.dart.mjs:66   error=An unknown error occurred,
main.dart.mjs:66 }
main.dart.mjs:66 FINE: 2025-09-15 14:57:51.243: AWS.ASFContextDataProvider.ASFWorker: Spawning worker at packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js
Refused to execute script from 'http://localhost:43001/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
:43001/#/login:1 Refused to execute script from 'http://localhost:43001/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
main.dart.mjs:66 FINE: 2025-09-15 14:57:51.262: AWS.ASFContextDataProvider.ASFWorker: Error initializing worker: WorkerBeeExceptionImpl {
main.dart.mjs:66   error=An unknown error occurred,
main.dart.mjs:66 }
main.dart.mjs:66 FINE: 2025-09-15 14:57:51.264: AWS.ASFContextDataProvider.ASFWorker: Spawning worker at http://localhost:43001/test/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js
Refused to execute script from 'http://localhost:43001/test/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
:43001/#/login:1 Refused to execute script from 'http://localhost:43001/test/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
main.dart.mjs:66 FINE: 2025-09-15 14:57:51.275: AWS.ASFContextDataProvider.ASFWorker: Error initializing worker: WorkerBeeExceptionImpl {
main.dart.mjs:66   error=An unknown error occurred,
main.dart.mjs:66 }
main.dart.mjs:66 FINE: 2025-09-15 14:57:51.277: AWS.ASFContextDataProvider.ASFWorker: Error in worker: WorkerBeeExceptionImpl {
main.dart.mjs:66   error=Could not launch web worker.,
main.dart.mjs:66   stackTrace=main.dart.wasm 1:3043195  module0._awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:107:14
main.dart.mjs:66 main.dart.wasm 1:3043275  module0.closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:107:14 trampoline
main.dart.mjs:66 main.dart.wasm 1:4853750  module0.StackZoneSpecification._registerBinaryCallback closure at file:///home/a/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib/src/stack_zone_specification.dart:138:36
main.dart.mjs:66 main.dart.wasm 1:4853973  module0.closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib/src/stack_zone_specification.dart:138:36 trampoline
main.dart.mjs:66 main.dart.wasm 1:4854082  module0.StackZoneSpecification._run
main.dart.mjs:66 main.dart.wasm 1:4853653  module0.StackZoneSpecification._registerBinaryCallback closure at file:///home/a/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib/src/stack_zone_specification.dart:138:15
main.dart.mjs:66 main.dart.wasm 1:4853946  module0.closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib/src/stack_zone_specification.dart:138:15 trampoline
main.dart.mjs:66 ===== asynchronous gap ===========================
main.dart.mjs:66 main.dart.wasm 1:3443620  module0._CustomZone.registerCallback
main.dart.mjs:66 main.dart.wasm 1:3443261  module0._CustomZone.bindCallbackGuarded
main.dart.mjs:66 main.dart.wasm 1:3032047  module0._rootScheduleMicrotask
main.dart.mjs:66 main.dart.wasm 1:3038642  module0._rootScheduleMicrotask tear-off trampoline
main.dart.mjs:66 ===== asynchronous gap ===========================
main.dart.mjs:66 main.dart.wasm 1:3444214  module0._CustomZone.registerBinaryCallback
main.dart.mjs:66 main.dart.wasm 1:3041804  module0._registerErrorHandler
main.dart.mjs:66 main.dart.wasm 1:3041585  module0._Future.then
main.dart.mjs:66 main.dart.wasm 1:3031522  module0._awaitHelper
main.dart.mjs:66 ===== asynchronous gap ===========================
main.dart.mjs:66 main.dart.wasm 1:3444214  module0._CustomZone.registerBinaryCallback
main.dart.mjs:66 main.dart.wasm 1:3041804  module0._registerErrorHandler
main.dart.mjs:66 main.dart.wasm 1:3041585  module0._Future.then
main.dart.mjs:66 main.dart.wasm 1:3031522  module0._awaitHelper
main.dart.mjs:66 ===== asynchronous gap ===========================
main.dart.mjs:66 main.dart.wasm 1:3444214  module0._CustomZone.registerBinaryCallback
main.dart.mjs:66 main.dart.wasm 1:3041804  module0._registerErrorHandler
main.dart.mjs:66 main.dart.wasm 1:3041585  module0._Future.then
main.dart.mjs:66 main.dart.wasm 1:3031522  module0._awaitHelper
main.dart.mjs:66 ,
main.dart.mjs:66 }
WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost
:43001/#/login:1 WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost

asaarnak avatar Sep 15 '25 12:09 asaarnak

Hello @asaarnak, sorry for the delay this issue has been a bit of a roller coaster for me. I started off migrating your changes to use os_detect as we already use that package in our repo and because defaultTargetPlatform would require modifications to all of our tests:

In a test environment, the platform returned is TargetPlatform.android regardless of the host platform.

I then realized that all of our references to dart:io were guard by a kIsWeb check or conditional imports, otherwise our non-wasm web builds would be failing. Well it ends up the way the Flutter team checks if they are running on the browser changed when wasm was released from

identical(0, 0.0);

to

bool.fromEnvironment('dart.library.js_interop');

You can see an example of this change in packages/flutter_test/lib/src/platform.dart in this Flutter team commit. Anyways we have the old method hardcoded into Amplify Flutter here, which means we are not guarding dart:io on wasm builds properly. I updated the check in this PR.

I reproduced the Unsupported operation: Platform._operatingSystem error without the fix and confirmed that the application is able to launch on my side with the fix! Unfortunately I'm getting the following MIME errors which seems to be breaking our Auth API on WASM:

Refused to execute script from 'http://localhost:57891/test/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

I'm still working to get this unblocked, but wanted to give you an update. You can verify the changes so far with the following dependency override:

dependency_overrides:
  aws_common:
    git:
      url: https://github.com/aws-amplify/amplify-flutter.git
      ref: chore/update-zisweb
      path: packages/aws_common

tyllark avatar Sep 17 '25 23:09 tyllark

@tyllark I tested with your branch, application now start and the other issue exists. Here are the logs, we also use soloud that also initializes Web Worker successfully, if it helps.

init_module.dart.js:1506 Module_soloud initialized and set globally.
libflutter_soloud_plugin.js:1 CPP bool createWorkerInWasm()
libflutter_soloud_plugin.js:1 EM_ASM creating Web Worker!
libflutter_soloud_plugin.js:1 [Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)
203091 @ libflutter_soloud_plugin.js:1
runEmAsmFunction @ libflutter_soloud_plugin.js:1
_emscripten_asm_const_int @ libflutter_soloud_plugin.js:1
$func222 @ libflutter_soloud_plugin.wasm:0x1338f
$func229 @ libflutter_soloud_plugin.wasm:0x14076
$initEngine @ libflutter_soloud_plugin.wasm:0x72750
_1283 @ main.dart.mjs:445
$FlutterSoLoudWeb.initEngine @ main.dart.wasm:0x60ec65
$SoLoud.init inner @ soloud.dart:278
$_awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 @ async_patch.dart:105
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 trampoline @ main.dart.wasm:0x2e658f
$_rootRunUnary @ zone.dart:1538
$_rootRunUnary tear-off trampoline @ main.dart.wasm:0x347aa6
$_CustomZone.runUnary @ zone.dart:1429
$_FutureListener.handleValue (body) @ future_impl.dart:222
$_FutureListener.handleValue (checked entry) @ future_impl.dart:221
$_Future._propagateToListeners closure handleValueCallback at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:946:33 @ future_impl.dart:948
$_Future._propagateToListeners @ future_impl.dart:977
$_Future._completeWithValue (body) @ future_impl.dart:720
$_Future._completeWithValue (unchecked entry) @ future_impl.dart:715
$_Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 @ future_impl.dart:804
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 trampoline @ main.dart.wasm:0x2e64b0
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.bindCallback closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 @ zone.dart:1345
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 trampoline @ main.dart.wasm:0x347ee2
$_microtaskLoop @ schedule_microtask.dart:40
$_startMicrotaskLoop @ schedule_microtask.dart:49
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x2e3cec
$_invokeCallback @ timer_patch.dart:71
(anonymous) @ main.dart.mjs:621
setTimeout
_1574 @ main.dart.mjs:615
$_JSEventLoop._setTimeout @ main.dart.wasm:0x30b2ab
$_OneShotTimer._schedule @ timer_patch.dart:128
$new _Timer (constructor body) @ timer_patch.dart:115
$new _OneShotTimer (constructor body) @ timer_patch.dart:124
$_OneShotTimer @ timer_patch.dart:124
$Timer._createTimer @ timer_patch.dart:88
$_rootCreateTimer @ zone.dart:1636
$_rootCreateTimer tear-off trampoline @ main.dart.wasm:0x346f03
$_CustomZone.createTimer @ zone.dart:1482
$new Timer @ timer.dart:48
$new Future.delayed @ future.dart:413
$WorkerController.setWasmWorker inner @ worker.dart:50
$WorkerController.setWasmWorker @ worker.dart:31
$FlutterSoLoudWeb.setDartEventCallbacks inner @ bindings_player_web.dart:60
$FlutterSoLoudWeb.setDartEventCallbacks @ bindings_player_web.dart:45
$SoLoud._initializeNativeCallbacks inner @ soloud.dart:364
$SoLoud._initializeNativeCallbacks @ soloud.dart:362
$SoLoud.init inner @ soloud.dart:276
$SoLoud.init @ soloud.dart:251
$initAppOnce inner @ global.dart:50
$initAppOnce @ global.dart:42
$SplashScreenState._initialize closure at file:///media/a/A/CLIENTS/d/d-p-m-app/lib/app/screens/splash_screen.dart:57:50 inner @ splash_screen.dart:63
$_awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 @ async_patch.dart:105
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 trampoline @ main.dart.wasm:0x2e658f
$_rootRunUnary @ zone.dart:1538
$_rootRunUnary tear-off trampoline @ main.dart.wasm:0x347aa6
$_CustomZone.runUnary @ zone.dart:1429
$_FutureListener.handleValue (body) @ future_impl.dart:222
$_FutureListener.handleValue (checked entry) @ future_impl.dart:221
$_Future._propagateToListeners closure handleValueCallback at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:946:33 @ future_impl.dart:948
$_Future._propagateToListeners @ future_impl.dart:977
$_Future._completeWithValue (body) @ future_impl.dart:720
$_Future._completeWithValue (unchecked entry) @ future_impl.dart:715
$_Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 @ future_impl.dart:804
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 trampoline @ main.dart.wasm:0x2e64b0
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.bindCallback closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 @ zone.dart:1345
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 trampoline @ main.dart.wasm:0x347ee2
$_microtaskLoop @ schedule_microtask.dart:40
$_startMicrotaskLoop @ schedule_microtask.dart:49
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x2e3cec
$_invokeCallback @ timer_patch.dart:71
(anonymous) @ main.dart.mjs:621
libflutter_soloud_plugin.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://developer.chrome.com/blog/autoplay/#web_audio
206491 @ libflutter_soloud_plugin.js:1
runEmAsmFunction @ libflutter_soloud_plugin.js:1
_emscripten_asm_const_int @ libflutter_soloud_plugin.js:1
$func226 @ libflutter_soloud_plugin.wasm:0x13753
$func236 @ libflutter_soloud_plugin.wasm:0x168df
$initEngine @ libflutter_soloud_plugin.wasm:0x72dba
_1283 @ main.dart.mjs:445
$FlutterSoLoudWeb.initEngine @ main.dart.wasm:0x60ec65
$SoLoud.init inner @ soloud.dart:278
$_awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 @ async_patch.dart:105
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 trampoline @ main.dart.wasm:0x2e658f
$_rootRunUnary @ zone.dart:1538
$_rootRunUnary tear-off trampoline @ main.dart.wasm:0x347aa6
$_CustomZone.runUnary @ zone.dart:1429
$_FutureListener.handleValue (body) @ future_impl.dart:222
$_FutureListener.handleValue (checked entry) @ future_impl.dart:221
$_Future._propagateToListeners closure handleValueCallback at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:946:33 @ future_impl.dart:948
$_Future._propagateToListeners @ future_impl.dart:977
$_Future._completeWithValue (body) @ future_impl.dart:720
$_Future._completeWithValue (unchecked entry) @ future_impl.dart:715
$_Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 @ future_impl.dart:804
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 trampoline @ main.dart.wasm:0x2e64b0
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.bindCallback closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 @ zone.dart:1345
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 trampoline @ main.dart.wasm:0x347ee2
$_microtaskLoop @ schedule_microtask.dart:40
$_startMicrotaskLoop @ schedule_microtask.dart:49
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x2e3cec
$_invokeCallback @ timer_patch.dart:71
(anonymous) @ main.dart.mjs:621
setTimeout
_1574 @ main.dart.mjs:615
$_JSEventLoop._setTimeout @ main.dart.wasm:0x30b2ab
$_OneShotTimer._schedule @ timer_patch.dart:128
$new _Timer (constructor body) @ timer_patch.dart:115
$new _OneShotTimer (constructor body) @ timer_patch.dart:124
$_OneShotTimer @ timer_patch.dart:124
$Timer._createTimer @ timer_patch.dart:88
$_rootCreateTimer @ zone.dart:1636
$_rootCreateTimer tear-off trampoline @ main.dart.wasm:0x346f03
$_CustomZone.createTimer @ zone.dart:1482
$new Timer @ timer.dart:48
$new Future.delayed @ future.dart:413
$WorkerController.setWasmWorker inner @ worker.dart:50
$WorkerController.setWasmWorker @ worker.dart:31
$FlutterSoLoudWeb.setDartEventCallbacks inner @ bindings_player_web.dart:60
$FlutterSoLoudWeb.setDartEventCallbacks @ bindings_player_web.dart:45
$SoLoud._initializeNativeCallbacks inner @ soloud.dart:364
$SoLoud._initializeNativeCallbacks @ soloud.dart:362
$SoLoud.init inner @ soloud.dart:276
$SoLoud.init @ soloud.dart:251
$initAppOnce inner @ global.dart:50
$initAppOnce @ global.dart:42
$SplashScreenState._initialize closure at file:///media/a/A/CLIENTS/d/d-p-m-app/lib/app/screens/splash_screen.dart:57:50 inner @ splash_screen.dart:63
$_awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 @ async_patch.dart:105
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 trampoline @ main.dart.wasm:0x2e658f
$_rootRunUnary @ zone.dart:1538
$_rootRunUnary tear-off trampoline @ main.dart.wasm:0x347aa6
$_CustomZone.runUnary @ zone.dart:1429
$_FutureListener.handleValue (body) @ future_impl.dart:222
$_FutureListener.handleValue (checked entry) @ future_impl.dart:221
$_Future._propagateToListeners closure handleValueCallback at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:946:33 @ future_impl.dart:948
$_Future._propagateToListeners @ future_impl.dart:977
$_Future._completeWithValue (body) @ future_impl.dart:720
$_Future._completeWithValue (unchecked entry) @ future_impl.dart:715
$_Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 @ future_impl.dart:804
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 trampoline @ main.dart.wasm:0x2e64b0
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.bindCallback closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 @ zone.dart:1345
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 trampoline @ main.dart.wasm:0x347ee2
$_microtaskLoop @ schedule_microtask.dart:40
$_startMicrotaskLoop @ schedule_microtask.dart:49
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x2e3cec
$_invokeCallback @ timer_patch.dart:71
(anonymous) @ main.dart.mjs:621
main.dart.mjs:693  POST https://cognito-identity.us-east-1.amazonaws.com/? 400 (Bad Request)
_1759 @ main.dart.mjs:693
$AWSHttpClientImpl._send inner @ main.dart.wasm:0x46e30e
$_awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 @ async_patch.dart:105
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 trampoline @ main.dart.wasm:0x2e658f
$_rootRunUnary @ zone.dart:1538
$_rootRunUnary tear-off trampoline @ main.dart.wasm:0x347aa6
$_CustomZone.runUnary @ zone.dart:1429
$_FutureListener.handleValue (body) @ future_impl.dart:222
$_FutureListener.handleValue (checked entry) @ future_impl.dart:221
$_Future._propagateToListeners closure handleValueCallback at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:946:33 @ future_impl.dart:948
$_Future._propagateToListeners @ future_impl.dart:977
$_Future._complete (body) @ future_impl.dart:711
$_Future._complete (checked entry) @ future_impl.dart:700
$_SyncCompleter.complete (body) @ future_impl.dart:113
$_SyncCompleter.complete (unchecked entry) @ future_impl.dart:111
$_collectBytes closure at file:///home/a/.pub-cache/hosted/pub.dev/async-2.13.0/lib/src/byte_collector.dart:48:74 @ byte_collector.dart:49
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/async-2.13.0/lib/src/byte_collector.dart:48:74 trampoline @ main.dart.wasm:0x473ee4
$_rootRun @ zone.dart:1517
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.runGuarded @ zone.dart:1321
$_BufferingStreamSubscription._sendDone closure sendDone at org-dartlang-sdk:///dart-sdk/lib/async/stream_impl.dart:429:18 @ stream_impl.dart:434
$_BufferingStreamSubscription._sendDone @ stream_impl.dart:444
$_BufferingStreamSubscription._close @ stream_impl.dart:333
$_SyncStreamController._sendDone @ stream_controller.dart:806
$_StreamController._closeUnchecked @ stream_controller.dart:652
$_StreamController.close @ stream_controller.dart:645
$TakeUntil|takeUntil closure at file:///home/a/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/lib/src/take_until.dart:45:72 @ take_until.dart:48
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/lib/src/take_until.dart:45:72 trampoline @ main.dart.wasm:0x45ca5f
$_rootRun @ zone.dart:1517
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.runGuarded @ zone.dart:1321
$_BufferingStreamSubscription._sendDone closure sendDone at org-dartlang-sdk:///dart-sdk/lib/async/stream_impl.dart:429:18 @ stream_impl.dart:434
$_BufferingStreamSubscription._sendDone @ stream_impl.dart:444
$_BufferingStreamSubscription._close @ stream_impl.dart:333
$_SyncStreamController._sendDone @ stream_controller.dart:806
$_StreamController._closeUnchecked @ stream_controller.dart:652
$_StreamController.close @ stream_controller.dart:645
$Tap|tap closure at file:///home/a/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/lib/src/tap.dart:38:18 @ tap.dart:42
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/lib/src/tap.dart:38:18 trampoline @ main.dart.wasm:0x47437e
$TransformByHandlers|transformByHandlers closure at file:///home/a/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/lib/src/from_handlers.dart:31:18 @ from_handlers.dart:33
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/lib/src/from_handlers.dart:31:18 trampoline @ main.dart.wasm:0x47482e
$_rootRun @ zone.dart:1517
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.runGuarded @ zone.dart:1321
$_BufferingStreamSubscription._sendDone closure sendDone at org-dartlang-sdk:///dart-sdk/lib/async/stream_impl.dart:429:18 @ stream_impl.dart:434
$_BufferingStreamSubscription._sendDone @ stream_impl.dart:444
$_DelayedDone.perform (body) @ stream_impl.dart:592
$_DelayedDone.perform (checked entry) @ stream_impl.dart:591
$_PendingEvents.handleNext @ stream_impl.dart:678
$_PendingEvents.schedule closure at org-dartlang-sdk:///dart-sdk/lib/async/stream_impl.dart:645:23 @ stream_impl.dart:649
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/stream_impl.dart:645:23 trampoline @ main.dart.wasm:0x2ee255
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.bindCallback closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 @ zone.dart:1345
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 trampoline @ main.dart.wasm:0x347ee2
$_microtaskLoop @ schedule_microtask.dart:40
$_startMicrotaskLoop @ schedule_microtask.dart:49
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x2e3cec
$_invokeCallback @ timer_patch.dart:71
(anonymous) @ main.dart.mjs:621
setTimeout
_1574 @ main.dart.mjs:615
$_JSEventLoop._setTimeout @ main.dart.wasm:0x30b2ab
$_OneShotTimer._schedule @ timer_patch.dart:128
$new _Timer (constructor body) @ timer_patch.dart:115
$new _OneShotTimer (constructor body) @ timer_patch.dart:124
$_OneShotTimer @ timer_patch.dart:124
$Timer._createTimer @ timer_patch.dart:88
$_rootCreateTimer @ zone.dart:1636
$_rootCreateTimer tear-off trampoline @ main.dart.wasm:0x346f03
$_CustomZone.createTimer @ zone.dart:1482
$new Timer @ timer.dart:48
$Timer.run @ timer.dart:107
$new Future @ future.dart:257
$SmithyHttpRequest.send @ http_request.dart:187
$HttpOperation.send closure at file:///home/a/.pub-cache/hosted/pub.dev/smithy-0.7.8/lib/src/http/http_operation.dart:204:7 @ http_operation.dart:207
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/smithy-0.7.8/lib/src/http/http_operation.dart:204:7 trampoline @ main.dart.wasm:0x4af6e7
$AWSRetryer.retry closure at file:///home/a/.pub-cache/hosted/pub.dev/smithy_aws-0.7.8/lib/src/http/retry/aws_retryer.dart:173:41 @ aws_retryer.dart:174
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/smithy_aws-0.7.8/lib/src/http/retry/aws_retryer.dart:173:41 trampoline @ main.dart.wasm:0x4b014a
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_runZoned @ zone.dart:2034
$runZoned @ zone.dart:1960
$AWSRetryer.retry closure at file:///home/a/.pub-cache/hosted/pub.dev/smithy_aws-0.7.8/lib/src/http/retry/aws_retryer.dart:165:18 inner @ aws_retryer.dart:173
$AWSRetryer.retry closure at file:///home/a/.pub-cache/hosted/pub.dev/smithy_aws-0.7.8/lib/src/http/retry/aws_retryer.dart:165:18 @ aws_retryer.dart:165
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/smithy_aws-0.7.8/lib/src/http/retry/aws_retryer.dart:165:18 trampoline @ main.dart.wasm:0x4afb7d
$Future. closure at org-dartlang-sdk:///dart-sdk/lib/async/future.dart:257:15 @ future.dart:260
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future.dart:257:15 trampoline @ main.dart.wasm:0x3775db
$_rootRun @ zone.dart:1517
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.runGuarded @ zone.dart:1321
$_CustomZone.bindCallbackGuarded closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1362:12 @ zone.dart:1362
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1362:12 trampoline @ main.dart.wasm:0x347f28
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.bindCallback closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 @ zone.dart:1345
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 trampoline @ main.dart.wasm:0x347ee2
$_OneShotTimer._schedule closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/timer_patch.dart:128:66 @ timer_patch.dart:131
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/timer_patch.dart:128:66 trampoline @ main.dart.wasm:0x30b29c
$_invokeCallback @ timer_patch.dart:71
(anonymous) @ main.dart.mjs:615
setTimeout
_1574 @ main.dart.mjs:615
$_JSEventLoop._setTimeout @ main.dart.wasm:0x30b2ab
$_OneShotTimer._schedule @ timer_patch.dart:128
$new _Timer (constructor body) @ timer_patch.dart:115
$new _OneShotTimer (constructor body) @ timer_patch.dart:124
$_OneShotTimer @ timer_patch.dart:124
$Timer._createTimer @ timer_patch.dart:88
$_rootCreateTimer @ zone.dart:1636
$_rootCreateTimer tear-off trampoline @ main.dart.wasm:0x346f03
$_CustomZone.createTimer @ zone.dart:1482
$new Timer @ timer.dart:48
$Timer.run @ timer.dart:107
$new Future @ future.dart:257
$AWSRetryer.retry @ aws_retryer.dart:165
$HttpOperation.send @ http_operation.dart:203
$HttpOperation.run @ http_operation.dart:314
$GetIdOperation.run closure at file:///home/a/.pub-cache/hosted/pub.dev/amplify_auth_cognito_dart-0.11.13/lib/src/sdk/src/cognito_identity/operation/get_id_operation.dart:216:7 @ get_id_operation.dart:216
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/amplify_auth_cognito_dart-0.11.13/lib/src/sdk/src/cognito_identity/operation/get_id_operation.dart:216:7 trampoline @ main.dart.wasm:0x4ae68a
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_runZoned @ zone.dart:2034
$runZoned @ zone.dart:1960
$GetIdOperation.run (body) @ get_id_operation.dart:215
$GetIdOperation.run (unchecked entry) @ get_id_operation.dart:210
$CognitoIdentityClient.getId @ cognito_identity_client.dart:94
$WrappedCognitoIdentityClient.getId @ sdk_bridge.dart:149
$FetchAuthSessionStateMachine._getIdentityId closure at file:///home/a/.pub-cache/hosted/pub.dev/amplify_auth_cognito_dart-0.11.13/lib/src/state/machines/fetch_auth_session_state_machine.dart:133:7 @ fetch_auth_session_state_machine.dart:134
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/amplify_auth_cognito_dart-0.11.13/lib/src/state/machines/fetch_auth_session_state_machine.dart:133:7 trampoline @ main.dart.wasm:0x4a5891
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_runZoned @ zone.dart:2034
$runZoned @ zone.dart:1960
$FetchAuthSessionStateMachine._withZoneOverrides @ fetch_auth_session_state_machine.dart:104
$FetchAuthSessionStateMachine._getIdentityId inner @ fetch_auth_session_state_machine.dart:132
$FetchAuthSessionStateMachine._getIdentityId @ fetch_auth_session_state_machine.dart:128
$FetchAuthSessionStateMachine._retrieveAwsCredentials inner @ fetch_auth_session_state_machine.dart:467
$FetchAuthSessionStateMachine._retrieveAwsCredentials @ fetch_auth_session_state_machine.dart:457
$FetchAuthSessionStateMachine.onRefresh inner @ fetch_auth_session_state_machine.dart:426
$_awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 @ async_patch.dart:105
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 trampoline @ main.dart.wasm:0x2e658f
$_rootRunUnary @ zone.dart:1538
$_rootRunUnary tear-off trampoline @ main.dart.wasm:0x347aa6
$_CustomZone.runUnary @ zone.dart:1429
$_FutureListener.handleValue (body) @ future_impl.dart:222
$_FutureListener.handleValue (checked entry) @ future_impl.dart:221
$_Future._propagateToListeners closure handleValueCallback at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:946:33 @ future_impl.dart:948
$_Future._propagateToListeners @ future_impl.dart:977
$_Future._completeWithValue (body) @ future_impl.dart:720
$_Future._completeWithValue (unchecked entry) @ future_impl.dart:715
$_Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 @ future_impl.dart:804
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 trampoline @ main.dart.wasm:0x2e64b0
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.bindCallback closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 @ zone.dart:1345
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 trampoline @ main.dart.wasm:0x347ee2
$_microtaskLoop @ schedule_microtask.dart:40
$_startMicrotaskLoop @ schedule_microtask.dart:49
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x2e3cec
$_invokeCallback @ timer_patch.dart:71
(anonymous) @ main.dart.mjs:621
setTimeout
_1574 @ main.dart.mjs:615
$_JSEventLoop._setTimeout @ main.dart.wasm:0x30b2ab
$_OneShotTimer._schedule @ timer_patch.dart:128
$new _Timer (constructor body) @ timer_patch.dart:115
$new _OneShotTimer (constructor body) @ timer_patch.dart:124
$_OneShotTimer @ timer_patch.dart:124
$Timer._createTimer @ timer_patch.dart:88
$_rootCreateTimer @ zone.dart:1636
$_rootCreateTimer tear-off trampoline @ main.dart.wasm:0x346f03
$_CustomZone.createTimer @ zone.dart:1482
$new Timer @ timer.dart:48
$new Future.delayed @ future.dart:413
$StateMachine._listenForEvents closure at file:///home/a/.pub-cache/hosted/pub.dev/amplify_core-2.6.5/lib/src/state_machine/state_machine.dart:249:27 inner @ state_machine.dart:260
$StateMachine._listenForEvents closure at file:///home/a/.pub-cache/hosted/pub.dev/amplify_core-2.6.5/lib/src/state_machine/state_machine.dart:249:27 @ state_machine.dart:249
$closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/amplify_core-2.6.5/lib/src/state_machine/state_machine.dart:249:27 trampoline @ main.dart.wasm:0x43ccf0
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$EventCompleter.run @ event.dart:164
$StateMachine._listenForEvents inner @ state_machine.dart:249
$_awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 @ async_patch.dart:105
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 trampoline @ main.dart.wasm:0x2e658f
$_rootRunUnary @ zone.dart:1538
$_rootRunUnary tear-off trampoline @ main.dart.wasm:0x347aa6
$_CustomZone.runUnary @ zone.dart:1429
$_FutureListener.handleValue (body) @ future_impl.dart:222
$_FutureListener.handleValue (checked entry) @ future_impl.dart:221
$_Future._propagateToListeners closure handleValueCallback at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:946:33 @ future_impl.dart:948
$_Future._propagateToListeners @ future_impl.dart:977
$_Future._complete (body) @ future_impl.dart:711
$_Future._complete (checked entry) @ future_impl.dart:700
$_StreamIterator._onData (body) @ stream_impl.dart:1116
$_StreamIterator._onData (checked entry) @ stream_impl.dart:1108
$_StreamIterator._onData tear-off trampoline @ main.dart.wasm:0x43a3f0
$_rootRunUnary @ zone.dart:1538
$_rootRunUnary tear-off trampoline @ main.dart.wasm:0x347aa6
$_CustomZone.runUnary @ zone.dart:1429
$_CustomZone.runUnaryGuarded @ zone.dart:1329
$_BufferingStreamSubscription._sendData (body) @ stream_impl.dart:381
$_BufferingStreamSubscription._sendData (checked entry) @ stream_impl.dart:375
$_DelayedData.perform (body) @ stream_impl.dart:573
$_DelayedData.perform (checked entry) @ stream_impl.dart:572
$_PendingEvents.handleNext @ stream_impl.dart:678
$_PendingEvents.schedule closure at org-dartlang-sdk:///dart-sdk/lib/async/stream_impl.dart:645:23 @ stream_impl.dart:649
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/stream_impl.dart:645:23 trampoline @ main.dart.wasm:0x2ee255
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.bindCallback closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 @ zone.dart:1345
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 trampoline @ main.dart.wasm:0x347ee2
$_microtaskLoop @ schedule_microtask.dart:40
$_startMicrotaskLoop @ schedule_microtask.dart:49
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x2e3cec
$_invokeCallback @ timer_patch.dart:71
(anonymous) @ main.dart.mjs:621
setTimeout
_1574 @ main.dart.mjs:615
$_JSEventLoop._setTimeout @ main.dart.wasm:0x30b2ab
$_OneShotTimer._schedule @ timer_patch.dart:128
$new _Timer (constructor body) @ timer_patch.dart:115
$new _OneShotTimer (constructor body) @ timer_patch.dart:124
$_OneShotTimer @ timer_patch.dart:124
$Timer._createTimer @ timer_patch.dart:88
$_rootCreateTimer @ zone.dart:1636
$_rootCreateTimer tear-off trampoline @ main.dart.wasm:0x346f03
$_CustomZone.createTimer @ zone.dart:1482
$new Timer @ timer.dart:48
$new Future.delayed @ future.dart:413
$EnginePlatformDispatcher.replyToPlatformMessage @ platform_dispatcher.dart:1285
$EnginePlatformDispatcher._handleFlutterAssetsMessage inner @ platform_dispatcher.dart:663
$_awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 @ async_patch.dart:105
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:104:5 trampoline @ main.dart.wasm:0x2e658f
$_rootRunUnary @ zone.dart:1538
$_rootRunUnary tear-off trampoline @ main.dart.wasm:0x347aa6
$_CustomZone.runUnary @ zone.dart:1429
$_FutureListener.handleValue (body) @ future_impl.dart:222
$_FutureListener.handleValue (checked entry) @ future_impl.dart:221
$_Future._propagateToListeners closure handleValueCallback at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:946:33 @ future_impl.dart:948
$_Future._propagateToListeners @ future_impl.dart:977
$_Future._completeWithValue (body) @ future_impl.dart:720
$_Future._completeWithValue (unchecked entry) @ future_impl.dart:715
$_Future._asyncCompleteWithValue closure at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 @ future_impl.dart:804
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/future_impl.dart:803:29 trampoline @ main.dart.wasm:0x2e64b0
$_rootRun @ zone.dart:1525
$_rootRun tear-off trampoline @ main.dart.wasm:0x347b06
$_CustomZone.run @ zone.dart:1422
$_CustomZone.bindCallback closure at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 @ zone.dart:1345
$closure wrapper at org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1345:12 trampoline @ main.dart.wasm:0x347ee2
$_microtaskLoop @ schedule_microtask.dart:40
$_startMicrotaskLoop @ schedule_microtask.dart:49
$_startMicrotaskLoop tear-off trampoline @ main.dart.wasm:0x2e3cec
$_invokeCallback @ timer_patch.dart:71
(anonymous) @ main.dart.mjs:621
main.dart.mjs:66 DEBUG | SignInStateMachine | Device secrets not present for user: [email protected]
main.dart.mjs:66 FINE: 2025-09-18 13:40:02.012: AWS.Amplify.AmplifyAuthCognito.SignInStateMachine: Device secrets not present for user: [email protected]
main.dart.mjs:66 FINE: 2025-09-18 13:40:02.036: AWS.ASFContextDataProvider.ASFWorker: Spawning worker at packages/amplify_auth_cognito_dart/src/workers/workers.js
Refused to execute script from 'http://localhost:38225/packages/amplify_auth_cognito_dart/src/workers/workers.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login:1 Refused to execute script from 'http://localhost:38225/packages/amplify_auth_cognito_dart/src/workers/workers.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
main.dart.mjs:66 FINE: 2025-09-18 13:40:02.051: AWS.ASFContextDataProvider.ASFWorker: Error initializing worker: WorkerBeeExceptionImpl {
main.dart.mjs:66   error=An unknown error occurred,
main.dart.mjs:66 }
main.dart.mjs:66 FINE: 2025-09-18 13:40:02.052: AWS.ASFContextDataProvider.ASFWorker: Spawning worker at packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js
Refused to execute script from 'http://localhost:38225/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login:1 Refused to execute script from 'http://localhost:38225/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
main.dart.mjs:66 FINE: 2025-09-18 13:40:02.063: AWS.ASFContextDataProvider.ASFWorker: Error initializing worker: WorkerBeeExceptionImpl {
main.dart.mjs:66   error=An unknown error occurred,
main.dart.mjs:66 }
main.dart.mjs:66 FINE: 2025-09-18 13:40:02.065: AWS.ASFContextDataProvider.ASFWorker: Spawning worker at http://localhost:38225/login/test/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js
Refused to execute script from 'http://localhost:38225/login/test/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login:1 Refused to execute script from 'http://localhost:38225/login/test/packages/amplify_auth_cognito_dart/src/workers/workers.debug.dart.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
main.dart.mjs:66 FINE: 2025-09-18 13:40:02.091: AWS.ASFContextDataProvider.ASFWorker: Error initializing worker: WorkerBeeExceptionImpl {
main.dart.mjs:66   error=An unknown error occurred,
main.dart.mjs:66 }
main.dart.mjs:66 FINE: 2025-09-18 13:40:02.094: AWS.ASFContextDataProvider.ASFWorker: Error in worker: WorkerBeeExceptionImpl {
main.dart.mjs:66   error=Could not launch web worker.,
main.dart.mjs:66   stackTrace=main.dart.wasm 1:3040619  module0._awaitHelper closure at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:107:14
main.dart.mjs:66 main.dart.wasm 1:3040699  module0.closure wrapper at org-dartlang-sdk:///dart-sdk/lib/_internal/wasm/lib/async_patch.dart:107:14 trampoline
main.dart.mjs:66 main.dart.wasm 1:4527950  module0.StackZoneSpecification._registerBinaryCallback closure at file:///home/a/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib/src/stack_zone_specification.dart:138:36
main.dart.mjs:66 main.dart.wasm 1:4528173  module0.closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib/src/stack_zone_specification.dart:138:36 trampoline
main.dart.mjs:66 main.dart.wasm 1:4528282  module0.StackZoneSpecification._run
main.dart.mjs:66 main.dart.wasm 1:4527853  module0.StackZoneSpecification._registerBinaryCallback closure at file:///home/a/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib/src/stack_zone_specification.dart:138:15
main.dart.mjs:66 main.dart.wasm 1:4528146  module0.closure wrapper at file:///home/a/.pub-cache/hosted/pub.dev/stack_trace-1.12.1/lib/src/stack_zone_specification.dart:138:15 trampoline
main.dart.mjs:66 ===== asynchronous gap ===========================
main.dart.mjs:66 main.dart.wasm 1:3432013  module0._CustomZone.registerCallback
main.dart.mjs:66 main.dart.wasm 1:3431654  module0._CustomZone.bindCallbackGuarded
main.dart.mjs:66 main.dart.wasm 1:3029471  module0._rootScheduleMicrotask
main.dart.mjs:66 main.dart.wasm 1:3036066  module0._rootScheduleMicrotask tear-off trampoline
main.dart.mjs:66 ===== asynchronous gap ===========================
main.dart.mjs:66 main.dart.wasm 1:3432607  module0._CustomZone.registerBinaryCallback
main.dart.mjs:66 main.dart.wasm 1:3039228  module0._registerErrorHandler
main.dart.mjs:66 main.dart.wasm 1:3039009  module0._Future.then
main.dart.mjs:66 main.dart.wasm 1:3028946  module0._awaitHelper
main.dart.mjs:66 ===== asynchronous gap ===========================
main.dart.mjs:66 main.dart.wasm 1:3432607  module0._CustomZone.registerBinaryCallback
main.dart.mjs:66 main.dart.wasm 1:3039228  module0._registerErrorHandler
main.dart.mjs:66 main.dart.wasm 1:3039009  module0._Future.then
main.dart.mjs:66 main.dart.wasm 1:3028946  module0._awaitHelper
main.dart.mjs:66 ===== asynchronous gap ===========================
main.dart.mjs:66 main.dart.wasm 1:3432607  module0._CustomZone.registerBinaryCallback
main.dart.mjs:66 main.dart.wasm 1:3039228  module0._registerErrorHandler
main.dart.mjs:66 main.dart.wasm 1:3039009  module0._Future.then
main.dart.mjs:66 main.dart.wasm 1:3028946  module0._awaitHelper
main.dart.mjs:66 ,
main.dart.mjs:66 }

asaarnak avatar Sep 18 '25 10:09 asaarnak

@tyllark If it helps, but this is my build folder. The workers.debug.dart.js file doesn't exist in build folder. Also the /packages/ maybe should be /assets/packages/?

Image

asaarnak avatar Sep 18 '25 10:09 asaarnak

And when building without the --wasm its in correct /packages/ folder.

Image

asaarnak avatar Sep 18 '25 11:09 asaarnak

And with the soloud we also needed to add these lines to our index.html.

  <script src="assets/packages/flutter_soloud/web/libflutter_soloud_plugin.js" defer></script>
  <script src="assets/packages/flutter_soloud/web/init_module.dart.js" defer></script>

asaarnak avatar Sep 18 '25 11:09 asaarnak

@tyllark Did you have time to take a look at this worker.js issue?

asaarnak avatar Sep 22 '25 14:09 asaarnak

Hello @asaarnak, I've been working to update the build process on our end so we can properly generate/load the new WASM files produced by build_web_compilers. So far I've updated our code generation tools and Auth Cognito to support the new files, but I've ran into a few roadblocks along the way. I've been modifying my .pub-cache locally as a work around, but there are 2 Flutter team packages that I need to reach out to for updates.

  1. crypto is conditionally importing web code but they are using previous non-wasm compatible libraries in the check.
  2. build_web_compilers generates the JS mapping file workers.debug.dart2js.js.map as expected, but the dart2js_archive_extractor post process builder that extracts this file is not emitting the map file to other Builders.

Once those are addressed I still need to:

  1. Migrate the remaining build.yaml files to support WASM
  2. Extensive testing for all categories
  3. Update Github Actions to test WASM builds

tyllark avatar Sep 22 '25 16:09 tyllark

@tyllark I was wondering if there are any crypto or build_web_compilers issue yet that i could follow? We are waiting for the --wasm support and would be cool the see the progress.

asaarnak avatar Sep 26 '25 08:09 asaarnak

Hello @asaarnak, Ill create the issues today and Ill reply back here with the links.

tyllark avatar Sep 29 '25 12:09 tyllark

@asaarnak I've created the Crypto and build_web_compilers issues. Once we hear back from them we can unblock our WASM task!

Update: Crypto changes have been merged!

tyllark avatar Sep 30 '25 02:09 tyllark

@tyllark Seems that we are now waiting for the crypto release only. Can we already test this?

asaarnak avatar Oct 30 '25 15:10 asaarnak

Hello @asaarnak, I've updated to build_web_compilers: ^4.3.2 and I'm locally using a dependency override for crypto:

dependency_overrides:
  crypto:
    git:
      url: https://github.com/dart-lang/core.git
      ref: main
      path: pkgs/crypto

amplify_auth_cognito_dart is now able to build for web and it is producing the correct output files, so I'll mark this task as unblocked and will look to pick it up in the upcoming sprint. We won't be able to release the changes until Crypto does their release, but in the meantime I have the following known tasks on my end:

  • Update how we load the new "entrypoint loader" provided by build_web_compilers as it is throwing exceptions
  • Add WASM tests to our continuous integration process

tyllark avatar Oct 30 '25 21:10 tyllark

@tyllark The crypto: ^3.0.7 is also released now. Let me know if i can test it locally.

asaarnak avatar Nov 04 '25 10:11 asaarnak

Hello @asaarnak, thank you for the heads up! Ill ping you here once we have changes you can test locally.

tyllark avatar Nov 05 '25 09:11 tyllark

Hei @tyllark, any updates on this?

asaarnak avatar Nov 18 '25 09:11 asaarnak

Hello @asaarnak, we do not have an update at this time. I'm working to get this prioritized given the amount of progress we've already made. I'll post here once we have an update.

tyllark avatar Nov 18 '25 18:11 tyllark

@ekjotmultani @tyllark Hei! Any news on this issue?

asaarnak avatar Dec 09 '25 11:12 asaarnak

@tyllarkHi, our team is eagerly awaiting the WASM update.

suryaishnavi avatar Dec 18 '25 08:12 suryaishnavi