What does "Could not cast config to JSONValue" error mean?

0
Underlying error message: Could not cast incoming configuration to JSONValue, recoverySuggestion: Remove amplify plugins from your pubspec.yaml that you are not using in your app.,

What does this error suggest? My guess so far was the custom auth configs that I set up using amplify add auth > manual config, but nothing seems to solve this issue.

1 Answer
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:

  1. Undo any current changes by running ‘amplify env pull —restore'
  2. If you haven’t created the auth resource by pushing to the cloud yet, please do this
  3. 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/

profile pictureAWS
Kary
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions