1 Answer
- Newest
- Most votes
- Most comments
0
When initializing Amplify, it automatically generates the files, “ amplify configuration.json, aws configuration.json” and modifies the content in the these files. The error message, “ Could not cast incoming configuration to JSONValue,” indicates that the the files mentioned, neither have a valid JSON format. Please kindly confirm that the files are in JSON format. [1]
Please kindly try:
- Undo any current changes by running ‘amplify env pull —restore'
- If you haven’t created the auth resource by pushing to the cloud yet, please do this
- After the ‘amplify push’ command is completed with general setup, kindly try to make custom changes to the files
References: [1] Amplify backend: https://docs.amplify.aws/start/getting-started/add-api/q/integration/react-native/
answered a year ago
Relevant content
- Accepted Answerasked a year ago
- asked 5 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
I am following the docs for flutter and since I added amplify api package I am getting same error. If I remove the package the error disappear.
Basically this documentation is wrong: https://docs.amplify.aws/start/getting-started/add-api/q/integration/flutter/
There is no word about API installation. I personally just made it via the official docs and amplify cli then the error disappear. But this documentation is misleading :( And now I am stuck with no auto sync between the app and the cloud.