WorryFree Computers   »   [go: up one dir, main page]

Skip to content
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

Updating to 10.23.0 results in 'FirebaseCrashlytics/FirebaseCrashlytics-Swift.h' file not found #12611

Closed
OscarFyl opened this issue Mar 22, 2024 · 20 comments · Fixed by #12659
Closed
Assignees

Comments

@OscarFyl
Copy link

Description

image

API Proposal

No response

Firebase Product(s)

Crashlytics

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@rizafran
Copy link
Contributor

Hi @OscarFyl, I tried to reproduce the issue, but I'm able to successfully run the app. Could you provide your Podfile and Podfile.lock file?

@macdrevx
Copy link

Same error as in #12605. Need more details to know if it's the same root cause.

@morganchen12 morganchen12 changed the title XCode 升级到10.23.0版本 会在报错FirebaseCrashlytics/FirebaseCrashlytics-Swift.h' file not found Updating to 10.23.0 results in 'FirebaseCrashlytics/FirebaseCrashlytics-Swift.h' file not found Mar 22, 2024
@OscarFyl
Copy link
Author

Podfile.txt
Podfile.lock.txt
image
image
image
image
Hello
The file contains my podflile file and podflile.lock file, as well as screenshots of my project error reports. I was using version 10.20.0 before. When I upgraded to version 10.23.0, I would get the error 'FirebaseCrashlytics/FirebaseCrashlytics-Swift.h' file not found'. I tried the following:
1.clean project
2. Re-execute pod install and pod update
3. Cleaned up the DerivedData directory of xcode,
4. Exit Xcode and restart
None of the above four methods will work.
I can't find this file when I search for FirebaseCrashlytics-Swift in my project. I can't find it in the folder through show in finder. Where does this file exist?
My computer system is: Sonoma 14.4
Xcode version is: 15.3

@themiswang
Copy link
Contributor

Hey @OscarFyl
This is the same error as #12605 mentioned, you need to uncomment use_frameworks! line. As @paulb777 mentioned in that issue use_frameworks! is required since Firebase 9.0. More details in the release notes - https://firebase.google.com/support/release-notes/ios.

@paul-lavoine
Copy link

Hello, I have the same problem.

But since the version 10.22.1 everything worked well.
I've never included use_frameworks! but I included use_modular_headers! instead and until the version 10.22.1 it was working,

Did something change ?

@viktorzad
Copy link

I experienced similar building errors after updating Firebase SDK in the past with static linking, as others recommends you have to switch to use_frameworks!, which means Firebase will be linked dynamically. However it can lead to duplicated symbols. Moreover the mix of static and dynamic linking could cause transitive dependencies as well.

The following solution is working for me well, with keeping all my other dependencies as static libraries (starting the podfile specification still with use_modular_headers!).

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name.start_with?("Firebase")
      def pod.build_type;
        Pod::BuildType.dynamic_framework
      end

      pod.recursive_dependent_targets.each do |dep_pod|
        def dep_pod.build_type;
          Pod::BuildType.dynamic_framework
        end
      end
    end
  end
end

@themiswang
Copy link
Contributor

Hey @paul-lavoine

We added a swift module in Crashlytics for 10.23.0 #12410. This is related to change in release note for 10.23.0 https://firebase.google.com/support/release-notes/ios#crashlytics

@dklt
Copy link
dklt commented Mar 26, 2024

My project also got hit with this issue. 30+ external libraries, 10+ spm packages, mix of ObjectiveC + Swift codebase.

After applying the suggested fixes above, Xcode choke on more errors... 🤮

reverting back to 10.22.0 until a stable build-compatible release.

@VisionColion
Copy link

My project also encountered this problem. I saw that this has been closed, but how to solve it?

@paulb777
Copy link
Member

Podfiles should include either use_frameworks! or use_frameworks! :linkage => :static

@haozhutw
Copy link
haozhutw commented Mar 27, 2024

Podfiles should include either use_frameworks! or use_frameworks! :linkage => :static

Hi @paulb777, use_frameworks! doesn't work for my project as there are a lot of old dependencies, the project contains OC and swift modules, I tried use_frameworks! :linkage => :static, but encounter this error after pod install. I checked the SWIFT_VERSION config, all swift modules set it to 5.0. I searched and tried different solutions but still failed. Can you give me some advices? Thanks.

image

@ncooke3
Copy link
Member
ncooke3 commented Mar 27, 2024

Hi @haozhutw, checkout these suggestions (option 1, option 2). They may help address the errors you've shared.

@gcuenca-nerdy
Copy link

Podfiles should include either use_frameworks! or use_frameworks! :linkage => :static

Hey @paulb777 , after adding use_frameworks! in the Podfile caused many errors related to "Module map 'xxxx' not found" when building the unit tests. What can be the workaround here? Thks!

@haozhutw
Copy link

Hi @haozhutw, checkout these suggestions (option 1, option 2). They may help address the errors you've shared.

Thanks, option 1 doesn't work, with option 2 I can pod install successfully, but other errors occurred when I build the project. I have to revert the update, Firebase 10.23 totally breaks my project, 10.21 and below works well.

@paulb777
Copy link
Member

Reopening to investigate making a less-disruptive migration to the Swift-implementations.

@ncooke3 ncooke3 linked a pull request Mar 28, 2024 that will close this issue
@tomerh2001
Copy link

What version has this fix?

@ncooke3
Copy link
Member
ncooke3 commented Mar 31, 2024

@tomerh2001, this fix has been checked in and will be released in Firebase 10.24 (due out week of April 9).

@tomerh2001
Copy link

@tomerh2001, this fix has been checked in and will be released in Firebase 10.24 (due out week of April 9).

Oh I see. This bug is currently preventing us from compiling our app, any temp workarounds for now? We're using:

    "@react-native-firebase/analytics": "^19.1.1",
    "@react-native-firebase/app": "^19.1.1",
    "@react-native-firebase/app-distribution": "^19.1.1",
    "@react-native-firebase/crashlytics": "^19.1.1",
    "@react-native-firebase/perf": "^19.1.1",

If I understand correctly you are the not the maintainers of these, but they do use this package under the hood - so maybe a version that previously worked (and I'll find the matching react-native-firebase/crashlytics version)

@EzeRangel
Copy link

@tomerh2001

Downgrading @react-native-firebase to ^18.3.0 fixed for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.