#ceo_terminal-reactnative

1 messages · Page 1 of 1 (latest)

fleet heathBOT
wide arrowBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

fleet heathBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1260982556447477932

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

hallow pike
#

This discord server is for live developer help. If you're not available to chat in real time, you should just reach out to Stripe Support: https://support.stripe.com/contact

#

We close threads if you don't respond

gusty hinge
#

Hi

#

I know

#

and we are developers

#

so I request help from you

hallow pike
#

What's your question

gusty hinge
#

Of course we respond

#

we have like 2 weeks facing the same issues

ashen cloak
#

Hi there. I m the developer that have a problem.

gusty hinge
#

with conflicts between Stripe Tap payments and Stripe SDK

#

we have even installed all the libraries from zero 5 times

#

and did not solve the issue

#

we can send you screenshots

#

tell you the versions of the libraries and sdk we are using so on..

#

@ashen cloak is here to ask the questions

#

and tell you the issues we have

ashen cloak
#

We have a React native app, and we try to implement Tap/Pay function. But after we install Stripe SDK, as the Documentation say, the App becomes corupt, and stop functioning

#

Our React-native Version: "react-native": "^0.70.0",

gusty hinge
#
A problem occurred evaluating script.
Calling [node, F:\JobWork\MainClinicApp-OOTBusiness\node_modules\@react-native-community\cli\build\bin.js, config] finished with an exception. Error message: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

  The current character read is 'i' with an int value of 105
  Unable to determine the current character, it is not a string, number, array, or object
  line number 1
  index number 0
  info Run CLI with --verbose flag for more details.
  ^. Output: info Run CLI with --verbose flag for more details.
[13:10]
Even after removing/uninstalling the package, the script remains corrupt, and the same error keeps comming.```
hallow pike
fleet heathBOT
ashen cloak
#

"@stripe/stripe-react-native": "^0.38.1",

#

"@stripe/stripe-terminal-react-native": "^0.0.1-beta.19",

hallow pike
#

Ok so latest versions

ashen cloak
#

right

wanton barn
#

ceo_terminal-reactnative

silver nebula
#

👋 stepping in here to take a look, catching up

hallow pike
ashen cloak
#

The error points to this file, that looks a bit weird. Somehow a lot of code is commented. But this happend only after running: npm install @stripe/stripe-terminal-react-native

ashen cloak
silver nebula
#

I'm looking but I don't really think this is related to the Stripe library

#

But give me a min

ashen cloak
#

Maybe not directly, but this happend only after: npm install @stripe/stripe-terminal-react-native

silver nebula
#

I'll try and repro that, but in the meantime you already removed the library, deleted your node modules and reinstalled, and cleaned your build?

ashen cloak
#

Many times.

silver nebula
#

Alright well give me a minute to see if I can reproduce this behavior as well

ashen cloak
#

Ok, let me know if you need any more infos

silver nebula
#

Going to take a few mins as building a fresh project. That said, I assume you have other libraries in your project as well?

#

Basically it is possible that the @stripe/stripe-terminal-react-native library didn't play nicely with some other library that you have.

silver nebula
#

Can you show me your package.json?

gusty hinge
silver nebula
#

Yeah I mean if there is library conflict then you will only be able to figure that out on your side. You would need to add or remove libraries one by one

ashen cloak
gusty hinge
#

@ashen cloak will provide you with the package json

ashen cloak
#

This is our package.json

silver nebula
#

lol okay you have a ton of dependencies...

ashen cloak
#

I tried now using npx npm-check-updates to update all to the newer version. But this will create even more conflicts i assume.

silver nebula
#

Yeah I would absolutely not do that

#

But that is why you have your react-native version at 0.74.3 I assume

#

Whereas previously you said you were on 0.70.0?

ashen cloak
#

I mean, i tried a lot, maybe this way i update the pachage that conflicts with stripe and point to the problem

silver nebula
#

The first step really is to create a fresh project and add just the two Stripe packages and make sure that the project successfully builds with your environment

ashen cloak
#

Let me clone the Repo again, install the packages and make you a short video with after installing Stripe. Would that help you?

silver nebula
#

No I don't really need a video

#

The reality is that your project is crashing and you are going to have to figure out why since I can't replicate your project/environment exactly. I'll try my best to help and see if there actually is some inherent bug with either of our libraries but I would assume that isn't the case since we have sample projects that you can see within the repo itself.

#

My recommendation is the above, first create a fresh project and just install the Stripe libraries

#

And see if it will build or if you hit the same error

#

That would be the first step in ruling things out for what is going on

ashen cloak
#

I m sure this will work on a fresh project. But i hoped you can tell me with what other package does Stripe has a conflict. Because the app is working before installing Stripe.

silver nebula
#

I am not currently aware of the library having a conflict with any other library. That doesn't at all mean that there are no other conflicts, but it isn't possible for us to test out libraries compatibility with other libraries. In general, if a widely-used library is found to be incompatible with our library then we would try to patch ours to make them compatible, if that is possible. However at the moment I'm not aware of any open bug reports for library incompatibility. Which goes back to what I said before -- if you want to figure that out, you are going to have to narrow down the libraries you use one by one to figure out which one(s) cause this crash

ashen cloak
#

The problem with your solution is even if i start removing, i m not sure this will point to the problem. Like i said, after installing Stripe, even if i remove it, the node-modules are corrupt. So i can‘t really test much.

#

Anyway, i will keep trying. How can i contact you in the future if i found something out and need your help?

gusty hinge
ashen cloak
#

I believe it would be more productive to keep contact instead opening a new thread each time and speak with different people.

silver nebula
#

If you want a constant thread then you would need to contact us through Support via https://support.stripe.com/contact/login and we will assist you over email. Otherwise, on this server, it will always be on a thread-by-thread basis as threads get closed after a short time period of inactivity.

silver nebula
gusty hinge
#

Does stripe listed official integration partners have a higher priority in the tickets and discord support because we are one of them and we are bringing clients to stripe as well?

#

@silver nebula

#

So helping us fixing the issue is ill generate more clients for stripe platform too

silver nebula
#

Not that I'm aware of. My team doesn't work with any particular accounts -- we help all developers. If you have a point of contact within Stripe already then you may want to reach out to them. Otherwise, doing the above and clearly explaining your issue will get you to my team and we will help best we can.

#

The other thing you can do is post an Issue on the Github repo and you may get a response there from our Engineers who maintain those repos

gusty hinge
#

We already use stripe connect and stripe terminal on the web and we need to use stripe tap and pay on the mobile for our users

gusty hinge
#

However you have not been able to tell us if there is an issue or not

#

So we will start trying test try and error with all the libraries one by one

#

We don’t want to delay

#

If you know what I mean

silver nebula
#

Yep my own build is still slowly moving along. I'll make sure my own project works with the Stripe libraries

gusty hinge
#

We tried since JAN this year to implement it when you first released official this capability

#

Then took a break

#

Now trying again

silver nebula
#

To be clear, it is still in beta so this isn't unexpected that there are going to be bumps.

#

But yes, I do understand you want to move as quickly as possible

gusty hinge
#

Yeah

gusty hinge
silver nebula
#

Sure

fleet heathBOT
gusty hinge
#

Welcome @shadow heath

silver nebula
#

Okay @gusty hinge and @ashen cloak sorry for the delay, got pulled away by some other stuff but now I have a successful build with both libraries installed

ashen cloak
#

Ok. Can you give us the version?

silver nebula
#

I did have to work around a couple errors due to having both libraries -- ran into https://github.com/stripe/stripe-terminal-react-native/issues/653 which a fix was just deployed for (see: https://github.com/stripe/stripe-terminal-react-native/pull/754) but you need to make that modification yourself as that hasn't been deployed yet. Then also ran into needing to set packagingOptions liked discussed here: https://github.com/stripe/stripe-terminal-react-native/issues/477 and I do think that was result of having both Stripe libraries

#

My package.json is simply:

{
  "name": "discordTestProj",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@stripe/stripe-react-native": "^0.38.1",
    "@stripe/stripe-terminal-react-native": "^0.0.1-beta.19",
    "react": "18.2.0",
    "react-native": "0.74.3"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.74.85",
    "@react-native/eslint-config": "0.74.85",
    "@react-native/metro-config": "0.74.85",
    "@react-native/typescript-config": "0.74.85",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.2.0",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}
#

And as noted above I added packagingOptions { resources { excludes += 'org/bouncycastle/x509/CertPathReviewerMessages*' } } to my app/build.gradle

#

And added android.jetifier.ignorelist=jackson-core to my gradle.properties

ashen cloak
#

What exactly are the 2 library you are talking about?

silver nebula
#
    "@stripe/stripe-terminal-react-native": "^0.0.1-beta.19",```
ashen cloak
#

Ohh, ok. So you think this was the reason we had that problem?

silver nebula
#

Think what was the reason?

#

The issues I ran into above?

ashen cloak
#

Let me rephrase. You tried to reproduce the behaviour we told you about. And the reason why we had that problem is…?

silver nebula
#

Let me call requestNeededAndroidPermissions real quick to make sure it doesn't crash -- that is what you said crashed your app initially, correct?

ashen cloak
#

That right. But like i said, the app can’t be opened again even if i undo everything related to Stripe.

silver nebula
#

Yeah works fine:

ashen cloak
#

Removing the function, and Stripe library.

silver nebula
#

Right but my test indicates that the problem is likely the overlap with some other dependency in your project.

ashen cloak
#

We are not saying that Stripe is not working, we are saying that Stripe is making our App to crash.

silver nebula
#

Yeah but unfortunately that isn't something we control from our side at all.

ashen cloak
#

So in order to test if Stripe is compatible with other libraries, you could now add our package.json file to your project, and see if are conflicts. The way you did it, it‘s not really an accurate reproduction.

#

Because if Stripe is not compatible with another dependency, you need to inform the other Developers, and spare them the time and costs.

silver nebula
#

Doesn't really work like that. My environment very well may not be set up to work with your dependencies -- I can't just drop a package.json into an app and expect it to work. You need to install them within your environment and test each one as you install.

I don't disagree that if two libraries are not compatible then there should be work done towards making them compatible, but as I said already, we aren't currently aware of any library incompatibility.

ashen cloak
#

Ok. In this case i have to do so, and send you the result. If so, Stripe should do something about this. Right?

silver nebula
#

If you can isolate a dependency conflict and we can reproduce it then yes we will report it internally (or you can file an Issue on our github repo) and our Engineers will look into fixing it.

#

Can you give me your non-upgraded package.json

#

I'll see what happens on my end

#

Just to see if I can actually repro or if I get other errors due to environment

#

I am very doubtful I will be able to recreate what you are seeing, but no harm in trying I suppose

gusty hinge
#

Can you guys send over your json file?

ashen cloak
#

Ok. I will create new project and install stripe. After that i will add dependecy one by one. And send you the dependency Stripe conflicts.

silver nebula
#

My environment is not setup to run 0.70.0 but I'll see if I can run your dependencies on 0.74.3

silver nebula
ashen cloak
#

This is package.json known working without Stripe. The moment i add Stripe, the App stoped working

#

I mean you could just paste it your new App and try installing the dependecies.

#

i mena only the dependecis. I belive this should work just fine.

silver nebula
#

Right that's what I'm doing but it doesn't just work because my environment isn't set up to run these versions. That's what I've been trying to say.

#

Also I'm pretty confused how your project was even building before

#

There are all sorts of version incompatibility with this

#

Like: pm ERR! Found: react@18.1.0 npm ERR! node_modules/react npm ERR! react@"18.1.0" from the root project npm ERR! peer react@"*" from native-base@3.4.28 npm ERR! node_modules/native-base npm ERR! native-base@"^3.4.28" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^18.3.1" from react-dom@18.3.1 npm ERR! node_modules/react-dom npm ERR! peer react-dom@"*" from native-base@3.4.28 npm ERR! node_modules/native-base npm ERR! native-base@"^3.4.28" from the root project

#

And: While resolving: discordTestProj@0.0.1 npm ERR! Found: react@18.1.0 npm ERR! node_modules/react npm ERR! react@"18.1.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.0" from @react-native-community/image-editor@2.3.0 npm ERR! node_modules/@react-native-community/image-editor npm ERR! @react-native-community/image-editor@"^2.3.0" from the root project

#

Those are two examples of your library versions in your dependencies that conflict

#

Anyways, at this point I have to step away

#

I do think the best path forward is as we discussed -- add dependencies one by one to your fresh project

#

That is the best way to narrow down the culprit here

#

I know it sucks, but really it is the only path forward

ashen cloak
#

Can you try npm install —legacy-peer-deps

silver nebula
#

Is that how you have been building the whole time?

ashen cloak
#

Yep, because the app is built a long time ago, and if we update the dependency, we would run into a lot of problems.

silver nebula
#

😅

#

That is likely exactly why you ran into the current problem

fleet heathBOT
ashen cloak
#

So Stripe can’t be implemented only in newer Apps? This should still work.

silver nebula
#

You can't just yolo add libraries without their necessary peer dependencies being satisfied and expect them to not have conflicts...

ashen cloak
#

So what do you suggest we should do?

silver nebula
#

You should do what we discussed previously. You would build a fresh app and resolve your dependency conflicts along the way to make sure everything is compatible. If there is a maintained library (not a deprecated one) that is not compatible with the Stripe libraries, then you should let us know about that so we can help either fix that issue from our side or figure out a workaround.

ashen cloak
#

Hmm, ok. Let me speak with my CEO about this and see if he is also ok with this. Could you let this thread open until tomorrow?

silver nebula
#

K for fun trying to build your exact app with dependencies and ignoring peers

#

Will likely crash

#

Due to my local environment

#

But we'll see

ashen cloak
#

Probably

#

But we are at the point where we try everything 😄

silver nebula
ashen cloak
#

The problem with that is that i feel like you already know the issue and you are able to help us better

silver nebula
#

Honestly there isn't anything else we can do for you really without more information from your end about the specific dependencies that are conflicting

ashen cloak
#

Ok. Let me do what i said and give you infos.

silver nebula
#

Sounds good

#

Yeah I think some necessary peer deps got skipped which is making my build fail

#
     Searched in the following locations:
...```
#
         project :app > project :sumsub_react-native-mobilesdk-module
   > Could not find any matches for com.transistorsoft:tsbackgroundfetch:+ as no versions of com.transistorsoft:tsbackgroundfetch are available.
     Searched in the following locations:
...
#

Anyways, circle back with what you find. We'll be here.