react-native-documents / document-picker

Document Picker for React Native
https://react-native-documents.github.io/
MIT License
1.35k stars 441 forks source link

Thread 1: "*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]" #517

Closed my-name-is-nheo closed 2 years ago

my-name-is-nheo commented 2 years ago

Bug report

image

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:

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