HMS Map toolkit - issue rendering a Map

574 Views Asked by At

Trying to add HMS maps to my app (GMS works right) I faced problem with rendering map. The map fragmet load the map only for the visible area, moving the map, or zooming out it's visible only the grey grid. (I try to test it with activity and code from official Huawei codlab - and have the same issue) I found the same case in Huawei developers forum (https://forums.developer.huawei.com/forumPortal/en/topic/0201611224212740063), but it without any solution.

enter image description here

If I use fragment with location and adress definition, I even can take adress - but cans see a map. enter image description here

The log of errors:

2021-10-14 12:56:27.263 17509-17509/ru.my.app E/HmsMapKit_ContextDataInitializer_42: error occur when get support China flag from sdk through method reflection.

2021-10-14 12:56:28.214 17509-17660/ru.my.app E/HmsMapKit_AuthenticateClient_27: Exception occur
com.huawei.hms.maps.foundation.client.c: *1*0*2*:*I*L*G*L*F*N*E*P*I*T
    at com.huawei.hms.maps.foundation.client.c$a.b(Unknown Source:25)
    at com.huawei.hms.maps.foundation.client.b.a(Unknown Source:20)
    at com.huawei.hms.maps.foundation.client.b.c(Unknown Source:80)
    at com.huawei.hms.maps.foundation.client.b.a(Unknown Source:88)
    at com.huawei.hms.maps.foundation.client.b.a(Unknown Source:1)
    at com.huawei.hms.maps.maproute.client.auth.a.m(Unknown Source:2)
    at com.huawei.hms.maps.maproute.client.auth.a.lambda$4mAmyqJJeLxpXtGhAREgNcSN3PY(Unknown Source:0)
    at com.huawei.hms.maps.maproute.client.auth.-$$Lambda$a$4mAmyqJJeLxpXtGhAREgNcSN3PY.call(Unknown Source:4)
    at com.huawei.hms.maps.foundation.client.b$a.a(Unknown Source:3)
    at com.huawei.hms.maps.maproute.client.auth.a.b(Unknown Source:27)
    at com.huawei.hms.maps.maproute.client.auth.a.a(Unknown Source:4)
    at com.huawei.hms.maps.maproute.cache.a$a.a(Unknown Source:17)
    at com.huawei.hms.maps.maproute.cache.a$a.call(Unknown Source:0)
    at oe.b(Unknown Source:17)
    at ml.a(Unknown Source:14)
    at oi$b.run(Unknown Source:6)
    at mo$a.run(Unknown Source:9)
    at ou.run(Unknown Source:13)
    at ou.call(Unknown Source:0)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    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)

2021-10-14 12:56:28.218 17509-17660/ru.my.app E/HmsMapKit_ErrorTraceLogPusher_4: cache error trace log : ErrorTraceLogDTO{ scenario = ACCESS_SERVICE_ERROR', message='010002 : ILLEGAL_FINGERPRINT'}
com.huawei.hms.maps.foundation.client.c: *1*0*2*:*I*L*G*L*F*N*E*P*I*T
    at com.huawei.hms.maps.foundation.client.c$a.b(Unknown Source:25)
    at com.huawei.hms.maps.foundation.client.b.a(Unknown Source:20)
    at com.huawei.hms.maps.foundation.client.b.c(Unknown Source:80)
    at com.huawei.hms.maps.foundation.client.b.a(Unknown Source:88)
    at com.huawei.hms.maps.foundation.client.b.a(Unknown Source:1)
    at com.huawei.hms.maps.maproute.client.auth.a.m(Unknown Source:2)
    at com.huawei.hms.maps.maproute.client.auth.a.lambda$4mAmyqJJeLxpXtGhAREgNcSN3PY(Unknown Source:0)
    at com.huawei.hms.maps.maproute.client.auth.-$$Lambda$a$4mAmyqJJeLxpXtGhAREgNcSN3PY.call(Unknown Source:4)
    at com.huawei.hms.maps.foundation.client.b$a.a(Unknown Source:3)
    at com.huawei.hms.maps.maproute.client.auth.a.b(Unknown Source:27)
    at com.huawei.hms.maps.maproute.client.auth.a.a(Unknown Source:4)
    at com.huawei.hms.maps.maproute.cache.a$a.a(Unknown Source:17)
    at com.huawei.hms.maps.maproute.cache.a$a.call(Unknown Source:0)
    at oe.b(Unknown Source:17)
    at ml.a(Unknown Source:14)
    at oi$b.run(Unknown Source:6)
    at mo$a.run(Unknown Source:9)
    at ou.run(Unknown Source:13)
    at ou.call(Unknown Source:0)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)

2021-10-14 12:56:28.225 17509-17660/ru.my.app E/HmsMapKit_AuthenticateCache_163: other err occur,errorCode : .010002 : ILLEGAL_FINGERPRINT

2021-10-14 12:56:28.293 17509-17717/ru.my.app E/HmsMapKit_TileCache_38: startUrlRequest Identity fail, do not has permission get tile. authResult :010002

2021-10-14 12:56:28.380 17509-17509/ru.my.app E/HmsMapKit_TileCache_19:  tile parse callback , error report. status is 409
2021-10-14 12:56:28.381 17509-17509/ru.my.app E/HmsMapKit_ErrorTraceLogPusher_4: cache error trace log : ErrorTraceLogDTO{ scenario = RIEMANN_ENGINE_ERROR', message='map network request interrupt map network request interrupt'}

So, am pretty sure that:

  • all dependensies and otert in Gradle are right
  • I add agconnect-servoces.json to my project
  • package name in project and AppGallery Connect is the same
  • sertificate fingerprint in app are exist
  • I add right SHA-256 to AppGallery Connect

I try to clear cash of app and HMS Core - nothing changes.

The last problem is I cant to write the question in oficcial forum, because my country is not supported.

1

There are 1 best solutions below

4
On BEST ANSWER

According to the following log:

other err occur,errorCode : .010002 : ILLEGAL_FINGERPRINT

The possible causes are as follows:

  • The app ID in your project is different from that in AppGallery Connect.
  • No signing certificate fingerprint is configured. You need to generate a signing certificate fingerprint and configure it in AppGallery Connect.
  • The AppGallery Connect configuration file of your app is not configured. You need to follow instructions in Adding the AppGallery Connect Configuration File of Your App to configure it.
  • The API key is not transcoded using encode.

For details, you could refer to this Docs.

It is also recommended that you use the Configuration Wizard to complete the environment configuration, which will automatically help you add fingerprints. You could refer to this Docs.