`No such module 'CrashReporter'` error when trying to run in Simulator
momrak opened this issue · 12 comments
Describe the issue
I am trying to set up this on a Flutter app but when I try and run it on the ios simulator it fails with the following
Xcode build done. 7.7s
Failed to build iOS app
Swift Compiler Error (Xcode): No such module 'CrashReporter'
/Users/tmp/add-DD-rum/ios/Pods/DatadogCrashReporting/DatadogCrashReporting/Sources/PLCrashReporterIntegration/CrashReport.swift:7:7
Reproduction steps
Installing datadog_flutter_plugin: ^2.3.0
and try to run in in Simulator ios 17.2
Device Information
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.1, on macOS 14.2.1 23C71 darwin-arm64, locale en-NO)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[!] Android Studio (version unknown)
✗ Unable to determine Android Studio version.
[✓] VS Code (version 1.86.2)
[✓] Connected device (3 available)
[✓] Network resources
SDK version
2.3.0
Flutter Version
3.19.1
Setup Type
Flutter Application
Other relevant information
No response
I have tried doing flutter clean
deleted Podfile.lock
and then running
flutter pub get
cd ios && pod install
without any luck
Hi @momrak ,
I can't reproduce this even on a fresh application.
Is there anything else strange about your setup?
There are a few things we can possibly check. Can you check that the following is in your Podfile.lock
:
- DatadogCrashReporting (2.7.1):
- DatadogInternal (= 2.7.1)
- PLCrashReporter (~> 1.11.1)
You could also try to delete your ios/Pods
directory entirely and rerun flutter pub get
and pod install --repo-update
and see if that helps.
@fuzzybinary thanks for the reply
Hmm, that is strange. I tried the suggestions above, but get the same result.
Both the lines you posted are in the lockfile
I am using cocoapods version 1.15.1 , could that have an impact? Any other suggestions on what could be strange in our setup?
I just upgraded to cocoapods 1.15.2 so I don't think that's the issue.
Can you try deleting your Xcode DerivedData
folder?
Tried the following now
rm -rf ~/Library/Developer/Xcode/DerivedData/*
flutter clean
rm -rf ios/Pods
rm ios/Podfile.lock
flutter pub get
cd ios && pod install --repo-update
flutter run -d ios
But the result is the same.. Very strange
@fuzzybinary just to check I tried creating a new project with flutter create <proj-name>
and added the DD dep. After adding the configuration I still get the same in this project as well..
Then it does not seem project specific at least. Not sure what else to try though.
Yeah, this is very weird. I've created several blank projects and even downgraded Flutter to 3.19.1 and it's worked fine for me every time.
Last possible way to check would be to try opening ios/Runner.xcworkspace
in XCode and see if builds from there, though I can't imagine why it would. While there, you should be able to expand the Pods project and go to Pods -> PLCrashReporter
and see the following:
If not, I'm wondering if there's something blocking downloading the framework? Or possibly something configured weirdly in XCode globally?
Can you see what's in the ios/Pods/PLCrashReporter
and ios/Pods/PLCrashReporter/CrashReporter.xcframework
directories?
Got it running now after the downgrade, so will close this issue.
Thank you for your help and patience 🙌