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

Black screen (offline map) #661

Open
NaimAbb opened this issue Aug 21, 2024 · 31 comments
Open

Black screen (offline map) #661

NaimAbb opened this issue Aug 21, 2024 · 31 comments

Comments

@NaimAbb
Copy link

NaimAbb commented Aug 21, 2024

I have a problem, which is that I am trying to view the map without connecting to the Internet, and I followed the example on github, but after downloading the map, the screen remains black.

Simulator Screenshot - iPhone 15 Pro Max - 2024-08-21 at 20 59 40

@vigin-hsa
Copy link

me too have this problem..please let me know once any fix is given or if you find some ways to make this work

@maios
Copy link
Contributor

maios commented Aug 22, 2024

Hi, could you try running it on fresh install app? If it still persists then could you share the map_data.db from the device?

@vigin-hsa
Copy link

vigin-hsa commented Aug 22, 2024

i tried..doesnt work
attaching map_data.db
https://drive.google.com/drive/folders/1unpdrrloNdQJOfSJ1AbIXGIBadQ59udK?usp=sharing

@vigin-hsa
Copy link

@maios Please let me know the status

@NaimAbb
Copy link
Author

NaimAbb commented Aug 22, 2024

Hi, could you try running it on fresh install app? If it still persists then could you share the map_data.db from the device?

I noticed that when downloading it as satellite style, the screen remains black, and when choosing another style type, the map appears

@noforeignland
Copy link

Any updates for this issue? We rely on offline maps and it's not working for us either.

@maios
Copy link
Contributor

maios commented Aug 26, 2024

Hi, could you try running it on fresh install app? If it still persists then could you share the map_data.db from the device?

I noticed that when downloading it as satellite style, the screen remains black, and when choosing another style type, the map appears

@NaimAbb Satellite style or anything that uses raster tiles need to have correct pixelRatio, which in this #640 it should use the default pixelRatio, this fix is included in v2.2.0, can you try with this version, fresh install app and see if it works?

@maios
Copy link
Contributor

maios commented Aug 26, 2024

Any updates for this issue? We rely on offline maps and it's not working for us either.

Could you provide MapboxMaps Flutter SDK version that you are using, additionally a small project to help reproduce would be helpful for us to debug this issue?

@vigin-hsa
Copy link

vigin-hsa commented Aug 26, 2024 via email

@maios
Copy link
Contributor

maios commented Aug 26, 2024

the example in our package works for us :-/ so I suspect this might be caching issues, but fresh install should then work. Maybe you can provide a small projects that can reproduce the issue, for more information like devices name and model?

@noforeignland
Copy link

We are seeing the same problem.

To test, I do the following:

  1. Delete the demo app from the device to remove all cached files.
  2. Run the demo app, and download the map tiles in the offline demo.
  3. When the demo completes a blank map is presented - no map details are available at all.

Points to note:

  1. Map appears to display only the background terrain colour - zooming in and panning around reveals no detail.
  2. Tested on OnePlus 10 (Android 11) and iPhone (14 Pro, iOS 17.5.1)
  3. Using the latest available version: mapbox_maps_flutter: 2.1.0
  4. Tested with various map styles (have tried using MAPBOX_STREETS, DARK, SATELLITE and our own custom style URLs)

@noforeignland
Copy link

noforeignland commented Aug 26, 2024

Any updates for this issue? We rely on offline maps and it's not working for us either.

Could you provide MapboxMaps Flutter SDK version that you are using, additionally a small project to help reproduce would be helpful for us to debug this issue?

There's no need to provide a demo project. The mapbox demo app displays this behaviour on both our physical test devices, as noted in my earlier comment. I've also added similar code to our own app but this fails too. Can you share more info about what devices / environment you see this working on? and whether the code you're running is the same as the demo app in the examples dir please?

@maios
Copy link
Contributor

maios commented Aug 26, 2024

our apologies, it turns out that we did not include #640 which supposed to fix offline map for raster tiles in our latest release. We will be issuing new patch release asap and hope it will fix the black offline map for you <3

@noforeignland
Copy link

noforeignland commented Aug 26, 2024

our apologies, it turns out that we did not include #640 which supposed to fix offline map for raster tiles in our latest release. We will be issuing new patch release asap and hope it will fix the black offline map for you <3

Thanks - will this also fix the problem we're seeing with vector tiles? Note above, that no layers, raster or vector, work for us.

@baleboy
Copy link

baleboy commented Aug 27, 2024

I have just tested it by building the examples from main and running on iPhone 15 Pro / iOS 18.1 Beta:

  • launch the examples app
  • open Offline example
  • click "Download map" and wait for "Style Pack" and "Tile region" to reach 1.0
  • map shows
  • enable airplane mode and pan around
  • map continues to show

@vigin-hsa
Copy link

vigin-hsa commented Aug 27, 2024 via email

@baleboy
Copy link

baleboy commented Aug 27, 2024

can you please try in android

I could only try this on the emulator with similar result. I'll continue testing

@noforeignland
Copy link

noforeignland commented Aug 27, 2024

I have been testing and seeing the problem described on two physical devices as noted yesterday.
One iOS and the other Android.

@baleboy
Copy link

baleboy commented Aug 27, 2024

I can also confirm that the issue reproduces in my set-up with the stock example built with 2.2.0, so the upcoming 2.2.1 or building from the main branch should resolve the issue at least partially as expected. If the example works with the latest version but your own application doesn't, then we would appreciate if you could share a reproducer.

@baleboy
Copy link

baleboy commented Aug 27, 2024

I also tried the same test with the Mapbox Standard style and can confirm that the same issue reproduces in 2.2.0 but not in main. We are aiming to release 2.2.1 today to fix the issue.

@baleboy
Copy link

baleboy commented Aug 28, 2024

we just released 2.2.1 that should resolve this issue

@baleboy baleboy closed this as completed Aug 29, 2024
@noforeignland
Copy link

This issue is not fixed.

I have just cloned the lastest repo and your demo still fails with a black screen after the map has downloaded.

This is you demo running on my on OnePlus 10 (Android 11): https://youtu.be/u5rPyy_uF4g

@baleboy
Copy link

baleboy commented Aug 30, 2024

Thanks for the video, it's helpful. I can see that the map shows when you return to the offline example the second time. Is this the same behavior you have observed previously? I was under the impression that the map stayed black no matter what.

@noforeignland
Copy link

Is this the same behavior you have observed previously?

No this is not the behaviour I saw previously.

I was seeing what I think is the background color for the map style I had downloaded - a different issue from the black screen perhaps? Maybe we are addressing multiple bugs with this ticket?

See my comment from 4 days ago for my description on how to reproduce the problem and the map's appearance:

To test, I do the following:

  • Delete the demo app from the device to remove all cached files.

  • Run the demo app, and download the map tiles in the offline demo.

  • When the demo completes a blank map is presented - no map details are available at all.

Points to note:

  • Map appears to display only the background terrain colour - zooming in and panning around reveals no detail.

  • Tested on OnePlus 10 (Android 11) and iPhone (14 Pro, iOS 17.5.1)

  • Using the latest available version: mapbox_maps_flutter: 2.1.0

  • Tested with various map styles (have tried using MAPBOX_STREETS, DARK, SATELLITE and our own custom style URLs)

@baleboy
Copy link

baleboy commented Aug 30, 2024

I think this might be a separate issue, possibly Android specific. I can reproduce on Galaxy S24 but not iPhone 15 Pro

@noforeignland
Copy link

noforeignland commented Aug 30, 2024

I see exactly the same problem on iOS (tested on physical device iPhone 14 Pro, iOS 17.5.1) so this is not Android specific:

https://youtu.be/r7NJGsc8v1c

@baleboy baleboy reopened this Sep 4, 2024
@baleboy
Copy link

baleboy commented Sep 4, 2024

Reopening given the latest reports.

@maios
Copy link
Contributor

maios commented Sep 9, 2024

@noforeignland it seems that the problem is with the TileStore created at a temporary directory, we are investigating this. Using TileStore.createDefault() should work so can you try with default TileStore and see if the black offline map goes away?

@noforeignland
Copy link

@noforeignland it seems that the problem is with the TileStore created at a temporary directory, we are investigating this. Using TileStore.createDefault() should work so can you try with default TileStore and see if the black offline map goes away?

Please note my comments and video links for Android and iOS attached above. We are not seeing a black map, we are seeing a map in what appears to be the style's base color which might be a different problem.

@maios
Copy link
Contributor

maios commented Sep 9, 2024

@noforeignland by "style's base color", do you mean this? Because then it is the same problem where the tiles are not loaded 😅
image

@maios
Copy link
Contributor

maios commented Sep 20, 2024

Hi everyone, we have updated our offline example, could you please try again and report to us if the black offline map still exist? It would be a good idea to also clearing Derived data before building the app from fresh install.

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

5 participants