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

Conflicting requestCode #327

Closed
pasviegas opened this issue Sep 22, 2016 · 3 comments
Closed

Conflicting requestCode #327

pasviegas opened this issue Sep 22, 2016 · 3 comments

Comments

@pasviegas
Copy link

pasviegas commented Sep 22, 2016

It seems that react-native-braintree-xplat and react-native-image-picker are using the same requestCode in android, this causes the error below:

09-21 20:40:59.763 1906 1906 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { }} to activity {com.gostudentmobile/com.gostudentmobile.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.braintreepayments.api.models.PaymentMethodNonce.getNonce()' on a null object reference

Would be nice if either of you used more unique numbers, so they wouldn't conflict. Is it possible to change it?

Conflicting lines:

https://github.com/marcshilling/react-native-image-picker/blob/master/android/src/main/java/com/imagepicker/ImagePickerModule.java#L61

https://github.com/kraffslol/react-native-braintree-xplat/blob/master/android/src/main/java/com/pw/droplet/braintree/Braintree.java#L23

Thanks!

Cross issue: kraffslol/react-native-braintree-xplat#10

@yfuks
Copy link
Contributor

yfuks commented Sep 22, 2016

hi,

In react-native-braintree-xplat they have to check if there callback isn't null before continuing.
After all the process they just need to set callback = null
It's for me the most simple way to check if the result don't came from an other package :)

@marcshilling
Copy link
Contributor

I went ahead and made the request codes more unique anyway. Can you try v0.22.8 on npm?

@pasviegas
Copy link
Author

Wow! That's fast!

It works! Thanks, I can't express how happy I am with how fast this got solved!

Thanks again!

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

3 participants