Stripe-ios: Redefinition of module 'Stripe3DS2'

Created on 24 Nov 2020  ·  8Comments  ·  Source: stripe/stripe-ios

Summary

I just updated to version 21.0.1 using Carthage. I managed to fix all issues thanks to the migration guide and helpful warnings/error messages. The app is actually running well on the simulator but when I try to run the app on an actual device I get the following error:

Capture d’écran 2020-11-24 à 11 34 43

I tried the usual stuff: remove derived data, clean Carthage cache, restart Xcode... but still the same 😞

Code to reproduce

A project importing the SDK using Carthage and running the app on an actual device ?

iOS version

14.2

Installation method

Carthage

SDK version

21.0.1

triaged

All 8 comments

Hi @glaures-ioki! I can't reproduce this locally, though I have a speculative fix, I'll send it out soon.

It looks like it's possible that Stripe3DS2 is being included separately in your project somehow: Just to make sure, are you seeing Stripe3DS2.framework in your target's Frameworks, Libraries, and Embedded Content settings? You should only have Stripe.framework there.

Hey David,

are you seeing Stripe3DS2.framework in your target's Frameworks, Libraries, and Embedded Content settings?

No, only Stripe.framework.

Maybe it could be related to our project structure: Stripe is imported into a framework which is then imported into the app. But we have been using Stripe for more than two years now and this never caused any issue before.

Stripe is imported into a framework which is then imported into the app.

Thanks for the info, I think this is the problem! We'll find a way to make this work.

I'm seeing the same same symptoms – runs in the simulator fine, fails when trying to build an Archive for release. I'm using Xcode 12; have cleared DerivedData, caches, and cleaned the project itself; and I have built everything in Carthage with --no-use-binaries set.

Unlike @glaures-ioki, however, I'm only importing Stripe into my main project's files, not any intermediate frameworks.

The specific errors I'm seeing when building the project are:

/Users/dylan/Dev/OurApp/client/Carthage/Build/iOS/Stripe.framework/Modules/module.modulemap:12:8: error: redefinition of module 'Stripe3DS2'
module Stripe3DS2 { }
       ^
/Users/dylan/Library/Caches/org.carthage.CarthageKit/DerivedData/12.1_12A7403/stripe-ios/21.0.1/Build/Intermediates.noindex/ArchiveIntermediates/StripeiOS/BuildProductsPath/Release-iphoneos/include/module.modulemap:1:8: note: previously defined here
module Stripe3DS2 {

We're continuing to investigate this. We have a tentative plan to simplify the framework's build process, but it'll take another week or so.

As a workaround for Carthage users, I'd recommend pinning to version 20.1.1, or using Cocoapods/SPM/manual installation instead.

Confirm this issue, on version 21.1.0

Hello! The Stripe3DS2 dependency is now distributed as source instead of a binary, which should resolve this issue. Please update to version 21.2.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

coolcool1994 picture coolcool1994  ·  4Comments

Andrewangeta picture Andrewangeta  ·  6Comments

chrismanderson picture chrismanderson  ·  4Comments

davidme-stripe picture davidme-stripe  ·  6Comments

paynd picture paynd  ·  3Comments