Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Map tiles not downloading to device #16649

Open
tkvalentine56 opened this issue Jul 25, 2022 · 5 comments
Open

Map tiles not downloading to device #16649

tkvalentine56 opened this issue Jul 25, 2022 · 5 comments

Comments

@tkvalentine56
Copy link

Currently using Mapbox Android com.mapbox.navigation:android:2.6.0 GA release since published.
Map tiles were downloaded successfully until around 20jul22 when I noticed the Navigation screen was not working.
Investigation led to realizing the map tiles and their containing directory did not exist on the device.

I have made no local app code changes related to this issue. Currently it happens after requesting a route with 25 waypoints.
I also checked my mapbox account and there is no indication of termination or locked account present.
I also regenerated both public and secret keys but got the same issue of no map tile download.

@tkvalentine56
Copy link
Author

Upon receiving multiple reports from production app users in the field, additional information has been gathered and is known about this issue.

The map tile download failure is happening to:

  1. a large number of users (not all of our users are daily users)
  2. all productions versions of our app (2) and one development version of our app
  3. Mapbox Android navigation UI version 0.4.62 and version 2.6.0
  4. on multiple versions of Android (10, 11 and 12 reported)
  5. first noticed with development app and Mapbox 2.6.0 on or about 21jul22
  6. after requesting a route (with 25 waypoints) the error of "EXCEPTION MAPBOX fetch route : Key 0 is missing in the map." is recorded in the app's logfile.

@tkvalentine56
Copy link
Author

Additional information on this issue. This is an output from a device starting our app's mapbox navigation screen using the 2.6.0 GA Android Navigation UI SDK:

2022-07-27 14:24:01.562 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-sdk]: [RoutingTilesFiles] Initial size is 4096 bytes
2022-07-27 14:24:01.563 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-sdk]: [HistoryFiles] Initial size is 4096 bytes
2022-07-27 14:24:01.565 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-sdk]: [RoutingTilesFiles] Initial size is 4096 bytes
2022-07-27 14:24:01.566 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-native]: PersistentConfig path: /data/user/0/com.ans.ctt.mobile/files/mbx_nav/tiles/navigation/config.json
2022-07-27 14:24:01.569 17097-17097/com.ans.ctt.mobile W/Mapbox: [valhalla]: No metadata found for tiles
2022-07-27 14:24:01.569 17097-17097/com.ans.ctt.mobile W/Mapbox: [valhalla]: No metadata found for tiles
2022-07-27 14:24:01.570 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering void mapbox::navigation::NavigatorImpl::shutdown()
2022-07-27 14:24:01.570 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting void mapbox::navigation::NavigatorImpl::shutdown()
2022-07-27 14:24:01.570 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-native]: PersistentConfig path: /data/user/0/com.ans.ctt.mobile/files/mbx_nav/tiles/navigation/config.json
2022-07-27 14:24:01.574 17097-17097/com.ans.ctt.mobile W/Mapbox: [valhalla]: No metadata found for tiles
2022-07-27 14:24:01.574 17097-17097/com.ans.ctt.mobile W/Mapbox: [valhalla]: No metadata found for tiles
2022-07-27 14:24:01.575 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering mapbox::navigation::NavigatorImpl::NavigatorImpl(std::shared_ptr, std::shared_ptrcache::CacheManager, common::NullableSharedPointerhistory::HistoryRecorder, common::NullableSharedPointerrouter::RouterInterface, base::WeakPtrcommon::Scheduler)
2022-07-27 14:24:01.575 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-native]: Tiles path = "/data/user/0/com.ans.ctt.mobile/files/mbx_nav/tiles"
2022-07-27 14:24:01.575 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-native]: TileStore instance wasn't passed
2022-07-27 14:24:01.575 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-native]: Endpoint config = "{"dataSet":"mapbox/driving-traffic","host":"https://api.mapbox.com","isFallback":false,"minDiffInDaysToConsiderServerVersion":56,"navigatorVersion":"106.0.0","token":"***...*","userAgent":"MapboxNavigationNative","version":"","versionBeforeFallback":""}"
2022-07-27 14:24:01.575 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-native]: Creating navigator v.106.0.0
2022-07-27 14:24:01.575 17097-17097/com.ans.ctt.mobile I/Mapbox: [nav-native]: Refreshing alternatives after network is regained
2022-07-27 14:24:01.575 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering virtual void mapbox::navigation::ride::alternatives::RouteAlternativesControllerImpl::refreshImmediately()
2022-07-27 14:24:01.575 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting virtual void mapbox::navigation::ride::alternatives::RouteAlternativesControllerImpl::refreshImmediately()
2022-07-27 14:24:01.575 17097-17533/com.ans.ctt.mobile D/Mapbox: [nav-native]: Trace AlternativesController: refreshImmediatelySync
2022-07-27 14:24:01.575 17097-17533/com.ans.ctt.mobile D/Mapbox: [nav-native]: Trace RouteAlternativesControllerImpl: requestRoutes
2022-07-27 14:24:01.576 17097-17097/com.ans.ctt.mobile W/Mapbox: [valhalla]: No metadata found for tiles
2022-07-27 14:24:01.576 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting mapbox::navigation::NavigatorImpl::NavigatorImpl(std::shared_ptr, std::shared_ptrcache::CacheManager, common::NullableSharedPointerhistory::HistoryRecorder, common::NullableSharedPointerrouter::RouterInterface, base::WeakPtrcommon::Scheduler)
2022-07-27 14:24:01.576 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering std::shared_ptr mapbox::navigation::NavigatorImpl::getRouteAlternativesController()
2022-07-27 14:24:01.576 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting std::shared_ptr mapbox::navigation::NavigatorImpl::getRouteAlternativesController()
2022-07-27 14:24:01.576 17097-17535/com.ans.ctt.mobile W/Mapbox: [valhalla]: No metadata found for tiles
2022-07-27 14:24:01.577 17097-17535/com.ans.ctt.mobile W/Mapbox: [valhalla]: No metadata found for tiles
2022-07-27 14:24:01.577 17097-17535/com.ans.ctt.mobile W/Mapbox: [valhalla]: No metadata found for tiles
2022-07-27 14:24:01.577 17097-17535/com.ans.ctt.mobile W/Mapbox: [valhalla]: No metadata found for tiles
2022-07-27 14:24:01.584 1204-4589/? D/NetdEventListenerService: DNS Requested by : 160, 10660, 0
2022-07-27 14:24:01.588 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [ConnectivityHandler] NetworkStatus=ReachableViaWiFi
2022-07-27 14:24:01.589 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] MapboxMetricsReporter.init from MapboxNavigation main
2022-07-27 14:24:01.592 1204-1933/? D/SamsungAlarmManager: setInexact (T:3/F:0/AC:false) 20220727T142701 now=539861784 - CU:10660/CP:17097/OP:PendingIntent{441cc49: PendingIntentRecord{a2872bd com.ans.ctt.mobile broadcastIntent}}
2022-07-27 14:24:01.592 1204-1933/? V/SamsungAlarmManager: setLocked to kernel - W:539914543 / NW:539899773, now=539861784
2022-07-27 14:24:01.593 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] resetOriginalRoute
2022-07-27 14:24:01.593 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] resetRouteProgress
2022-07-27 14:24:01.596 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] class com.mapbox.navigation.metrics.internal.event.NavigationAppUserTurnstileEvent event sent
2022-07-27 14:24:01.597 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] sessionStart
2022-07-27 14:24:01.598 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] session state is com.mapbox.navigation.core.trip.session.NavigationSessionState$Idle@3a6d805
2022-07-27 14:24:01.598 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] resetOriginalRoute
2022-07-27 14:24:01.598 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] resetRouteProgress
2022-07-27 14:24:01.598 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] Valid initialization
2022-07-27 14:24:01.599 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering virtual void mapbox::navigation::ride::alternatives::RouteAlternativesControllerImpl::setRouteAlternativesOptions(const mapbox::navigation::RouteAlternativesOptions &)
2022-07-27 14:24:01.599 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting virtual void mapbox::navigation::ride::alternatives::RouteAlternativesControllerImpl::setRouteAlternativesOptions(const mapbox::navigation::RouteAlternativesOptions &)
2022-07-27 14:24:01.599 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering virtual void mapbox::navigation::ride::alternatives::RouteAlternativesControllerImpl::enableOnEmptyAlternativesRequest(bool)
2022-07-27 14:24:01.599 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting virtual void mapbox::navigation::ride::alternatives::RouteAlternativesControllerImpl::enableOnEmptyAlternativesRequest(bool)
2022-07-27 14:24:01.600 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering void mapbox::navigation::NavigatorImpl::setFallbackVersionsObserver(std::shared_ptr)
2022-07-27 14:24:01.600 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting void mapbox::navigation::NavigatorImpl::setFallbackVersionsObserver(std::shared_ptr)
2022-07-27 14:24:01.605 17097-17097/com.ans.ctt.mobile I/Mbgl-FontUtils: Couldn't map font family for local ideograph, using sans-serif instead

2022-07-27 14:24:01.868 17097-18086/com.ans.ctt.mobile D/Mapbox: [nav-native]: PersistentConfig loading started
2022-07-27 14:24:01.869 17097-18086/com.ans.ctt.mobile D/Mapbox: [nav-native]: PersistentConfig loaded
2022-07-27 14:24:01.869 17097-18086/com.ans.ctt.mobile I/Mapbox: [nav-native]: Async version config for mapbox/driving-traffic resolved with version 2022_07_16-03_00_00 [{"map":{"tileset_version":"2022_07_16-03_00_00"}}]

2022-07-27 14:24:02.030 17097-18161/com.ans.ctt.mobile D/Mapbox: [nav-native]: PersistentConfig loading started
2022-07-27 14:24:02.030 17097-18161/com.ans.ctt.mobile D/Mapbox: [nav-native]: PersistentConfig loaded
2022-07-27 14:24:02.031 17097-18161/com.ans.ctt.mobile I/Mapbox: [nav-native]: Async version config for mapbox/driving-traffic resolved with version 2022_07_16-03_00_00 [{"map":{"tileset_version":"2022_07_16-03_00_00"}}]

2022-07-27 14:24:02.254 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering void mapbox::navigation::NavigatorImpl::addObserver(const std::shared_ptr &)
2022-07-27 14:24:02.254 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting void mapbox::navigation::NavigatorImpl::addObserver(const std::shared_ptr &)
2022-07-27 14:24:02.260 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] session state is FreeDrive(sessionId=1fe8840b-ebf6-4dd6-8c42-6113c8b87c6b)
2022-07-27 14:24:02.260 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] resetOriginalRoute
2022-07-27 14:24:02.260 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] resetRouteProgress
2022-07-27 14:24:02.261 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] trackFreeDrive START
2022-07-27 14:24:02.261 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] createFreeDriveEvent START

2022-07-27 14:24:02.274 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] populateFreeDriveEvent
2022-07-27 14:24:02.277 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxNavigationTelemetry] class com.mapbox.navigation.core.telemetry.events.NavigationFreeDriveEvent event sent
2022-07-27 14:24:02.278 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxTripSession] routes update (reason: ROUTES_UPDATE_REASON_NEW, count: 0) - starting
2022-07-27 14:24:02.278 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxTripSession] primary route update - starting
2022-07-27 14:24:02.279 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering void mapbox::navigation::NavigatorImpl::setRoutes(util::optional, mapbox::navigation::SetRouteCallback)
2022-07-27 14:24:02.279 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: NavigatorImpl::setRoutes reset routes
2022-07-27 14:24:02.279 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting void mapbox::navigation::NavigatorImpl::setRoutes(util::optional, mapbox::navigation::SetRouteCallback)
2022-07-27 14:24:02.279 17097-17535/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering bool mapbox::navigation::NavigatorImpl::changeRouteLeg(bool)
2022-07-27 14:24:02.279 17097-17535/com.ans.ctt.mobile D/Mapbox: [nav-native]: Trace RouteAlternativesControllerImpl::setRoutes newAlternatives=[ ]
2022-07-27 14:24:02.279 17097-17535/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting bool mapbox::navigation::NavigatorImpl::changeRouteLeg(bool)

2022-07-27 14:24:02.331 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxTripSession] primary route update - finished
2022-07-27 14:24:02.332 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxTripSession] routes update (reason: ROUTES_UPDATE_REASON_NEW) - finished

2022-07-27 14:24:07.050 17097-18166/com.ans.ctt.mobile I/Mapbox: [maps-android\Mbgl-EGLConfigChooser]: In emulator: false
2022-07-27 14:24:07.052 17097-18166/com.ans.ctt.mobile I/Mapbox: [maps-android\Mbgl-EGLConfigChooser]: In emulator: false
2022-07-27 14:24:07.060 17097-18166/com.ans.ctt.mobile I/Mapbox: [maps-android\Mbgl-EglCore]: EGLContext created, client version 3
2022-07-27 14:24:07.061 17097-18166/com.ans.ctt.mobile I/Mapbox: [maps-core]: Using OpenGL render backend

2022-07-27 14:24:07.133 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxTripSession] updateRawLocation; notify navigator for (1231454854) - start
2022-07-27 14:24:07.133 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Got location with timestamp 539862173690827
2022-07-27 14:24:07.133 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering void mapbox::navigation::NavigatorImpl::updateLocation(const mapbox::navigation::FixLocation &, mapbox::navigation::UpdateLocationCallback &&)
2022-07-27 14:24:07.133 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting void mapbox::navigation::NavigatorImpl::updateLocation(const mapbox::navigation::FixLocation &, mapbox::navigation::UpdateLocationCallback &&)
2022-07-27 14:24:07.134 17097-17097/com.ans.ctt.mobile W/Mapbox: [nav-sdk]: [TripSessionLocationEngine] Got an obsolete location: age = 5152 ms
2022-07-27 14:24:07.134 17097-17532/com.ans.ctt.mobile D/Mapbox: [nav-native]: Start processing location with timestamp 539862173690827
2022-07-27 14:24:07.134 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxTripSession] updateRawLocation; system elapsed time: 489100022048890; location (1231454854) elapsed time: 539862173690827
2022-07-27 14:24:07.134 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-sdk]: [MapboxTripSession] updateRawLocation; notify navigator for (1231454854) - start
2022-07-27 14:24:07.135 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Got location with timestamp 539862173690827
2022-07-27 14:24:07.135 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Entering void mapbox::navigation::NavigatorImpl::updateLocation(const mapbox::navigation::FixLocation &, mapbox::navigation::UpdateLocationCallback &&)
2022-07-27 14:24:07.135 17097-17097/com.ans.ctt.mobile D/Mapbox: [nav-native]: Exiting void mapbox::navigation::NavigatorImpl::updateLocation(const mapbox::navigation::FixLocation &, mapbox::navigation::UpdateLocationCallback &&)

@geografa
Copy link

@tkvalentine56 Migrating from previous versions of the Maps SDK requires the following steps to make sure that resources created in v9 are available to users in v10 as the offline database has moved. Is this what you may be running into?

@tkvalentine56
Copy link
Author

I have examined your requirements in https://docs.mapbox.com/android/maps/guides/migrate-to-v10/#offline and although important to note, I am convinced it has little to do with the issue we are experiencing. Here is the current evidence as I have experienced and witnessed.

(1) https://docs.mapbox.com/android/maps/guides/migrate-to-v10/#offline references moving maps sdk v9 files so that an app upgraded to maps sdk v10 can use the existing set of map tiles. This is not our issue. Our problem is that maps sdk v10 does not download any map/style tile sets at all. I am assuming that an app install into a clean environment with no concern of v9 file caches would download what it needs, store it where it needs, to later be found and used as needed. When I test the app I always start with an app uninstall to remove previous artifacts so as not to have that as a variable in test scenarios. This suggests that something else is at fault for not delivering required map artifacts.

(2) I upgraded our development app with the v2.6.0 sdk on June 16, 2022 when it became available as a GA release. I tested multiple times until July 21-23 when this issue started. This suggests that it is not a migration issue.

(3) We currently have an android production app using the Android Navigation UI sdk v 0.42.6. It quit working (not returning requested routes) the same time as our app in development using the Android Navigation sdk 2.6.0 GA. This suggests that a configuration item or account/user issue may be in play as the issue crosses two diversely different sdk frameworks.

(4) I ran our Android app that uses Mapbox Navigation UI 0.46.2 through some debug trials and found that a route request is now failing due to an HTTP 401 error return (unauthorized access in general). I am not sure if this is happening with v2.6.0 as I have not seen this in the logs.

(5) Android Navigation v2.6.0 bundled with com.mapbox.maps:android:10.6.0 so I excluded it and pulled in com.mapbox.maps:android:10.7.0 as stated in the migration notes link. This produced the same issue result in not downloading map tiles.

My experience is telling me that this is more of an access or configuration issue that a code/migration issue.

@tkvalentine56
Copy link
Author

This issue is resolved.
Replacement of the secret access key resolved the issue.

This is an apparent (a) corruption of or (b) disassociation of our secret access key by the host (Mapbox).

Evidentiary artifacts supporting the above statements:

  1. The public and secret access keys in question were 13 months old at the time of the issue first occurring (21jul22).
  2. Two production apps and one development app were using these access keys successfully during the 13 month period until the issue occurred (21jul22).
  3. The three apps current version were using the 13 month old access keys successfully for at least a month before the issue occurred (21jul22).
  4. All three apps were back dated to versions prior to the issue occurrence (21jul22), rebuilt and tested and the issue was present in all three apps. I then ruled out the apps as the cause and focused on the host (Mapbox) and host configuration items as the cause.
  5. After spending time on other possible cause items I decided to look at the access keys.
  6. I regenerated and replaced the public access key on all three apps and they still experienced the issue.
  7. I then deleted all existing secret access keys, generated a new secret key, rebuilt all three apps and tested. This seemed to resolved the issue with all three apps.

We, at the application end are satisfied that the secret access key replacement resolved our issue.
This still leaves a question as to what happened on or about 21jul22 on the host that may have put our secret access key and ultimately our Mapbox usage in jeopardy for our two production applications.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants