-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Archive failure No such module 'PPRiskMagnes' #679
Comments
Seconded, I'm unable to update our project to 5.3.1 due to |
👋 Hello. Thank you for reporting this issue. I will be taking a look at this today. |
With a fresh clone of the repo & Xcode 12.5 (Swift 5.4), I am not immediately able to replicate this issue. However, after doing a Listed in the Swift 5.4 release notes are some package caching updates. Here are some suggestions to get you up and running which worked for me:
Let me know if those work! |
I'm also having the same exact problem with Xcode 12.5, can't do Archive builds at all. Tried the above steps and even rebooted a few times for good measure. Builds are fine, but Archives fail. Very strange really. |
Hi @mccarron - thank you for sharing. Would you mind giving some more info:
With a fresh clone of the |
I can post this but I can't share full debug logs here.
Correct this is Xcode 12.5 and Braintree iOS 5.3.1. It seems to archive just fine with Braintree iOS 5.3.0 on Xcode 12.5. I don't have Xcode 12.4 installed right now so I can't easily test if it's an Xcode issue as well as we're doing this SPM migration due to Xcode 12.5 fixing SPM issues. I may on another machine so I can report back later today.
Product > Archive as you said and we also use
I'll try to reproduce on a clean project, it seems fairly reliable to do here with little work needed to reproduce for us. We also use Braintree Drop In so think it may be related to the combo use maybe? For now we'll stay on 5.3.0 since that seems to work just fine. |
Quick update it does in fact fail only on Xcode 12.5 but works fine on Xcode 12.4, both with Braintree iOS 5.3.1. Switched between them in the same project state and triggered the failure only on Xcode 12.5.
|
Thank you very much for providing that detail! I created a new sample app via a blank Xcode project, included Braintree Drop In v9.0.1 (with Braintree 5.3.1) via SPM. I was able to replicate your archive issue via the XCode UI "Product > Archive". However, I then ran |
i'm having the same issue on xcode 11.5 - No such module 'PPRiskMagnes' - even on running the app. i only need the braintree + paypal integration and it seems that PPRiskMagnes lib is still creating issues (last time i tried this integration was in february). sometimes after multiple builds the app runs but i get a runtime crash: dyld: Library not loaded: @rpath/PPRiskMagnes.framework/PPRiskMagnes
Referenced from: /private/var/containers/Bundle/Application/0C2D8DA4-D8DB-4086-8E32-65B42C27799B/<APPNAME>.app/<APPNAME>
Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib what i tried:
import PPRiskMagnes
^
** ARCHIVE FAILED ** Braintree is the only dependency that still keeps me from fully migrating from cocoapods to SPM. This is really annoying because all the other "big guys" already got SPM figured out (Stripe, Firebase, etc). |
@sestevens mentioned in #576 that "cleaning and re-building" solves the issue. The thing is, at least for me, I never have an issue with Build, but only with Archive. AFAICT, Archive is always a clean-slate build. |
This seems to be a bug in the Xcode build system for swiftPM integration! Try this https://github.com/simonpierreroy/xcframework-issue and always clean in between it should fail! It does the same with my own local package that has an XCframework! Here is my feedback |
While we wait for an update to SPM, Is there an older version of the Braintree SDK that can be used with SPM that doesn't rely on |
Hi everyone. We think this is likely an Xcode bug, but are still doing some testing internally. Like I said in my previous posts, we were only able to trigger the archive issues sometimes. Building & running the application, re-installing the package via SPM, and archiving on the command line all got things working for us. @JackoPlane - people in this thread are saying that they don't see archive issues on 5.3.0, however @sestevens and I were seeing some similar issues in our CI near that version release. We can't say for sure that the issue is not present on 5.3.0, but you can give it a shot for now. |
Agree with ^ I experienced it once with 5.3.0 locally but went away with a clean, but no issues on CI at all so far. knocks on wood |
I do believe it's an Xcode bug, and only once did I succeed in archiving. Dozens of attempts later with all manner of cleaning, resetting, re-downloading, removing and re-adding, I haven't been able to Archive. I submitted our project to Apple, and it looks like another Apple engineer has taken on the Swift bug for it. I added @simonpierreroy's info to that. We’re using 5.3.0. |
One possibility might be if Braintree packaged up the entire suite as a single binary framework (since I presume there are parts of your code you don't want to share). We might be able to link against that. I think it's the transitive dependency that fails. |
Just chiming to confirm I am seeing this same error in: Apple Silicon In debug OR release mode: I was able to work around this issue/upload to the store by: Set Release mode/any iOS device |
Also, this same problem totally breaks SwiftUI previews for the entire project which is super frustrating. Unfortunately I have not been able to find a workaround/retry pattern that gets SwiftUI previews to work. Back to the dark ages of code -> compile -> test on device -> tweak code again 😂 |
I ran into this issue with BT 5.3.0 and 5.4.0, but I have downgraded to 5.2.0, and that seems to be working for me. |
Unrelated to braintree, almost certainly, but I've run into SwiftUI preview problems that say things like ".swift is not a member of any target." I found removing and re-adding that file to the project resets Xcode's notions. |
👋 Hello everyone. We pushed a potential "fix" to a branch called |
i'm still getting |
Hi @rursache - remove the dependency, clean, re-build etc? |
exactly in that order EDIT: got it working by removing derived data folder ( 🎉 |
I spent time in an Xcode lab during WWDC. They fully acknowledged the bug and will be working on it, although there's no indication as to when it will be fixed (hopefully they'll do an Xcode 12.5.1!). In the meantime, they offered this workaround, which I have not had a chance to try yet. The failure is caused by a clean build failing to properly process XCFrameworks. This processing step involves copying them to the correct location in the built products directory. The proposed workaround is to manually copy the binary XCFrameworks to the appropriate location in the build products directory. This might work as a Run Script build phase in the main target, or you might need to create a separate Aggregate target and make that a dependency of the target you're trying to build. The correct location can be found by doing one of the target builds that works and looking for where it copies |
Same here :) my Feedback was acknowledge and I was told during a WWDC lab they are working on it. No timeline. (I hope a beta of Xcode 13). They confirm my hypothesis for the cause described here (at least told me it was a build system issue) #679 (comment). |
Thank you @JetForMe & @simonpierreroy for communicating this issue to Apple dev's at WWDC 👍 . Is anyone hard blocked by this issue? If so, please let us know. On our end - we are always able to circumvent this bug by cleaning, then re-building/ running the actual application, and then archiving succeeds. Also, with the branch we posted above, we haven't yet been able to replicate the issue. |
We're not blocked only because we're still using CocoaPods to integrate it, and we have a crucial deadline that's taking priority over the goal of getting rid of CocoaPods. In six weeks, we'll see. |
I am regularly able to reproduce this issue on our CI machines, even with the xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration Debug CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO build | xcbeautify It might be worth noting that my terrible workaround is simply to try this ^ Silly question: Should the Package.swift simply specify that the |
Great question! That is how it should be, but due to an Xcode/SPM bug when a library depends on a binary target, we had to expose PPRiskMagnes as its own library as a workaround. You can see that discussion here. The need for this workaround is apparently solved in Xcode 12.5, and we are currently working on / testing that update now. I'm glad you have a workaround for CI. Today we will release a version of the SDK with a workaround that has calmed our CI from seeing this bug so frequently as well. Will keep you posted! |
👋 Hi everyone. We released Braintree v5.4.1 with a workaround that has consistently removed this issue from both our local testing and CI builds. We understand this issue is some combination of an Xcode bug with our SDK - but wanted to release this fix to help resolve this issue for you, if possible. Thank you all for thorough feedback and help! Feel free to keep us posted by commenting, or opening a new issue if problems arise. |
An FYI we were still seeing this with Not sure if happening for others as well? |
I am still hitting this issue after upgrading to cc: @scannillo @mccarron FYI |
you need |
The release notes say:
I read that to mean I should remove the explicit deps I have on |
the installation guide is very clear around what you need to include when targeting parts of the sdk. your issue is not related to this thread / #679. |
@rursache Doesn't look like that installation guide has been updated for |
Got my set up working! For anyone else: After updating to |
@rursache is correct - for v5.4.2+, you no longer need to explicitly include |
We're able to build with Card, Core, ApplePay, and PayPal, and haven't needed PayPalDataCollector in order to build and archive. But we are seeing very bizarre behavior with the iOS drop-in UI not displaying the vault (stored methods), except for one build we did earlier today, and we can't figure out why. |
@scannillo could you explain the change you did in the framework and your finding to make it work (why Xcode 12.5 for example) :) it would be useful for one of my project. Thank you so much. |
Hi @simonpierreroy - sure, happy to share. Check out this PR, in which the description outlines the situation and solution more thoroughly. |
Integration Details (please complete the following information):
Describe the bug
Archiving fails when importing a subset of libraries within the Braintree Swift Package. The
PayPalDataCollector
library fails to compile:No such module 'PPRiskMagnes'
This was not an issue in Braintree 5.3.0 and earlier.
To Reproduce
Steps to reproduce the behavior (video attached below):
Expected behavior
The archive completes successfully
Screenshots
repro-steps.mp4
The text was updated successfully, but these errors were encountered: