question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception in native call from JS

See original GitHub issue

Before I have submitted the issue

[x] I have read an installation guide
[x] I know that for an iOS I need to install pods because I’ve read the installation guide
[x] I have read a linking guide and checked that everything is OK like in manual linking guide
[x] I know that before using tipsi-stripe I need to set options for my app as described in usage guide

The problem

Briefly describe the issue you are experiencing (or the feature you want to see added to tipsi-stripe).

Running Android app causes a crash with the below image.

Exception in native call from JS

I have went through the docs and everything seems to be linked properly.

There was not much else inside the [installation docs](https://tipsi.github.io/tipsi-stripe/docs/installation.html.

I looked around and added

implementation "com.google.android.gms:play-services-wallet:16.0.1"

to my dependencies in /android/app/build.gradle file.

Any idea how I could proceed from here?

I am not a native Android dev by any means so, perhaps something is out of date?

Environment

  • tipsi-stripe version: 7.5.0
  • Android:
  • OS version: MacOS 10.14.5
  • React-Native version: 0.59.9
  • (Android only) com.google.firebase:firebase-core version: 16.0.9
  • (Android only) com.google.android.gms:play-services-base version: 16.1.0

For Android, please provide the following sections from android/app/build.gradle:

  • android.compileSdkVersion: 28
  • android.buildToolsVersion: 28.0.3
  • android.defaultConfig.minSdkVersion: 16
  • android.defaultConfig.targetSdkVersion: 28
  • android.defaultConfig.multiDexEnabled true

Screenshot_1560982109

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

6reactions
john-hardingcommented, Jan 21, 2020

For me it was three things (pretty much a combo of some of the above):

  1. Put the following metadata inside of the already existing <application> tag in android/app/src/main/AndroidManifest.xml:
      <meta-data
        android:name="com.google.android.gms.wallet.api.enabled"
        android:value="true" />
  1. In /android/app/build.gradle put the following inside of dependencies: implementation 'com.google.android.gms:play-services-wallet:18.0.0'
  2. When calling setOptions, make sure you have androidPayMode set like this:
stripe.setOptions({
    publishableKey: "STRIPE_KEY",
    androidPayMode: "test"
    // merchantId: 'MERCHANT_ID', // Optional
});
4reactions
nikhilboranacommented, Oct 22, 2019

This version worked for me.

implementation "com.google.android.gms:play-services-wallet:16.0.0"

in dependencies in /android/app/build.gradle file.

and make sure you have put <application> <meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" /> </application> in AndroidManifest.xml

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception in native call from JS null · Issue #23418
I'm unable to find an answer including Exception in native call , IllegalViewOperationException , and StackOverflowException keywords. The ...
Read more >
E/unknown:React: Exception in native call
Try running this command from root directory of your project. react-native bundle --platform android --dev false --entry-file index.js --bundle- ...
Read more >
E/unknown:React: Exception in native call-React Native
Coding example for the question E/unknown:React: Exception in native call-React Native.
Read more >
Android Native Modules
When a native module method is invoked in JavaScript, React Native converts the arguments from JS objects to their Java/Kotlin object analogues.
Read more >
Developers - exception in native call from js -
when I run after installing a repository into my project I got "exception in native call from js" error in react native, got...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found