Unable to load Amplify Auth Plugin inside a Embedded Flutter Web App #5421
Labels
auth
Issues related to the Auth Category
pending-close-response-required
The issue will be closed if details necessary to reproduce the issue are not provided within 7 days.
pending-community-response
Pending response from the issue opener or other community members
question
A question about the Amplify Flutter libraries
Description
When I load a embedded Web App with the Amplify plugin, I am getting an error loading Amplify Auth Plugin.
The error I see is
workers.min.js:1 Uncaught SyntaxError: Unexpected token '<' (at workers.min.js:1:1)
And when I try to look at the file, this file is loaded from Web root context and hence the library could not be loaded. The path I see is https://localhost:3000/....../test/packages/amplify_auth_cognito_dart/src/workers/workers.release.dart.js
This is breaking the Amplify Auth inside the Flutter Embedded Web App.
The same error is not happening when trying to host the full flutter app in Amplify hosting. Please look in to this and suggest a solution.
Categories
Steps to Reproduce
Build the flutter app using the command flutter build web --web-renderer canvaskit --release --target=lib/main.dart
Copy the build/web contents and paste it inside public folder of react application
Load the Flutter inside React component using
if (window._flutter && window._flutter.loader) {
window._flutter.loader.loadEntrypoint({
entrypointUrl: "/flutter/main.dart.js",
Screenshots
No response
Platforms
Flutter Version
3.22.2
Amplify Flutter Version
2.4.0
Deployment Method
Amplify Gen 2
Schema
No response
The text was updated successfully, but these errors were encountered: