FormidableLabs / FormidableLabs/react-native-app-auth
App freezes when calling prefetchConfiguration with no internet connection
- 主要言語
- Java
- スター
- 2.3k
- フォーク
- 473
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## Issue
When calling prefetchConfiguration with device in airplane mode or with no internet connection the app freezes.
This is the error I get: E/AppAuth: Network error when retrieving discovery document.
config.js file
```js
import { prefetchConfiguration } from 'react-native-app-auth';
const config = {
warmAndPrefetchChrome: true,
issuer: 'https://login.microsoftonline.com/1caa43b8-bf09-48b6-9b3c-bd5a56fec019',
clientId: '5e0b7c9c-aaaa-472a-8ec6-6362c6d56fbe',
redirectUrl: 'msauth.com.rccl.oauth://auth/',
additionalParameters: {},
scopes: ['openid', 'profile', 'email', 'offline_access'],
};
prefetchConfiguration(config);
export default config;
```
Also tried using try/catch, still the app freezes.
```js
try{
prefetchConfiguration(config);
}catch (error) {
console.log(error);
}
```
## Environment
RN: 0.59.4
react-native-app-auth: ^4.4.0
* **Your Identity Provider**: Azure
* **Platform that you're experiencing the issue on**: both
* **Are you using Expo?** No
コントリビューションガイド
調査の方向性
config.js に示されている prefetchConfiguration 呼び出しから始め、デバイスをオフラインにした状態で両方のプラットフォーム上で再現します。ネットワークエラーがどのように処理されるかを追跡し、その後、アプリがフリーズしなくなり、呼び出し元が失敗を把握できることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react-native
- 領域
- authentication, mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100