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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南