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
sisygoboom opened this issue
Jun 9, 2024
· 4 comments
Labels
authIssues related to the Auth CategorybugSomething is not working; the issue has reproducible steps and has been reproducedduplicateThis issue or pull request already exists
I'm getting a json validation error on valid json in the amplifyconfiguration.dart file while calling Amplify.configure(). For what its worth, I tested with and without plugins and got the same error.
Error log:
Installing build\app\outputs\flutter-apk\app-debug.apk... 2,990ms
E/flutter ( 4331): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: ConfigurationError {
E/flutter ( 4331): "message": "The provided configuration is not a valid json. Check underlyingException.",
E/flutter ( 4331): "recoverySuggestion": "Inspect your amplifyconfiguration.dart and ensure that the string is proper json"
E/flutter ( 4331): }
E/flutter ( 4331): #0 AmplifyClass.configure (package:amplify_core/src/amplify_class.dart:121:9)
E/flutter ( 4331): #1 _configureAmplify (package:datingapp/main.dart:40:19)
E/flutter ( 4331): <asynchronous suspension>
E/flutter ( 4331): #2 main (package:datingapp/main.dart:23:5)
E/flutter ( 4331): <asynchronous suspension>
E/flutter ( 4331):
E/flutter ( 4331): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: ConfigurationError {
E/flutter ( 4331): "message": "The provided configuration is not a valid json. Check underlyingException.",
E/flutter ( 4331): "recoverySuggestion": "Inspect your amplifyconfiguration.dart and ensure that the string is proper json"
E/flutter ( 4331): }
E/flutter ( 4331): #0 AmplifyClass.configure (package:amplify_core/src/amplify_class.dart:121:9)
E/flutter ( 4331): #1 _configureAmplify (package:datingapp/main.dart:40:19)
E/flutter ( 4331): <asynchronous suspension>
E/flutter ( 4331): #2 main (package:datingapp/main.dart:23:5)
E/flutter ( 4331): <asynchronous suspension>
E/flutter ( 4331):
Syncing files to device sdk gphone64 x86 64... 243ms
there are two types of Amplify configuration files... I encountered the same issue while working with Amplify Gen2 and flutter. What helped me was adding: --outputs-version 0
to my create command.
Hi @printSamuel, I have been using that command for weeks now and it worked fine until recently. not using --outputs-version 0 creates a completely different file named amplify_output.dart rather than apmlifyconfiguration.dart
sisygoboom
changed the title
Amplify.configure() incorrectly throws JSON parsing validation error on valid JSON string
Amplify.configure() incorrectly throws JSON parsing validation error on valid JSON string. Improve error login on Amplify.configure()
Jun 9, 2024
@sisygoboom Sorry that you are facing this issue. We will look into this and get back to you when we have updates.
NikaHsn
added
bug
Something is not working; the issue has reproducible steps and has been reproduced
duplicate
This issue or pull request already exists
auth
Issues related to the Auth Category
labels
Jun 10, 2024
Based on the provided amplifyconfiguration.dart the "OAuth" configuration is missing the "AppClientId" which is a required field. there is an open issue for this aws-amplify/amplify-backend#1551
We also have an open issue for improving error messages of Amplify.configure() API #4922 so I marked this issue as duplicate of #4922
thanks for opening this issue and please feel free to open a new issue if you faced any other problem.
authIssues related to the Auth CategorybugSomething is not working; the issue has reproducible steps and has been reproducedduplicateThis issue or pull request already exists
Description
I'm getting a json validation error on valid json in the amplifyconfiguration.dart file while calling Amplify.configure(). For what its worth, I tested with and without plugins and got the same error.
Error log:
apmlifyconfiguration.dart
main.dart:
Categories
Steps to Reproduce
flutter run
Screenshots
No response
Platforms
Flutter Version
3.22.1
Amplify Flutter Version
2.1.0
Deployment Method
AWS CDK
Schema
No response
The text was updated successfully, but these errors were encountered: