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

ERROR TypeError: Object(...) is not a function at OCR.recText #32

Open
JrLouis1101 opened this issue May 23, 2020 · 4 comments
Open

ERROR TypeError: Object(...) is not a function at OCR.recText #32

JrLouis1101 opened this issue May 23, 2020 · 4 comments
Assignees
Labels
question Further information is requested by the issue / pr raiser

Comments

@JrLouis1101
Copy link

JrLouis1101 commented May 23, 2020

Hi, I'm trying to use ocr plugin in my ionic 3 project, but when I call recText console returns this error:
ERROR TypeError: Object(...) is not a function at recText.

I used this commands to install the plugin:
ionic cordova plugin add cordova-plugin-mobile-ocr
npm install @ionic-native/ocr

my function:

readTag(){
this.ocr.recText(OCRSourceType.BASE64, this.imageText)
.then((res: OCRResult) => {
console.log(JSON.stringify(res.blocks.blocktext));
this.ocrTextHTML = JSON.stringify(res.blocks.blocktext);
})
.catch((error: any) => console.error(error));

}

Does someone know how to fix this? thanks for any help.

Obs: I made the same example in ionic 5 project and it worked.

@ChrisTomAlx ChrisTomAlx self-assigned this May 24, 2020
@ChrisTomAlx ChrisTomAlx added the question Further information is requested by the issue / pr raiser label May 24, 2020
@ChrisTomAlx
Copy link
Collaborator

Hey @JrLouis1101

You will probably have to raise this with the ionic guys. I don't maintain the ionic documentation. Sorry I could not be of any help.

Cheers,
Chris
Neutrinos

@sonydaman
Copy link

Here is ionic desc :
The issue raised on Ionic Document

BUG NO : [#37] (#37)

@CoraNers
Copy link

I'm getting the same error. Tried following the links to the other issue (# 37 raised with Ionic guys) and that was marked as closed due to duplicate. ???

@ChrisTomAlx
Copy link
Collaborator

Could you try this instead. Its similar to this plugin and has been updated recently.

Cheers,
Chris
Neutrinos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested by the issue / pr raiser
Projects
None yet
Development

No branches or pull requests

4 participants