react-native-ar / react-native-arkit

React Native binding for iOS ARKit
MIT License
1.72k stars 143 forks source link

ARKit.snapshot() and ARKit.snapshotCamera() crash when get called #179

Open vasinl124 opened 6 years ago

vasinl124 commented 6 years ago

I tried to use these 2 functions last night and got crashed ever time these 2 get called. I tried this with iOS9.3 on iPhone X.

screen shot 2018-04-02 at 8 47 12 pm

jwanga commented 6 years ago

I'm experiencing the same

macrozone commented 6 years ago

which version do you use?

can you try passing an empty object for options?

ARKit.snapshot({}) (altough this should be fixed afair)

jwanga commented 6 years ago

@macrozone unfortunately, that did not fix the issue for me.

macrozone commented 6 years ago

@jwanga which version do you use and are there any more logs?

davidmichaelhogan commented 5 years ago

@macrozone Hello, I'm experiencing the same issue.

Produced by console: 2018-07-13 15:31:23.597 [info][tid:com.facebook.react.JavaScript] Running application "---" with appParams: {"rootTag":1,"initialProps":{}}. DEV === true, development-level warning are ON, performance optimizations are OFF

Main Thread Checker: UI API called on a background thread: -[UIView bounds] PID: 2084, TID: 208570, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21 Backtrace: 4 Pyle 0x0000000104a79334 -[RCTARKit cropImage:toSelection:] + 164 5 Pyle 0x0000000104a78f28 -[RCTARKit getSnapshotCamera:] + 456 6 Pyle 0x0000000104a8319c __49-[RCTARKitManager snapshotCamera:resolve:reject:]_block_invoke + 236 7 libdispatch.dylib 0x00000001077e91dc _dispatch_call_block_and_release + 24 8 libdispatch.dylib 0x00000001077e919c _dispatch_client_callout + 16 9 libdispatch.dylib 0x00000001077f5200 _dispatch_queue_override_invoke + 968 10 libdispatch.dylib 0x00000001077fa7c8 _dispatch_root_queue_drain + 604 11 libdispatch.dylib 0x00000001077fa500 _dispatch_worker_thread3 + 136 12 libsystem_pthread.dylib 0x0000000181503fac _pthread_wqthread + 1176 13 libsystem_pthread.dylib 0x0000000181503b08 start_wqthread + 4

ambewas commented 5 years ago

This error is caused by missing camera roll permissions. As of ios11, add the following keys to your info.plist

cineconcerts commented 5 years ago

@ambewas, this solved my problem. Thanks!