I appreciate that this post is essentially a stackoverflow “pls help” post but I thought you guys would be a little better equipped to lend a hand.
I’ve had a weird issue on my iOS CI pipeline, and I think it’s been happening ever since…
- Upgrading my local machine to MacOS Montery Beta (12)
- Upgrading to Xcode 13 (I was using the beta until now). I’m now on 13.1
The Bitrise stack is set up to use MacOS Big Sur and Xcode 13.0.
The archive step is failing due to the following error:
❌ /Users/vagrant/Library/Developer/Xcode/DerivedData/Carbn-aytoffoummsttefoksamtqdxyipu/SourcePackages/checkouts/amplify-ios/AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthService.swift:10:8: no such module 'AWSCore'
I’m using AWS Amplify with Swift Package Manager as a dependency, and I haven’t changed anything about it since long before this was broken.
When I try to run my code and create archives on my local device, it works fine - I have not been able to recreate this error anywhere except on Bitrise.
I’m at a loss to how to proceed - any help will be hugely appreciated since the lack of CI is slowing down our dev/test/release cycles pretty badly!
I fixed the AWSCore problem - I both re-installed the SPM package and added
$(BUILD_PRODUCT_DIR) ------ recursive to my framework search paths.
I now have this error:
❌ /Users/vagrant/git/App/Carbn/Application/App Coordinator/Flows/AppCoordinator+HomeFlow.swift:19:8: no such module 'Challenges'
Challenges is a feature module in my project. I recently renamed it, but made sure there is no trace of the previous name anywhere in the project. I got 20 of the above error (I think everywhere that imports it) and the following other warning:
⚠️ /Users/vagrant/Library/Developer/Xcode/DerivedData/Carbn-aytoffoummsttefoksamtqdxyipu/Build/Intermediates.noindex/ArchiveIntermediates/Carbn-Test/IntermediateBuildFilesPath/Carbn.build/Testing-iphoneos/Carbn.build/Objects-normal/arm64/AppCoordinator+FlowDelegate.dia:1:1: Could not read serialized diagnostics file: error("Invalid diagnostics signature") (in target 'Carbn' from project 'Carbn')
Command CompileSwift failed with a nonzero exit code
I solved this now - I’ll keep it here for posterity.
I hadn’t renamed the FOLDER (separate from the Xcode project) to the new module name. Changing this solved everything.
Update here - I keep intermittently getting this issue.
I think the true cause was the Cache Pull build step - it seemed to be getting some old version of the cache which was incompatible with the existing build.
Every time I remove the Cache Pull step, the build works, but is a lot slower (and prone to timeout on release builds). When I put it back, the build fails due to the AWSCore import error.
Is there a way to erase/reset the cache? Completing a build does not seem to do the trick.
Thanks for sharing your findings so others can benefit from your experience!
You can delete your accumulated cache in your App’s Settings tab, if you scroll down to Manage Build Caches (BETA).
Hope this helps!
Hey @Roland-Bak, thanks for the help with the cache. I’ve done this now and replaced my cache step in the build.
I’m bumping this topic because it’s still a problem - I’m still getting "No such module ‘AWSCore’ " despite repeating the steps above multiple times. It’s preventing me from making any develop or release builds remotely.
The only thing that tends to help, is, when I remove the aws amplify Swift Package and re-install it. This usually makes the develop build work once, but then it fails again.
I managed to fix the issue by switching from SPM to Cocoapods for just the AWS dependency, but at the cost of my soul.
Should I take this up with the AWS SDK guys?
I’ll also remote SSH into the build and do a screenshare to run Xcode build from there and see if I can see anything I didn’t from just the logs. I’ll post results soon.
We’re experiencing the same exact issue on our side exclusively with AWSAppSync when running on Bitrise servers. This is non-existent or reproducible locally.
Hi @Jacob_Bartlett, did AWS get back to you about this issue? I’m seeing the exact same thing, although we’re running on Azure DevOps instead of bytewise.
I’m wondering if there’s a way to solve this without having to ditch SPM and use Cocoapods? I’d like to keep my soul, I’ve become rather attached to it over the years.
PS: Not seen you since
That Day in Hullavington a couple of years ago Hope you’re well!
Check the order of processing. There were changes with the Dependency Order setting with Xcode 13 that seems to have cause some problem with the order and dependencies not being processed before they were needed to fulfill an import statement.
@cathy.harmon Thanks for the tip! Setting the Build Order to “manual” in “Edit Scheme” > “Build” solved it for me!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.