-
Notifications
You must be signed in to change notification settings - Fork 503
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
onStyleLoadedCallback not called on iOS #347
Comments
Hi @woelmer, I'm trying to reproduce this error but everything seems to work on my device. If I click on Can you verify that the onStyleLoadedCallback is not triggered by adding a breakpoint of print statement in this method: |
I experienced the same issue just yesterday in my project on ios. onStyleLoadedCallback fired on first entry into the page containing map. On Android everything was fine. |
Just tested it a couple of times and it seems that the onStyleLoadedCallback is not always fired. On my device in most cases the style is loaded properly but some times it is not and then the icon images are not loaded. Will have to look deeper into this issue. |
@TimothySealy The new recommendation is to add symbols in the onStyleLoadedCallback which is why I noticed it in my own project. I thought I would try out the example and noticed the same thing. I had breakpoints there that were not getting hit. I did have it successfully call the callback once if I recall, so I guess it is intermittent like you noticed. |
Seeing the exact same thing as @woelmer - tapping on The only time I can get |
@woelmer @philiplindberg If you previously added your annotations before onStyleLoadedCallback was fired and that worked for you, you can continue to do this as a workaround. The new documentation wasn't added because we changed any behavior. Adding annotations in onStyleLoadedCallback was always recommended (just less visibly). |
I can confirm the issue. Have not been testing on iOS for some time, so not sure when it started happening exactly. |
Happening with me too, my workaround is check OS and if iOS do it manually after onMapCreated. |
Issue is still present on latest master, after the supposed fix was merged. @andrea689 Was the issue fixed in your tests? |
Ok, this was an issue on my side, didn't update properly. Seems to be more stable now, I'll keep testing |
This is still completely unstable for me. |
@tobrun We should reopen it. Style callback is not invoked, but looks like it's not in Flutter, it's not properly called from the native part. |
This callback in
|
Debugging in Xcode, this line is being correctly called
But when debugging in flutter, this invocation somehow doesn't come to Could it be related somehow to |
I have found what's going on. If I modify
onStyleLoaded callback on iOS will be invoked before map was ready. @tobrun @m0nac0 Could you please help us out with this critical issue on iOS? I am not sure how to properly modify iOS MapBox code to run properly. |
@andrea689 web support refactoring might have been the cause of this issue, this PR #223 |
Hi @AAverin can you share a minimun app example with this problem? I have a production app and no have problems. If you want, try my app: https://apps.apple.com/it/app/3bee-i-tuoi-alveari/id1533079866 |
@andrea689 Looks like it's not as straightforward as I thought. I had this bug all the time during development, but release build looks to be working fine at the moment. I will try to compare and provide more details, but overall it seems that it is possible that |
@andrea689 I will take a look again, but now I am using latest master and I am pretty sure I still had issue on dev builds |
I also experience this. It seems racy: sometimes it is called, most times it is not. It is easy enough to reproduce by using "hot restart" in flutter. |
Still an issue in 0.10.0 ;( |
me too :( |
So far for me the issue only seems to reproduce on debug builds. Release builds seem to be fine, at least no users have complained yet. |
@AAverin I was able to reproduce this on both release & debug (iOS)... I'm also not sure whether I saw this happening on Android, will check more and get back here if find anything. |
Debugging this issue, it seemed as native methods inside Mapbox SDK were not called. |
I have exactly the same problem on iOS, still any solution found ? |
any news? |
still an issue on 0.12.0, only happening on ios I believe |
I can also confirm this happening in production builds on real devices. |
Some debugging results. |
Opened a PR with a fix |
I still have this issue with Mapbox 0.14.0? |
@samderlust In that case we would need your help debugging the issue. |
@AAverin thanks, it fixed with mater branch |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Im seeing this in mapbox maps 11.8.0 |
Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5 19F101, locale en-US)
On Master branch of plugin.
The
onStyleLoadedCallback
is not called in the example app. Notice if you go to 'Place Symbol' and click onadd (asset image)
oradd (network image)
it does not work. That is because these images are setup in theonStyleLoadedCallback
which is not called on iOS. This works fine on Android.The text was updated successfully, but these errors were encountered: