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.

Updating stripe-react-native leads to failed build due to cycle in Stripe dependency

See original GitHub issue

Describe the bug After updating a React Native project from @stripe/stripe-react-native 0.8.0 to 0.14.0, I got the following output during pod install invocation:

[!] CocoaPods could not find compatible versions for pod "Stripe":
  In snapshot (Podfile.lock):
    Stripe (= 22.0.0, ~> 22.0.0)

  In Podfile:
    stripe-react-native (from `../node_modules/@stripe/stripe-react-native`) was resolved to 0.14.0, which depends on
      Stripe (~> 22.5.1)

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `Stripe` inside your development pod `stripe-react-native`.
   You should run `pod update Stripe` to apply changes you've made.

After invoking pod install --repo-update as suggested, attempts to build the react native app fail due to a Stripe-related cycle in dependencies:

error: Cycle in dependencies between targets 'MyExampleApp' and 'StripeCore'; building could produce unreliable results. This usually can be resolved by moving the target's Headers build phase before Compile Sources.
Cycle path: MyExampleApp → StripeFinancialConnections → StripeCore → MyExampleApp
Cycle details:
→ Target 'MyExampleApp': CodeSign /Users/nmehlei/Library/Developer/Xcode/DerivedData/MyExampleApp-dvpuxmapogpzvtciswkgrtbmdjtr/Build/Products/Debug-iphonesimulator/MyExampleApp.app
○ Target 'MyExampleApp': ProcessProductPackaging  /Users/nmehlei/Library/Developer/Xcode/DerivedData/MyExampleApp-dvpuxmapogpzvtciswkgrtbmdjtr/Build/Intermediates.noindex/MyExampleApp.build/Debug-iphonesimulator/MyExampleApp.build/MyExampleApp.app.xcent
→ Target 'StripeFinancialConnections' has target dependency on Target 'StripeCore'
→ Target 'StripeCore' has compile command for Swift source files
○ That command depends on command in Target 'StripeCore': script phase “Copy generated compatibility header”

Expected behavior Updating stripe-react-native should not break compilation

Screenshots Does not apply

Desktop (please complete the following information):

  • OS: macOS Monterey
  • Version: 12.3.1

Smartphone (please complete the following information): iPhone simulator, various versions

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
juancsaenzcommented, Aug 22, 2022

pod update fixes the error for me.

1reaction
nmehleicommented, Jul 12, 2022

While I tried to reinstall pods before without any effect, moving back to my master branch (with npm i + pod install) and switching back to these changes fixed the issue for some reason. Cleaning the xcode build might’ve helped as well. Apologies, this bug report was therefore baseless and can be ignored. Thank you for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build error after upgrading to 0.3.0 #822 - GitHub
run: react-native run-android. Expected behavior: I expected the app to build successfully as before the upgrading stripe-react-native to 0.3.0.
Read more >
Stripe Installation failed in react native android - Stack Overflow
I have tried some solutions available online but nothing seems to work. Here is my build.gradle file // Top-level build file where you...
Read more >
Stripe React Native SDK
The Stripe React Native SDK allows you to build payments into your native Android and iOS apps using React Native. We provide powerful...
Read more >
Stripe integration for eCommerce App in React Native & AWS ...
Let's Integrate Stripe Payments in our eCommerce Amazon Clone in React Native. Enroll in "The Full-stack Mobile Developer" and become a ......
Read more >
How to implement Apple Pay in React Native Apps - Enappd
This happens when the library is not properly linked to the iOS platform. I found a solution fromthis forum and added my two...
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