Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
my-name-is-nheo opened this issue Dec 16, 2021 · 15 comments

Comments

@my-name-is-nheo
Copy link

Bug report

image

Summary

simulator crashes leading to this error, works fine on physical device

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

@swathytechversant
Copy link

I am having the same issue, anyone have any solution for this. crash is in both simulator and real device.
react: 17.0.2
react-native: 0.66.4
react-native-file-viewer: 2.1.5

@palmsey
Copy link

palmsey commented Jan 4, 2022

I'm getting the same error.

react: 16.13.1
react-native: 0.63.4
react-native-file-viewer: 2.1.5
iOS: 15.2

@tdinckaya
Copy link

same problem

@palmsey
Copy link

palmsey commented Jan 5, 2022

I think this is specific to M1 Macs. I noticed the same issue reported for a similar function in a different package: RonRadtke/react-native-blob-util#80

@tosifkhan01
Copy link

any solution yet?

@my-name-is-nheo @swathytechversant @tdinckaya @palmsey

@georgetk
Copy link

georgetk commented Feb 15, 2022

Hi, what @palmsey said is correct. This package isn't supporting the latest iOS version simulators on M1 Macs. But it is working fine in iOS version 13.7 simulator running on M1 Mac. I'm using iPhone 8 Plus simulator on M1 Mac and it works fine: npx react-native run-ios --simulator="iPhone 8 Plus (13.7)"

Also, I've verified the working of release version app in iPhone SE (14.1) device, iPhone 13 (15.1) device and iPhone 13 (15) browserstack (functionality worked but crashes occurred sometimes).

Specifically, I tried only this feature - await FileViewer.open(path);

@ybrdev
Copy link

ybrdev commented Mar 24, 2022

Hi, what @palmsey said is correct. This package isn't supporting the latest iOS version simulators on M1 Macs. But it is working fine in iOS version 13.7 simulator running on M1 Mac. I'm using iPhone 8 Plus simulator on M1 Mac and it works fine: npx react-native run-ios --simulator="iPhone 8 Plus (13.7)"

Also, I've verified the working of release version app in iPhone SE (14.1) device, iPhone 13 (15.1) device and iPhone 13 (15) browserstack (functionality worked but crashes occurred sometimes).

Specifically, I tried only this feature - await FileViewer.open(path);

Just try and it worked on iPhone 11 simulator iOS 13.7 but it will crash on iOS 15.2

@akucharczyk
Copy link

Crashes now on Simulator and iOS device. iOS 15.5

@ismail-sk
Copy link

ismail-sk commented Sep 26, 2022

i Have same issue;

Thread 66: "*** -[_NSPlaceholderData initWithBase64EncodedString:options:]: nil string argument"

Crashes in iOS 15.4 and16.0 simulator

RN: 0.65.1
macOS montenery 12.6 ( intel i9 )
xCode 14

Maybe important a point! AND MAYBE SOLUTION -->

our backend server some time return 500 error even if we send same value and parameters.
when 500 error hapen; our old code save this to storage.
after saving; other codes try to read it and crashing on this point. so i recomend make sure you read a readable file and setted correct value for mimeType.

@socialcode-rob1
Copy link

socialcode-rob1 commented Sep 28, 2022

I'm seeing the same issue.

iOS simulator: iPhone 13 (iOS 15.5)
react-native-filer-viewer: 2.1.5

Info

System:
    OS: macOS 12.3.1
    CPU: (8) arm64 Apple M1
    Memory: 110.05 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.17.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.15.0 - /opt/homebrew/bin/npm
    Watchman: 2022.09.05.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8815526
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.66.4 => 0.66.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@zhangfuchao
Copy link

same problem

@NguyenHoangMinhkkkk
Copy link

same problem, crash every time FileViewer.open(path)

arm64 Apple M1
xcode 14.0.1
RN 0.63.4
RNFileViewer 2.1.5

@MensurRasic
Copy link

Same problem here!

@murilokrugner
Copy link

same problem, but on intel, contrary to what they are talking about

@prajay-dev
Copy link

I have the same issue here. npx react-native info output:
System:
OS: macOS 15.2
CPU: (8) arm64 Apple M1
Memory: 186.19 MB / 8.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 23.5.0
path: /opt/homebrew/bin/node
Yarn:
version: 3.6.4
path: /opt/homebrew/bin/yarn
npm:
version: 10.9.2
path: /opt/homebrew/bin/npm
Watchman:
version: 2024.12.02.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path:"path"
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.1
- iOS 18.1
- macOS 15.1
- tvOS 18.1
- visionOS 2.1
- watchOS 11.1
Android SDK:
API Levels:
- "23"
- "31"
- "33"
- "34"
- "35"
Build Tools:
- 30.0.3
- 33.0.1
- 33.0.2
- 34.0.0
- 35.0.0
System Images:
- android-35 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23339.11.2421.12700392
Xcode:
version: 16.1/16B40
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.13
path: /opt/homebrew/opt/openjdk@17/bin/javac
Ruby:
version: 3.1.2
path: ""
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.3
wanted: 0.76.3
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests