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

Fix error while updating coordinates of RCTMGLImageSource #1310

Conversation

michi-trecker
Copy link
Contributor

@michi-trecker michi-trecker commented Apr 14, 2021

Description

Fixes an issue we found on our app AtFarm. The app crashes while dragging MapboxGL.PointAnnotation with Error while updating property 'coordinates' of a view managed by: RCTMGLImageSource.

This is adding a try catch like on public void setURL(String url) in the same java class. The warning will look like RCTMGLImageSource: invalid native peer in this case.

Checklist

  • I have tested this on a device/simulator for each compatible OS
  • I updated the documentation yarn generate
  • I mentioned this change in CHANGELOG.md
  • I updated the typings files (index.d.ts)
  • I added/ updated a sample (/example)

Screenshot OR Video

image

@michi-trecker michi-trecker changed the title Fix error while updating coordinates of rctmgl image source Fix error while updating coordinates of RCTMGLImageSource Apr 14, 2021
@mfazekas
Copy link
Contributor

@michi-trecker thanks much for the PR! Do we know what is the reason for the error, does it happen every time?!

@michi-trecker
Copy link
Contributor Author

@michi-trecker thanks much for the PR! Do we know what is the reason for the error, does it happen every time?!

It happens if the map screen is closed after moving to the next one. So it seems there are still messages/events trying to reach the native map.

@ferdicus ferdicus merged commit cbd000d into rnmapbox:master Jun 4, 2021
mikalaiulasevich pushed a commit to OneSoil-Platform/maps that referenced this pull request Sep 23, 2021
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

Successfully merging this pull request may close these issues.

3 participants