以下の内容はhttps://www.aruse.net/entry/2019/07/20/081510より取得しました。


Solved,[Unhandled promise rejection: Error: No credentials, applicationId or region]

Expo + Amplify で iOS Simulator を実行しところ以下のエラーが表示されました。

 [Unhandled promise rejection: Error: No credentials, applicationId or region]
- node_modules/@aws-amplify/analytics/lib/Providers/AWSPinpointProvider.js:189:76 in <unknown>
- node_modules/@aws-amplify/analytics/lib/Providers/AWSPinpointProvider.js:40:27 in step
- ... 11 more stack frames from framework internals

解決策はApp.tsxまたはApp.jsから以下の2行を削除します。(Solution. Delete below 2 line from App.tsx or App.js.)

import config from './aws-exports';
Amplify.configure(config);

代わりに以下の設定を追加します。(Instead, Add following config.)

Amplify.configure({
  Auth: {
    // REQUIRED - Amazon Cognito Identity Pool ID
    identityPoolId: '.....', 
    // REQUIRED - Amazon Cognito Region
    region: '.....', 
    // OPTIONAL - Amazon Cognito User Pool ID
    userPoolId: '.....',
    // OPTIONAL - Amazon Cognito Web Client ID
    userPoolWebClientId: '....', 
    oauth: {},
  },
  Analytics:{
    disabled:true
  },
});

これでエラーが出なくなりました。(I solved the error.)

下記サイトを参考にしました。

stackoverflow.com




以上の内容はhttps://www.aruse.net/entry/2019/07/20/081510より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14