FormidableLabs / FormidableLabs/react-native-app-auth
App freezes when calling prefetchConfiguration with no internet connection
- Ngôn ngữ chính
- Java
- Star
- 2.3k
- Fork
- 473
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
## 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với lời gọi prefetchConfiguration được hiển thị trong config.js và tái hiện lời gọi đó trên cả hai nền tảng khi thiết bị ngoại tuyến. Theo dõi cách lỗi mạng được xử lý, sau đó xác minh rằng ứng dụng không còn bị treo và bên gọi có thể quan sát được lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, react-native
- Lĩnh vực
- authentication, mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100