-
Notifications
You must be signed in to change notification settings - Fork 263
Description
Description
I have Amplify setup for Auth, API and Datastore. They are configured without an issue on app launch. However, upon killing the app and relaunching, amplify configuration fails with below error.
AmplifyException{message=User-Agent was already configured successfully., cause=null, recoverySuggestion=User-Agent is configured internally during Amplify configuration. This method should not be called externally.}
I am not sure where it's picking User-agent from. I understand it is set automatically by Amplify. Amplify.isConfigured is indeed false before reconfiguration. So I know it is not configured before trying again.
Any ideas or thoughts are much appreciated
If it helps, the exception is being triggered in amplify_datastore.dart at this code
try {
final nativeBridge = NativeAmplifyBridge();
await nativeBridge.configure(
Amplify.version,
jsonEncode(config.toJson()),
);
} on PlatformException catch (e) {
if (e.code == 'AmplifyException') {
throw AmplifyException.fromMap(
Map<String, String>.from(e.details as Map),
);
return;
}
Categories
- Analytics
- API (REST)
- API (GraphQL)
- Auth
- Authenticator
- DataStore
- Notifications (Push)
- Storage
Steps to Reproduce
- Create an Amplify flutter project with Auth, API and Datastore
- Configure it with Amplify.configure
- Kill and relaunch the app to re-configure Amplify
- Watch for configuration exception.
Screenshots
No response
Platforms
- iOS
- Android
- Web
- macOS
- Windows
- Linux
Flutter Version
3.34.4
Amplify Flutter Version
2.5.0
Deployment Method
Amplify Gen 2
Schema
No response