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.

stripe.setOptions error: null is not an object (evaluating 'StripeModule.init')

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

I am running into issues with setting the options. I am on a Windows PC and Android and I went through all the proper linking steps in the offical documentation, but I am still getting an error when setting the options in the file.

It is returning that 'null is not an object (evaluating ‘StripeModule.init’). I am confused since I am not on Mac, so I can’t just simply link and use Cocoa Pods. Any help from anyone who has run into this in the past?

Environment

  • tipsi-stripe version: @7.5.1
  • iOS or Android: Android
  • OS version: Android 9 (Google Pixel)
  • React-Native version: 0.59.10
  • (Android only) com.google.firebase:firebase-core version: ???
  • (Android only) com.google.android.gms:play-services-base version: ???

Links to logs and sources

Here is a Gist of all the linking I did in the Android files: https://gist.github.com/Riive-Inc/8aadce38869915ecb3d4c8d548bf0daa

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

  • android.compileSdkVersion: 28
  • android.buildToolsVersion: 28.0.3
  • android.defaultConfig.minSdkVersion: 21
  • android.defaultConfig.targetSdkVersion: 27

Screenshots, GIFs (Must to have)

The error: jsklaflksdfabueohaef

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

1reaction
chetanCyquentcommented, Aug 24, 2020

Hi @LivanDiaz,

These are my setting for tipsi-stripe. iOS: podfile

pod 'Stripe', '>= 19.0.1'
pod 'tipsi-stripe', :path => '../node_modules/tipsi-stripe'

Android:(linking manually) android/settings.gradle

include ':tipsi-stripe'
project(':tipsi-stripe').projectDir = new File(rootProject.projectDir, '../node_modules/tipsi-stripe/android')

android/app/build.gradle

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation project(':tipsi-stripe')
    implementation 'com.google.firebase:firebase-core:17.0.0'
    implementation 'com.google.android.gms:play-services-wallet:18.0.0'
.....
}

android/app/src/main/java/<bundle>/MainApplication.java

import com.gettipsi.stripe.StripeReactPackage;



@Override
        protected List<ReactPackage> getPackages() {
          @SuppressWarnings("UnnecessaryLocalVariable")
          List<ReactPackage> packages = new PackageList(this).getPackages();
            packages.add(new StripeReactPackage());
            ....
          return packages;
        }

These settings are done for react-native 0.62.2

I hope these will help for you to fix the issue…

Thanks

0reactions
pynnercommented, Apr 13, 2021

same issue, no clear fix from any of these threads… anyone have success?

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - null is not an object (evaluating 'StripeModule.init')
I have an issue when running my react-native app where the error message was: null is not an object (evaluating 'StripeModule.init').
Read more >
null is not an object( evaluating StripeModule.init) Tipsi-Stripe
I'm trying to implement a payment method for my app using tipsi-stripe. So far it has been challenging. at the moment i have...
Read more >
null is not an object (evaluating 'StripeModule.init')
stripe.setOptions error: null is not an object (evaluating 'StripeModule.init')
Read more >
Usage · tipsi-stripe
Let's require tipsi-stripe module: import stripe from 'tipsi-stripe'. And initialize it with your Stripe credentials that you can get from dashboard.
Read more >
Stripemodule Failing For Android React Native Project
undefined is not an object (evaluating 'StripeModule.init') on iOS #596 [ X] I ... using tipsi-stripe I need to set options for my...
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