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 年前266 查看次数
1 回答
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
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则