ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: AnalyticsException(message: Unable to read appId or region from the amplify configuration json., recoverySuggestion: Make sure amplifyconfiguration.json is a valid json object in expected format. #1071
Labels
analytics
Issues related to the Amplify Analytics Category
pending-close-response-required
The issue will be closed if details necessary to reproduce the issue are not provided within 7 days.
I downloaded this sample project:
But I get the following error, when caled Amplify.configue(amplifyconfig):
E/flutter ( 5798): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: AnalyticsException(message: Unable to read appId or region from the amplify configuration json., recoverySuggestion: Make sure amplifyconfiguration.json is a valid json object in expected format. Please take a look at the documentation for expected format of amplifyconfiguration.json., underlyingException: org.json.JSONException: No value for pinpointAnalytics) E/flutter ( 5798): #0 AmplifyClass.configure (package:amplify_flutter/amplify.dart:171:9) E/flutter ( 5798): E/flutter ( 5798): #1 _MyAppState._initAmplifyFlutter (package:sample_app/main.dart:65:7) E/flutter ( 5798): E/flutter ( 5798):
This is some of the code:
@OverRide
initState() {
super.initState();
_initAmplifyFlutter();
}
void _initAmplifyFlutter() async {
AmplifyAuthCognito auth = AmplifyAuthCognito();
AmplifyStorageS3 storage = AmplifyStorageS3();
AmplifyAnalyticsPinpoint analytics = AmplifyAnalyticsPinpoint();
}
Also, my amplifyconfiguation.dart seems to look fine;
I have run:
amplify add auth
amplify add storage
amplify push
Here are my dependancies in pubspec.yaml
file_picker: ^4.0.0
amplify_flutter: 0.2.7
amplify_analytics_pinpoint: 0.2.7
amplify_auth_cognito: 0.2.7
amplify_storage_s3: 0.2.7
Still no luck. Thanks
The text was updated successfully, but these errors were encountered: