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

Does not read the QR on Huawei devices #352

Open
danielemaddaluno opened this issue May 10, 2018 · 35 comments
Open

Does not read the QR on Huawei devices #352

danielemaddaluno opened this issue May 10, 2018 · 35 comments

Comments

@danielemaddaluno
Copy link

danielemaddaluno commented May 10, 2018

The activity works fine, I even see the camera working good but there is no text scan.
My phone is a Huawei P10 Lite (WAS-LX1AC432B198)

@auto-ororo
Copy link

Same problem occurred on Huawei MediaPad T3 10(AGS-W09C229B251).
Until May 10th, the device could read the QR.
But since May 11th, the device hasn't read.

@x51811danny
Copy link

Same problem here.
Lots of users had reported this problems occurred on Huawei over the past few days.

@VEIKKO99
Copy link

Yes,

Same problem here, with the test app and our app which is in production (available in Google Store). HUAWEI FRD-L09 (Android 7.0, API 24) (Honor 8)

@sattha
Copy link

sattha commented May 15, 2018

+1

Huawei GR5 2017 (Premium)
Android Version 7.0

@sattha
Copy link

sattha commented May 15, 2018

I manage to let it work by...

inform my user (internal user) to download application with WiFi only!
Becuase, there is some setting in Huawei can limit background service on other connectivity except WiFi.

But this is just a workaround, plz help us fix this issues.

@algibe
Copy link

algibe commented May 15, 2018

Not working for me this workaround

@sattha
Copy link

sattha commented May 16, 2018

Yeah for some device (but still Huawei) what I have done to fix this issue so far from my above comment is

  1. ask them to check gms service, is there any update https://play.google.com/store/apps/details?id=com.google.android.gms
  2. if already update, I ask them to clear google play service cache
  3. open an app and wait for some time (5 min.), I have experienced that at first, it does not operate but wait for a while it does (it's due to a network).

additional but not necessary for above workaround
I also, update my AndroidManifest.xml by adding the following one

<meta-data 
            android:name="com.google.android.gms.vision.DEPENDENCIES" 
            android:value="barcode" /> 

@kiketen
Copy link

kiketen commented May 21, 2018

The problem of this issue is gotten on all the Huawei with an equal or higher os than 7. Google Play Services has been uploaded to 12.6.85 to solve the problem on Maps (apps like Uber were getting an error) but it seems that the error persist on the MobileVision library. Do anybody knows an email to report the google team?

@rdoubleui
Copy link

rdoubleui commented May 22, 2018

I'm seeing the same issue, but apparently only on devices with the hardware support level of "Limited" (which unfortunately means a lot of Huawei devices). Not seeing the same issue on an older P8 lite ("Legacy").

Meanwhile all devices updated to the fixing version 12.6.85, however one still needs to clear the app data of the Play Services manually in order for the vision lib to work again.

@andreasciarra
Copy link

Same problem on Huawei P10 Lite

@ngallazzi
Copy link

ngallazzi commented May 23, 2018

Same problem on Huawei P9 Lite and on Huawei P20

@rdoubleui
Copy link

rdoubleui commented May 23, 2018

@ngallazzi @andreasciarra try to clear the app data of the Play Services (cache is not sufficient) and you should be back to normal.

@elekiwi
Copy link

elekiwi commented May 24, 2018

I solved it adding in the manifest what @sattha said
<meta-data android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="barcode" />
And deleting all data and cache of Google Play Services and Google Play services for Instant Apps.

@kiketen
Copy link

kiketen commented May 24, 2018

Hi @bertam, could you do this test? Reboot your Huawei and then, try to scan the barcode again. In my case the error is there again...

@elekiwi
Copy link

elekiwi commented May 25, 2018

You are right @kiketen , I have to delete all the data and cache again in order to make it work.

@kiketen
Copy link

kiketen commented May 25, 2018

It's totally crazy what is happening with this bug...we cannot solve it by ourselves and Huawei and Google haven't solved it yet...We are getting errors with 10% of our users and it is something to worry about... We'll continue waiting for a solution

@danielemaddaluno
Copy link
Author

I temporarily solved the problem on my phone (Huawei P10 Lite WAS-LX1AC432B198) following @bertam instructions.
I tested for @kiketen the rebooting behaviour and I can confirm that after the rebooting I had to delete all the data and cache again in order to make it work.

@danielemaddaluno danielemaddaluno changed the title Does not read the QR on Huawei P10 Lite (WAS-LX1AC432B198) Does not read the QR on Huawei devices May 25, 2018
@ytrikoz
Copy link

ytrikoz commented May 27, 2018

I have several crash reports in Firebase Crashlytics for six Huawei DLI-TL20 running Android 7.0, with almost the same stacktrace. With diferent version of Play Service, before uninstalling (clearing cache) - getting exceptions, and after installing (reinstalling) SAME version of Play Service and same app.

But there is no export button in Crashlytics console :(

since may 13 2018 every Play Service update...

 public boolean checkBarcodeDetector(Context context) {
        BarcodeDetector detector = new BarcodeDetector.Builder(context)
                .setBarcodeFormats(Barcode.DATA_MATRIX | Barcode.PDF417)
                .build();
        return detector != null && detector.isOperational();
    }

Fatal Exception: java.lang.RuntimeException
Unable to resume activity {scanner.ScannerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.android.gms.e.a.b()' on a null object reference
android.app.ActivityThread.performResumeActivity (ActivityThread.java:3639)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832)
Caused by java.lang.NullPointerException

Click to expand > Attempt to invoke virtual method 'boolean com.google.android.gms.e.a.b()' on a null object reference > scanner.ScannerActivity.checkBarcodeDetector (ScannerActivity.java:550) > scanner.ScannerActivity.hasAllNecessaryCapabilities (ScannerActivity.java:509) > scanner.ScannerActivity.resumeCamera (ScannerActivity.java:436) > scanner.ScannerActivity.onResume (ScannerActivity.java:359) > android.app.Instrumentation.callActivityOnResume (Instrumentation.java:1279) > android.app.Activity.performResume (Activity.java:7017) > android.app.ActivityThread.performResumeActivity (ActivityThread.java:3614) > android.app.ActivityThread.handleResumeActivity (ActivityThread.java:3679) > android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2879) > android.app.ActivityThread.handleRelaunchActivity (ActivityThread.java:4777) > android.app.ActivityThread.-wrap20 (ActivityThread.java) > android.app.ActivityThread$H.handleMessage (ActivityThread.java:1576) > android.os.Handler.dispatchMessage (Handler.java:105) > android.os.Looper.loop (Looper.java:156) > android.app.ActivityThread.main (ActivityThread.java:6595) > java.lang.reflect.Method.invoke (Method.java) > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:942) > com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832) > > Caused by java.lang.NullPointerException > Attempt to invoke virtual method 'boolean com.google.android.gms.e.a.b()' on a null object reference > ScannerActivity.checkBarcodeDetector (ScannerActivity.java:550)

Queue
java.lang.Object.wait (Object.java)
java.lang.Thread.parkFor$ (Thread.java:2142)
sun.misc.Unsafe.park (Unsafe.java:325)
java.util.concurrent.locks.LockSupport.park (LockSupport.java:161)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2035)
java.util.concurrent.PriorityBlockingQueue.take (PriorityBlockingQueue.java:519)
io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.performOperation (DependencyPriorityBlockingQueue.java:197)
io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.get (DependencyPriorityBlockingQueue.java:236)
io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take (DependencyPriorityBlockingQueue.java:65)
io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take (DependencyPriorityBlockingQueue.java:46)
java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1058)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1118)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
java.lang.Thread.run (Thread.java:776)

TubeSockWriter-174
java.lang.Object.wait (Object.java)
java.lang.Thread.parkFor$ (Thread.java:2142)
sun.misc.Unsafe.park (Unsafe.java:325)
java.util.concurrent.locks.LockSupport.park (LockSupport.java:161)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2035)
java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:413)
bgk.a (:com.google.android.gms.dynamite_dynamitemodulesc@12685021@12.6.85 (040306-197041431):53)
bgl.run (:com.google.android.gms.dynamite_dynamitemodulesc@12685021@12.6.85 (040306-197041431):5)
java.lang.Thread.run (Thread.java:776)

@vasee80
Copy link

vasee80 commented May 28, 2018

Same issue in HUAWEI GR5 2017 EMUI v5.0

@asclepix
Copy link

It seems related to #353 .
So, no QR reader, no Ocr Detector, no face recognition on Huawei...

Is there another (better) place where to ask for a fix? on Google or Huawei sites?

@rmasarovic
Copy link

rmasarovic commented May 30, 2018

Hi i wrote here https://issuetracker.google.com/issues/80454351 maybe someone has more information about this problem pls write here anything what can be important or helpfull thx

@abdulsattar-sit
Copy link

Hi All,

Is this issue resolved? I am still facing the issue. Is there any work around?

@fresswolf
Copy link

@abdulsattar-sit no it's still open https://issuetracker.google.com/issues/80454351
Google hasn't assigned it until a few hours ago. And it has medium priority

@grillermo
Copy link

grillermo commented Jun 28, 2018

Google rep says the roll out of the fixed v12.8.62 could happen by the end of this month, with the risk of delays
https://issuetracker.google.com/issues/80454351

@neronovs
Copy link

on my Huawei P20 Android 7.0 was problem when I tried to scan QR code with inner Android classes and that was not working. After reading the comments, I cleaned cash in all default apps of the device connected to Google Play and the scanning began to work.
Haliluya!

@Zachinio
Copy link

Zachinio commented Jul 1, 2018

Is there any way to know if this bug occurs programmatically? So I can handle it in the UI?

@neronovs
Copy link

neronovs commented Jul 1, 2018 via email

@hycday
Copy link

hycday commented Aug 2, 2018

is there a possible way of making this work without having to clear cache ? i.e. could it work once Google releases an update ? (yes, got the issue as well, Huawei P10, Google Play Services v12.8.74)

@kiketen
Copy link

kiketen commented Aug 3, 2018

Google has finally released an update that solves this bug yet.
The app version is 12.8.74.
If you have this version of Play Services, the barcode reader should work 🗡

@ashwink94
Copy link

I am still getting this issue in one plus 3T while trying barcode scanner in a sample app.I do have the latest google play services version 12.8.74 in my device.

@Goncharuk-Nikita
Copy link

Yes, I have the same problem. I also use Xamarin.GooglePlayServices.Vision, on the phone of Huawei everything is working fine, but on the tablet Huawei does not work.

@AnthonyJoshua1
Copy link

Facing issue on Huawei y6

@grillermo
Copy link

Still happening on play services 16.0.89

@Dak2896
Copy link

Dak2896 commented May 14, 2019

No progress on this issue, i have it on Huawei P9 Lite L31

@grillermo
Copy link

My solution has been to update google play services, then delete the failing app, then restart the device then reinstall the app. It even works if you update to beta versions, get them from here:
https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=google+play+services
And don't forget to disable google play services automatic updates or it will break your app again.

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