Mike
Mike

Reputation: 1575

ArrayIndexOutOfBoundsException at com.huawei.agconnect.crash.internal.log.h$b.read

My application keeps crash report on Crashlytics for ArrayIndexOutOfBoundsException at com.huawei.agconnect.crash.internal.log.h$b.read. I've tried to search around but doesn't seems to get any info on this.

For my recent release, I update my agconnect libraries but still getting this crash. Here are the versions:

build.gradle project

classpath 'com.huawei.agconnect:agcp:1.7.2.300'

build.gradle app

implementation 'com.huawei.hms:base:6.6.0.300'
implementation 'com.huawei.agconnect:agconnect-core:1.7.2.300'
implementation 'com.huawei.hms:hianalytics:6.7.0.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.7.2.300'
implementation 'com.huawei.hms:push:6.7.0.300'
implementation 'com.huawei.agconnect:agconnect-remoteconfig:1.7.2.300'

From the report, all crashes are for Huawei devices and 90%+ are Android 10. The rest are Android 11.

This is the stacktrace shown in Crashlytics:

Fatal Exception: java.lang.ArrayIndexOutOfBoundsException:
   at com.huawei.agconnect.crash.internal.log.h$b.read(:51)
   at com.huawei.agconnect.crash.internal.log.e$1.a(:15)
   at com.huawei.agconnect.crash.internal.log.h.a(:21)
   at com.huawei.agconnect.crash.internal.log.e.a(:28)
   at com.huawei.agconnect.crash.internal.log.f.b(:8)
   at com.huawei.agconnect.crash.internal.log.d.a(:215)
   at com.huawei.agconnect.crash.internal.log.c.a(:10)
   at com.huawei.agconnect.crash.internal.log.a$4.run(:6)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
   at java.lang.Thread.run(Thread.java:929)

Upvotes: 0

Views: 270

Answers (3)

Mike
Mike

Reputation: 1575

After 1 month or so update to the latest Huawei Agconnect, I no longer receiving this crash report. Now this is the version I'm using:

implementation 'com.huawei.hms:base:6.8.0.300'
implementation 'com.huawei.agconnect:agconnect-core:1.7.3.300'
implementation 'com.huawei.hms:hianalytics:6.8.0.300'
implementation 'com.huawei.agconnect:agconnect-crash:1.7.3.300'
implementation 'com.huawei.hms:push:6.7.0.300'
implementation 'com.huawei.agconnect:agconnect-remoteconfig:1.7.3.300'

Upvotes: 0

Nikolay shcheklachev
Nikolay shcheklachev

Reputation: 11

Try to update all Huawei dependencies to 6.7.0.300 vesion.

Upvotes: 0

Martin Zeitler
Martin Zeitler

Reputation: 76789

Not exactly sure, but this line appears questionable to me:

implementation 'com.huawei.hms:base:6.6.0.300'

base should use the same HMS version 6.7.0.300, alike the other libraries.

If not, the only chance to pinpoint this is to check out the decompiled class com.huawei.agconnect.crash.internal.log.h$b.read at line 51 (give or take).
This would at least provide a clue, which array it tries to access there ...

Upvotes: 1

Related Questions