regulaforensics / react-native-document-reader

React-Native Framework for reading and validation of identification documents
19 stars 10 forks source link

iOS Thread issue #10

Closed s0rta closed 2 years ago

s0rta commented 2 years ago

Tried to add the example code to my repo for testing and almost everything works, the only failing piece is the 'Scan Document' button, it reaches the camera page, but the camera stays black and the app throws a threading violation in XCode

2022-02-24 01:55:12.443877-0600 APP_NAME[1766:317606] failure in assertBarrierOnQueue of <FBSSerialQueue:0x282add9c0> (FBSSerialQueue.m:121) : threading violation: expected the main thread

beginGeneratingDeviceOrientationNotifications()

0x104c722e8 <+200>: mov x0, x20 Thread 14: EXC_BREAKPOINT (code=1, subcode=0x1924af724)

Oddly enough, I can get the Scan Document button to work, but only after the image picker has been opened, I have no clue how these two events are related. I'm getting this behavior with the bounds and fullrfid packages.

The code I've got is private but I'll see if I can get it to replicate in a more open environment.

DavidInojosa commented 2 years ago

Same here

pkandrashkou commented 2 years ago

Hello @s0rta and @DavidInojosa!

Could you provide more information regarding your environment, please?

We would like to know the following:

Thank you!

s0rta commented 2 years ago

Hey @pkondrashkov I was able to bypass the issue for the time being ripping the example 1 for 1 out of the repo, but I will keep you in the loop if it crops up again. @DavidInojosa I would try taking the example code out in its entirety and slowly removing parts, that method worked for my team.

pkandrashkou commented 2 years ago

Hey @s0rta! Thanks for the reply. I am glad it worked out for you. Let us know, we would love to hear move information regarding this issue. For now I am going to close the issue. Please feel free to reopen it later if necessary.