You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When launching my app I'm receiving a MissingPluginException. I have configured Auth via the Amplify CLI using the default configurations and I can confirm that the Auth resources are pushed to the cloud. I've checked amplifyconfiguration.dart and the keys do match. The error also occurs when I start a fresh project and follow the Amplify Project Setup tutorial
I've tried lots of suggestions from GitHub and Stackoverflow including:
restarting the app, run flutter clean then flutter pub get
updating all my dependencies
Invalidated caches & restarted Android Studio
ensured widgets are initialized by calling WidgetsFlutterBinding.ensureInitialized() in main()
ensured I'm not calling Amplify.configure() before the Auth plugin is loaded
started a completely new project and reinitialized Amplify
amplify add auth (use default config), then amplify push
Run project in web, iOS or Android
Expected Behavior
No errors
Current behavior
Error: MissingPluginException(No implementation found for method configure on channel com.amazonaws.amplify/amplify)
at Object.throw_ [as throw] (http://localhost:56261/dart_sdk.js:5331:11)
at MethodChannel._invokeMethod (http://localhost:56261/packages/flutter/src/services/system_channels.dart.lib.js:954:21)
at _invokeMethod.next (<anonymous>)
at http://localhost:56261/dart_sdk.js:39029:33
at _RootZone.runUnary (http://localhost:56261/dart_sdk.js:38886:58)
at _FutureListener.thenAwait.handleValue (http://localhost:56261/dart_sdk.js:33872:29)
at handleValueCallback (http://localhost:56261/dart_sdk.js:34432:49)
at Function._propagateToListeners (http://localhost:56261/dart_sdk.js:34470:17)
at _Future.new.[_completeWithValue] (http://localhost:56261/dart_sdk.js:34312:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:56261/dart_sdk.js:34335:35)
at Object._microtaskLoop (http://localhost:56261/dart_sdk.js:39173:13)
at _startMicrotaskLoop (http://localhost:56261/dart_sdk.js:39179:13)
at http://localhost:56261/dart_sdk.js:34686:9
Platform
[x] Web
[] Android
[] iOS
Additional context main.dart (copied directly from the tutorial)
class _MyHomePageState extends State<MyHomePage> {
@override
initState() {
super.initState();
_configureAmplify();
}
void _configureAmplify() async {
AmplifyAuthCognito authPlugin = AmplifyAuthCognito();
Amplify.addPlugin(authPlugin);
try {
await Amplify.configure(amplifyconfig); # <--- this is what throws the MissingPluginException
} on AmplifyAlreadyConfiguredException {
print(
"Tried to reconfigure Amplify; this can occur when your app restarts on Android.");
}
}
...
}
@roberthelmick08 Amplify-flutter currently doesn't support Web platform and it's expected to get this error when running on Web platform. Please see #234
You mentioned you are getting this error on iOS and Android, can you paste the logs here that you see from these platforms?
Sorry, that was a typo, I am only getting the error on the web--I edited the post just now.
Are there any plans to support amplify-flutter on the web?
Also perhaps the Amplify-Flutter documentation should be updated. It reads "The open-source Amplify Framework provides the following products to build fullstack iOS, Android, Flutter, Web, and React Native apps". It would have been helpful to explicitly state that web isn't supported
@roberthelmick08 We are evaluating the support for web platform in amplify-flutter library. Please +1 at #234.
Also perhaps the Amplify-Flutter documentation should be updated. It reads "The open-source Amplify Framework provides the following products to build fullstack iOS, Android, Flutter, Web, and React Native apps". It would have been helpful to explicitly state that web isn't supported
I agree that this is confusing. Amplify does support web but not from amplify-flutter library. See Amplify JavaScript . We'll update the docs to clarify that.
Describe the bug
When launching my app I'm receiving a
MissingPluginException
. I have configured Auth via the Amplify CLI using the default configurations and I can confirm that the Auth resources are pushed to the cloud. I've checkedamplifyconfiguration.dart
and the keys do match. The error also occurs when I start a fresh project and follow the AmplifyProject Setup
tutorialI've tried lots of suggestions from GitHub and Stackoverflow including:
flutter clean
thenflutter pub get
WidgetsFlutterBinding.ensureInitialized()
inmain()
Amplify.configure()
before the Auth plugin is loadedTo Reproduce
Steps to reproduce the behavior:
Follow the 'Project Setup' tutorial
amplify add auth
(use default config), thenamplify push
Run project in web, iOS or Android
Expected Behavior
No errors
Current behavior
Platform
[x] Web
[] Android
[] iOS
Additional context
main.dart
(copied directly from the tutorial)pubspec.yaml:
The text was updated successfully, but these errors were encountered: