JoeyEamigh / react-native-text-recognition

MIT License
22 stars 14 forks source link

TypeError: Cannot read property 'recognize' of null #10

Open blakewilson opened 1 year ago

blakewilson commented 1 year ago

I'm recieving the following error (TypeError: Cannot read property 'recognize' of null) when calling const result = await TextRecognition.recognize().

Screenshot 2023-02-21 at 10 05 10 PM Screenshot 2023-02-21 at 10 05 22 PM

Oddly, as you can see in the terminal, console.log(TextRecognition) returns with proper recognition function, but when I try and access it, TextRecognition is null.

danielwalterrodrigues commented 1 year ago

Im having this problem, too.

Have you found any solution?

tks!

olcaneristi commented 1 year ago

Im having this problem too!

Anyone know a solution for this error?

spetrey commented 1 year ago

On the homepage, @JoeyEamigh recommends the following:

Make sure that your Podfile's minimum deployment target is 13.0 or greater!!

To resolve the error, make sure you have this line in your Podfile and re-run pod install in the ios directory before re-running your RN app 😄

platform :ios, '13.0' # or higher!
olcaneristi commented 1 year ago

On the homepage, @JoeyEamigh recommends the following:

Make sure that your Podfile's minimum deployment target is 13.0 or greater!!

To resolve the error, make sure you have this line in your Podfile and re-run pod install in the ios directory before re-running your RN app 😄

platform :ios, '13.0' # or higher!

I’ve this problem on Android 😔 iOS works well with 13.0 deployment target…

We have a solution but it's a bit dirty.

1- you need to go to TextRecognitionModule.java 2- replace import com.google.mlkit.vision.text.TextRecognizerOptions with import com.google.mlkit.vision.text.*;

i've fixed this for myself but it's a "dirty" like i said. your choice. gl

odanlumeneromoselejude commented 7 months ago

Any solution yet?