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

openDocument crashes on iOS simulator in M1 Mac #80

Closed
manakuro opened this issue Nov 15, 2021 · 10 comments
Closed

openDocument crashes on iOS simulator in M1 Mac #80

manakuro opened this issue Nov 15, 2021 · 10 comments

Comments

@manakuro
Copy link

manakuro commented Nov 15, 2021

Summary

ios.openDocument crashes on iOS simulator in M1 Mac. Intel Mac and devices are fine.

After digging into the log, I found that it attempts to insert nil object and causes the error:

terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]'
CoreSimulator 776.3 - Device: iPhone 12 (49387E45-4995-4855-AD6E-759014AEC92F) - Runtime: iOS 15.0 (19A339) - DeviceType: iPhone 12

_LSContextInitReturningError() failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0xc23586de 989aecf6 5ff8a488 dbce0d00 ... aafa3d0b e8264735 }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0x11a75a6a a465e974 78717d01 63b2e7ac ... 5a568f54 1b7dc131 }}

Screen Shot 2021-11-15 at 16 41 21

Info:

version: v0.13.16

System:
    OS: macOS 11.5.2
    CPU: (8) arm64 Apple M1
    Memory: 95.31 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.8.0 - ~/.nodenv/versions/16.8.0/bin/node
    Yarn: 1.22.11 - ~/.nodenv/versions/16.8.0/bin/yarn
    npm: 7.21.0 - ~/.nodenv/versions/16.8.0/bin/npm
    Watchman: 2021.10.18.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: Not Found
  SDKs:
    iOS SDK:
      Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
    Android SDK:
      API Levels: 29, 30
      Build Tools: 30.0.2, 30.0.3
      System Images: android-29 | Intel x86 Atom, android-30 | Google APIs ARM 64 v8a, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play ARM 64 v8a, android-31 | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: Arctic Fox 2020.3.1 Patch 3 Arctic Fox 2020.3.1 Patch 3
    Xcode: 13.0/13A233 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_282 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.66.0 => 0.66.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
@anniewey
Copy link

anniewey commented Nov 24, 2021

ios.previewDocument appears to be crash as well. I'm using M1 Mac, didn't try on Intel Mac.

@kashif-sk
Copy link

Same issue.
Works fine on Intel Mac.

@manakuro did you find any workaround for it

@manakuro
Copy link
Author

@kashif-sk
No. I'm using the device instead. If no fix would be made, I'm considering replacing the openDocument with another library such as react-native-file-viewer.

@RonRadtke
Copy link
Owner

The problem is, I don't have a M1 Mac, so I can't fix / test it myself - I would require some help here
So if anyone can come up with a fix, please create a PR

@andhikanovandi
Copy link

Just want to add some comment on this old issue, based on my experience using M1 mac with latest iOS dev environment is not stable yet, especially if using react native.

So, what i'm suggesting is using older env (this is also what i'm using right now):

  • macOS: Big Sur 11.6.3
  • CPU: Apple M1
  • Simulator: iOS 13.7
  • Xcode: 12.5.1

All iOS API for this library (previewDocument & openDocument) works fine on my simulator.

@HyopeR
Copy link

HyopeR commented May 12, 2022

Any progress on the matter?

@anand989
Copy link

I am facing the same issue? Any update on this?

@RonRadtke
Copy link
Owner

No unless we get help form the community, since I don't have a M1 to test it
So it would be great if someone could help out here

@kashif-sk
Copy link

Upgrading to RN v0.67.3 fixed the issue for me

@cakesoft-shashank
Copy link

Upgrading to RN v0.67.3 fixed the issue for me

upgrading to 0.67.4 did not work

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

8 participants