Closed my-name-is-nheo closed 2 years ago
simulator crashes leading to this error, works fine on physical device. I am using typescript
RNFS.downloadFile(options) .promise.then(() => FileViewer.open(localFile, { onDismiss: () => RNFS.unlink(localFile) }) .then(() => console.log('File Success')) .catch(() => console.log('opening file')) ) .catch(() => displayMessage('cannot be viewed', true));
npx react-native info output:
npx react-native info
System: OS: macOS 12.0 CPU: (8) x64 Apple M1 Pro Memory: 39.64 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node Yarn: Not Found npm: 8.1.4 - ~/.nvm/versions/node/v16.13.1/bin/npm Watchman: 2021.10.18.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7784292 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: ^17.0.2 => 17.0.2 react-native: ^0.66.3 => 0.66.3 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found
library version: 2.1.5
iOS version: 15.0.0
Bug report
Summary
simulator crashes leading to this error, works fine on physical device. I am using typescript
Reproducible sample code
RNFS.downloadFile(options) .promise.then(() => FileViewer.open(localFile, { onDismiss: () => RNFS.unlink(localFile) }) .then(() => console.log('File Success')) .catch(() => console.log('opening file')) ) .catch(() => displayMessage('cannot be viewed', true));
Environment info
npx react-native info
output:library version: 2.1.5
iOS version: 15.0.0