mapbox / mapbox/mapbox-maps-android

Display the user's location failed

Open
#2,427 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
Dominant language
Kotlin
Stars
578
Forks
161
PR merge metrics
No merged PRs in 30d

Description

## Environment

- Android OS version: Android 14
- Devices affected: Pixel 5
- Maps SDK Version: Mapbox common SDK v24.5.0 Mapbox Core Maps SDK v11.5.1

## Observed behavior and steps to reproduce

Run the Mapbox Maps Android project and enter the user location display page, but the current location cannot be displayed.

The log is as follows:

17:32:35.358 28395-28395 Mapbox I [common]: Using Mapbox Common SDK v24.5.0(edbe9cbfd)
17:32:35.402 28395-28395 Mapbox I [maps-core]: Using Mapbox Core Maps SDK v11.5.1(47046e34d8)
17:32:35.416 28395-28418 Mapbox I [MapboxReachability]: Application permission for ACCESS_NETWORK_STATE granted
17:32:35.723 28395-28435 Mapbox I [LifecycleUtils]: Task: TaskInfo{userId=0 taskId=901 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mapbox.maps.testapp/.ExampleOverviewActivity } baseActivity=ComponentInfo{com.mapbox.maps.testapp/com.mapbox.maps.testapp.ExampleOverviewActivity} topActivity=ComponentInfo{com.mapbox.maps.testapp/com.mapbox.maps.testapp.ExampleOverviewActivity} origActivity=null realActivity=ComponentInfo{com.mapbox.maps.testapp/com.mapbox.maps.testapp.ExampleOverviewActivity} numActivities=1 lastActiveTime=75089755 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@9825e12} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 136 - 0, 0) topActivityInfo=ActivityInfo{917b9e3 com.mapbox.maps.testapp.ExampleOverviewActivity} launchCookies=[android.os.BinderProxy@24f7fe0] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isVisibleRequested=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false topActivityLetterboxed= false isFromDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}
17:32:35.800 28395-28435 Mapbox I [LifecycleUtils]: Task: TaskInfo{userId=0 taskId=901 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mapbox.maps.testapp/.ExampleOverviewActivity } baseActivity=ComponentInfo{com.mapbox.maps.testapp/com.mapbox.maps.testapp.ExampleOverviewActivity} topActivity=ComponentInfo{com.mapbox.maps.testapp/com.mapbox.maps.testapp.ExampleOverviewActivity} origActivity=null realActivity=ComponentInfo{com.mapbox.maps.testapp/com.mapbox.maps.testapp.ExampleOverviewActivity} numActivities=1 lastActiveTime=75089755 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@b4098d4} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 136 - 0, 0) topActivityInfo=ActivityInfo{109da7d com.mapbox.maps.testapp.ExampleOverviewActivity} launchCookies=[android.os.BinderProxy@24f7fe0] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isVisibleRequested=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false topActivityLetterboxed= false isFromDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}
17:32:58.405 28395-28420 Mapbox I [metrics]: Metrics collection period: 0s
17:32:58.491 28395-28419 Mapbox I [metrics]: Metrics collection period: 0s
17:32:58.498 28395-28395 Mapbox I [maps-android\Mbgl-RenderThread]: renderThreadPrepared=false and Android surface is not valid (isValid=null). Waiting for new one.
17:32:58.587 28395-28395 Mapbox I [maps-android\Mbgl-RenderThread]: renderThreadPrepared=false and Android surface is not valid (isValid=null). Waiting for new one.
17:32:58.588 28395-28395 Mapbox I [maps-android\Mbgl-RenderThread]: renderThreadPrepared=false and Android surface is not valid (isValid=null). Waiting for new one.
17:32:58.625 28395-28395 Mapbox I [maps-android\Mbgl-RenderThread]: Renderer resumed, renderThreadPrepared=false, surface.isValid=null
17:32:58.625 28395-28395 Mapbox I [maps-android\Mbgl-RenderThread]: renderThreadPrepared=false and Android surface is not valid (isValid=null). Waiting for new one.
17:32:58.643 28395-28395 Mapbox I [maps-android\Mbgl-RenderThread]: renderThreadPrepared=false and Android surface is not valid (isValid=null). Waiting for new one.
17:32:58.646 28395-28395 Mapbox I [maps-android\Mbgl-RenderThread]: onSurfaceCreated
17:32:58.646 28395-28395 Mapbox I [maps-android\Mbgl-RenderThread]: onSurfaceCreated: waiting Android surface to be processed...
17:32:58.647 28395-28669 Mapbox I [maps-android\Mbgl-RenderThread]: Setting up render thread, flags: creatingSurface=true, nativeRenderCreated=false, eglContextMadeCurrent=false, eglContextCreated=false, paused=false
17:32:58.648 28395-28669 Mapbox I [maps-android\Mbgl-EGLConfigChooser]: In emulator: false
17:32:58.650 28395-28669 Mapbox I [maps-android\Mbgl-EglCore]: EGLContext created, client version 3
17:32:58.650 28395-28669 Mapbox I [maps-core]: Using OpenGL render backend
17:32:58.651 28395-28669 Mapbox I [maps-android\Mbgl-RenderThread]: Native renderer created.
17:32:58.651 28395-28395 Mapbox I [maps-android\Mbgl-RenderThread]: onSurfaceCreated: Android surface was processed.
17:32:58.766 28395-28395 Mapbox E [maps-android\LocationPuck2D]: No image holder data for mapbox-location-top-icon!
17:32:58.788 28395-28395 Mapbox E [maps-android\LocationPuck2D]: No image holder data for mapbox-location-top-icon!
17:33:03.415 28395-28670 Mapbox I [tile_store]: Searching for stray files to clean up
17:33:03.418 28395-28670 Mapbox I [tile_store]: Cleanup of stray partial downloads complete
17:33:03.419 28395-28670 Mapbox I [tile_store]: Searching for stale partial downloads to clean up
17:33:03.421 28395-28670 Mapbox I [tile_store]: Cleanup of stray partial downloads complete
17:33:03.784 28395-28419 Mapbox E [events_service]: Events sending aborted after 2 attempts
17:33:03.786 28395-28419 Mapbox E [maps-android\MapTelemetryImpl]: sendTurnstileEvent error: [code: HttpError, message: Failed to connect to events.mapbox.com/0.0.0.0:443]

Screenshot below:

![Screenshot_20240712-175811](https://github.com/user-attachments/assets/e313b50f-1dde-4c0f-853f-9b0933741de1)

## Expected behavior

should be positioned successfully

## Notes / preliminary analysis

I tried running the same code on other phones, and it successfully positioned and displayed the current location.
It should be that the positioning failed, but I don’t know why.

## Additional links and references

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the Mapbox Maps Android project on Android 14 with a Pixel 5, then open the user location display page and compare its behavior with the same code on other phones. Use the reported LocationPuck2D and positioning logs as starting points; done means the current location is displayed successfully on the affected device.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.