Closed MendelBak closed 2 years ago
Please try to reproduce this within our /example
app
Also, please be aware, that you're sharing your accessToken
within your code example
Thanks
Thanks for pointing out the API key issue. Am I supposed to secure it? I did some research when trying out react-native-maps
where they require you to put your API key in your AndroidManifest, and they said keeping it secret is not necessary. I assumed the same for this.
How do I go about reproducing this in the /example app? I can download it, reproduce it locally, but how do I share that with this thread without creating a new git repo every time I want to ask about a bug?
@MendelBak have you rebuilt the project with gradle/android st after npm install?!
Yep. More than once.
Please try to reproduce from an empty project and post steps here.
react-native init sample --version 0.64.1
cd sample
npm install react-native-mapbox-gl/maps@8.3.0 --save
react-native run-android
So we've run into this in production and it seems to be do to changing/loading styles and some race condition and the user location component and possibly the camera component. We've seen it pretty much go away by wrapping both components in several checks. 2 for initial load, 1 for when ever the style changes.
Finished loading and finished rendering get set to true once on initial start, then when ever we change the style, we set finishedLoadingStyle to false, then change the style, then when its done loading, it remounts the components.
hope that helps.
There is also another ticket about this here: https://github.com/react-native-mapbox-gl/maps/issues/344
{finishedLoading && finishedLoadingStyle && finishedRendering ? (
<Map.Camera key="mapCameraComponent" />
) : (
<View />
)}
{finishedLoading && finishedLoadingStyle && finishedRendering ? (
<MapboxGL.UserLocation
animated={true}
renderMode="native"
androidRenderMode={"gps"}
key="mapUserLocationComponent"
/>
) : (
<View />
)}
Same here getting the same error built the project directly from the guide with no errors along the way.
We'd need more info to reproduce fix the issue
I am also experiencing this issue, followed the guides with no issues and am experiencing this error, using expo and react native.
I am also experiencing this issue, followed the guides with no issues and am experiencing this error, using expo and react native.
Same here any solution yet ?
NO update ?
Describe the bug
I'm getting this error when displaying a in a bare Android React Native application running on my physical Android device. I know that this error usually means someone is trying to run the map in an Expo application, but my solution was not ejected from Expo, as it was created as a bare project from the beginning.
Steps to reproduce the behavior.
I'm not really sure how to provide a replicable code sample without uploading my specific app configuration? I'm pretty new to app dev, so would appreciate some advice here.
Please include a single standalone React Native component.
Expected behavior
Should not show an error
Actual behavior
Shows error
Versions (please complete the following information):