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

Could not set up the detector #26

Open
ChaminThilakarathne opened this issue Oct 24, 2019 · 15 comments
Open

Could not set up the detector #26

ChaminThilakarathne opened this issue Oct 24, 2019 · 15 comments
Assignees

Comments

@ChaminThilakarathne
Copy link

I have used two devices which are Samsung Galaxy J Max and Huawei Honor 6X for testing my app, Plugin working smoothly on Huawei device and Samsung device shows the error "Could not set up the detector" how can i fix this ? can i add bellow pakages separately
com.google.android.gms.vision.Frame;
com.google.android.gms.vision.text.Text;
com.google.android.gms.vision.text.TextBlock;
com.google.android.gms.vision.text.TextRecognizer;

@ChaminThilakarathne
Copy link
Author

ChaminThilakarathne commented Oct 24, 2019

this is the logcat of Samsung android device
image

@ChrisTomAlx
Copy link
Collaborator

Hey @Chamiyalt
Usually the two culprits are network and internal storage space. Make sure these two are accounted for. If that is not causing the problem, try clearing the app data from settings and see if that works

Also could you send this image as text so I can copy - paste - search.

Cheers,
Chris
Neutrinos

@ChaminThilakarathne
Copy link
Author

ChaminThilakarathne commented Oct 25, 2019

Preparing logs for uploading
D/ActivityManager(  749): bindService callerProcessName:android, calleePkgName: com.google.android.gms, action: android.accounts.AccountAuthenticator
D/ActivityManager(  749): caller:android.app.ActivityThread$ApplicationThread@1b1d5da8, r.packageName :com.google.android.gms
D/ActivityManager(  749): bindService callerProcessName:com.google.android.gms, calleePkgName: com.google.android.gms, action: com.google.android.gms.auth.account.data.service.START
D/ActivityManager(  749): caller:android.app.ApplicationThreadProxy@3230b3dc, r.packageName :com.google.android.gms
W/ChimeraUtils( 1598): Non Chimera context
D/ActivityManager(  749): bindService callerProcessName:com.google.android.gms, calleePkgName: com.google.android.gms, action: null
D/ActivityManager(  749): caller:android.app.ApplicationThreadProxy@39f4e26b, r.packageName :com.google.android.gms
W/ChimeraUtils( 1598): Non Chimera context
D/ActivityManager(  749): bindService callerProcessName:com.google.android.gms, calleePkgName: com.google.android.gms, action: com.google.android.gms.clearcut.service.START
D/ActivityManager(  749): caller:android.app.ApplicationThreadProxy@347d3a47, r.packageName :com.google.android.gms
D/ActivityManager(  749): caller:android.app.ApplicationThreadProxy@2f058012, r.packageName :com.google.android.gms
D/ActivityManager(  749): bindService callerProcessName:com.google.android.gms, calleePkgName: com.google.android.gms, action: com.google.android.gms.auth.account.workaccount.START
D/ActivityManager(  749): caller:android.app.ApplicationThreadProxy@2cb78b5e, r.packageName :com.google.android.gms
I/PlayCommon(12868): [1696] aixp.c(185): Connecting to server: https://play.googleapis.com/play/log?format=raw&proto_v2=true
I/System.out(12868): (HTTPLog)-Static: isSBSettingEnabled false
D/ActivityManager(  749):  getDeferredInfo final delay 1980
W/System.err( 1525): remove failed: ENOENT (No such file or directory) : /storage/emulated/0/SHAREit/download/videos/.caches/78530cfdd35de28fe358de0ec424c7f3_55c0ca894b3da8b6b109fb83727896e9
W/AS.Task.Scheduler( 1525): 12:11:33.153[825] task execute failed: retry = true, error = com.ushareit.net.http.TransmitException: [ code = 1, msg = java.net.ConnectException: Failed to connect to /192.168.43.203:2999], task
= [id = http://cdn.ushareit.com/sz2/t_v/181010/vls0f_240p.mp4, length = 0/466807, retry = 20, cancelled = false], url = http://192.168.43.203:2999/cloudcache?type=cachefile&id=vls0f&size=466807&filetype=raw&ignoresize=true,

@ChaminThilakarathne
Copy link
Author

https://stackoverflow.com/a/39313255/7596996 can you tell is it the problem?

@ChrisTomAlx
Copy link
Collaborator

Let me take a look. Thanks for sharing the logs

Cheers,
Chris
Neutrinos

@ChrisTomAlx
Copy link
Collaborator

ChrisTomAlx commented Oct 25, 2019

These logs don't look like they are linked to ocr. Also this log is different from the original image you sent.
Here is something you could try. In the samsung device, create a vanilla cordova app and use the ocr plugin directly with the camera plugin and see if it works fine.

Cheers,
Chris
Neutrinos

@ChaminThilakarathne
Copy link
Author

Problem is happened in thread that u have created , i think thread come in to waiting state during the downloading of google packages then processor give the chance to next priority thread then it shows the exception,i will get the those packages out of the tread it was worked smoothly.
thanks a lot for your support.

@ChrisTomAlx
Copy link
Collaborator

ChrisTomAlx commented Oct 28, 2019

So the ocr runs on a separate thread, I did not want to block the UI and hence ran it on a different thread. Would it be better if the ocr ran on the UI thread or the user of the plugin had an option to choose between UI thread or new thread?

Would love your suggestion as you seem to be one of the few who have run into this issue and solved it.

Cheers,
Chris
Neutrinos

@ChrisTomAlx ChrisTomAlx self-assigned this Oct 28, 2019
@ChaminThilakarathne
Copy link
Author

better to has option to choose between UI thread or new thread, with crystal clear documentation 👯‍♂

@ChaminThilakarathne
Copy link
Author

apart from i assume some of devices are allowed to download google packages in separate thread that you are using but some of the devices which have less performance is allocated less time to tread that u are using because of tread can't download google packages correctly.

@haghighi251
Copy link

Hi, I have the same error. I published my problem here:
https://stackoverflow.com/questions/65470328/cordova-textocr-convert-image-to-text

@ChrisTomAlx
Copy link
Collaborator

ChrisTomAlx commented Dec 28, 2020

@haghighi251 did you try eveerything mentioned in the comments ?
Also you might want to use https://github.com/NeutrinosPlatform/cordova-plugin-ml-text instead of this plugin.

Cheers,
Chris
Neutrinos

@haghighi251
Copy link

haghighi251 commented Dec 28, 2020

@ChrisTomAlx as far as I know yes, But I'm not sure about treading. Do download google packages have a connection with my pc devices? I make an empty application with the ocr plugin and Cordova camera plugin and then added the android platform and then I made apk file. But I have that problem yet. I'm using windows 10 with Cordova version 10 and android platform version 9. I tested ad some different devices such as android 8-10, But it didn't worked.
And one thing more, ml text plugin didn't work and had the same problem.

@ChrisTomAlx
Copy link
Collaborator

Does your phone have a stable internet connection when installing the application?

Cheers,
Chris
Neutrinos

@haghighi251
Copy link

@ChrisTomAlx Yes, It does have.

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

3 participants