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

App crashes when mounting <UserLocation /> (RCTMGLLocationModule.start got 0 arguments, expected 1) #622

Closed
hanpama opened this issue Jan 16, 2020 · 7 comments

Comments

@hanpama
Copy link

hanpama commented Jan 16, 2020

Describe the bug
App crashes when mounting <UserLocation />

To Reproduce
Use <UserLocation /> component as a child of <MapView /> component("@react-native-mapbox-gl/maps": "7.0.9")

Expected behavior
Expected to show a dot on the device location

Screenshots
스크린샷 2020-01-16 오후 5 25 39

Versions (please complete the following information):

  • Platfrom: Android
  • Device: Emulator Nexus 5X API 29 x86 (1080 × 1920: 420dpi) | | 3.9 GB
  • OS: Android 10.0 (Google APIs) | x86
  • SDK Version 28
  • React Native Version "react-native": "0.61.5"

Additional context

RCTMGLLocationModule.start got 0 arguments, expected 1

It raises the error saying it hasn't passed 1 argument required.
And I am guessing the missing argument is minDisplacement, which has been recently added to RCTMGLLocationModule.java.

https://github.com/react-native-mapbox-gl/maps/pull/546/files#diff-44868fc4ad781b211fd026ed6a88bd38L73-R75

Are they related?
When using 7.0.8, it works fine.

@ferdicus
Copy link
Member

hey there, sorry for the report.
I can not reproduce this behavior with my setup.
minDisplacement will pass a default value of 0 if it isn't defined in your setup.

Two questions:

  • did you encounter this also on a physical device
  • could you share your MapView code snippet

Thanks

@hanpama
Copy link
Author

hanpama commented Jan 16, 2020

Thanks, @ferdicus !
I will try and share the result soon

@ferdicus
Copy link
Member

Any update on this - also did you try the current master?
It has an updated android dependency

@ErikTillberg
Copy link

Received this error on a real device on v7.0.9, upgrade to v7.2.0 and the error persists.

@kristfal
Copy link
Member

Sounds like you have a mismatch between JS and native code. Make sure to clean build and verify that both JS and native code is updated.

@hanpama
Copy link
Author

hanpama commented Jan 25, 2020

After removing android/app/build directory, the latest version works fine on my Android emulator.

package-lock.json:

"@react-native-mapbox-gl/maps": {
      "version": "7.2.0",

Currently I cannot reproduce the error.

@kristfal
Copy link
Member

Good. It was a partial upgrade issue then. Closing.

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

4 participants