Skip to content

[v0.75.2] macOS (Catalyst) builds fail with hermes.framework: bundle format is ambiguous (could be app or framework) #46213

Description

@birdofpreyru

Description

Migrating my libraries / app from RN@0.74 to the latest RN@0.75.2. When building for macOS (Catalyst) target my build fails with that error hermes.framework: bundle format is ambiguous (could be app or framework). I first posted the issue to the Hermes repo (facebook/hermes#1492), but I was told there, it must be an issue on RN side, how it packages stuff.

Steps to reproduce

N/A

React Native Version

0.75.2

Affected Platforms

Build - MacOS

Output of npx react-native info

N/A

Stacktrace or Logs

N/A

Reproducer

N/A

Screenshots and Videos

No response

Activity

  1. react-native-bot commented on Aug 26, 2024

    @react-native-bot
    Collaborator
    ⚠️ Missing Reproducible Example
    ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
    • If your bug is UI related: a Snack
    • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
  2. react-native-bot commented on Aug 26, 2024

    @react-native-bot
    Collaborator
    ⚠️ Missing Reproducible Example
    ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  3. birdofpreyru commented on Aug 26, 2024

    @birdofpreyru
    ContributorAuthor

    @sunshinezxq that looks likes an attempt to trick users into downloading a malware, I got it reported to GitHub :)

  4. cipolleschi commented on Aug 28, 2024

    @cipolleschi
    Contributor

    Thanks for reporting the user.

    QQ: How do I repro it?
    I create a new app and try to archive for macCatalyst?

  5. birdofpreyru commented on Aug 28, 2024

    @birdofpreyru
    ContributorAuthor

    QQ: How do I repro it?
    I create a new app and try to archive for macCatalyst?

    Yes, I just verified, a clean app created with @react-native-community/cli, macCatalyst build fails exactly this same way for me.

  6. zahidhussain998 commented on Aug 28, 2024

    @zahidhussain998

    Yeah same thing is happening here

  7. cipolleschi commented on Aug 29, 2024

    @cipolleschi
    Contributor

    I just created a new app with 0.75.2 and I can't reproduce the issue for catalyst (See the screenshot).

    We had a similar report back then, but I couldn't repro either.

    Can you try run pod deintegrate and try again. I'm afraid that cocoapods cached a wrong version of hermes in your system and tries to use that one to run macCatalyst for some reason.

    Screenshot 2024-08-29 at 11 26 25
  8. 28 remaining items

  9. cipolleschi commented on Sep 9, 2024

    @cipolleschi
    Contributor

    Sorry, my bad. This is the right link

    Screenshot 2024-09-09 at 11 24 27
  10. gabrieldonadel commented on Sep 9, 2024

    @gabrieldonadel
    Collaborator

    Sorry, my bad. This is the right link

    Even when using this new link I still get ReactCommon/hermes/inspector-modern/chrome/Registration.h:15:10: 'hermes/hermes.h' file not found

    image
  11. hsjoberg commented on Sep 9, 2024

    @hsjoberg
    Contributor

    @cipolleschi I'm not sure exactly what I should make of this, but it appears to almost work for react-native-macos.
    I'm getting some undefined symbols, but perhaps react-native(-macos) 0.76 would be needed for it to work?
    image


    @gabrieldonadel did you unzip the zip-file first in order to get the tarball? Looks like it's failing pretty early.

  12. cipolleschi commented on Sep 10, 2024

    @cipolleschi
    Contributor

    Can you guys try with a nightly? I already applied the same changes to main, so yesterday nightly contains all the proper fixes. If you can safely build catalyst or MacOS using the Nightly, we should be good to go.

    @hsjoberg yes, MacOS might have to catch up on the changes my colleagues made for the Debugger. The inspector_modern symbol you see there is the inspector for the new Debugger in the React Native Dev Tools

  13. hsjoberg commented on Sep 10, 2024

    @hsjoberg
    Contributor

    @hsjoberg yes, MacOS might have to catch up on the changes my colleagues made for the Debugger. The inspector_modern symbol you see there is the inspector for the new Debugger in the React Native Dev Tools

    @cipolleschi Gotcha, yes that makes sense.
    I think react-native-macos usually pulls in commits after there's a new release line for react-native core.

    Pinging @Saadnajmi so that you're aware of this issue.

  14. Saadnajmi commented on Sep 10, 2024

    @Saadnajmi
    Contributor

    I don't expect React Native macOS to hit the same issue, since it's technically a different platform. But yes, working on merging up to 0.76 right now..

  15. hsjoberg commented on Sep 10, 2024

    @hsjoberg
    Contributor

    Well, I'm currently seeing the same symptoms as OP on react-native-macos 0.75.

    From what I can tell react-native-macos pulls in iOS Hermes, so I thought this was related to OPs issue:
    https://github.com/microsoft/react-native-macos/blob/042cd6c36b23c21d20de628bc9756793e01ce282/packages/react-native/sdks/hermes-engine/hermes-utils.rb#L237-L257

  16. removed
    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.
    Needs: AttentionIssues where the author has responded to feedback.
    on Sep 11, 2024
  17. gabemeola commented on Nov 29, 2025

    @gabemeola

    In my case I had to disable the prebuilts to get it working on Mac Catalyst.

    ENV['RCT_USE_RN_DEP'] = '0'
    ENV['RCT_USE_PREBUILT_RNCORE'] = '0'
  18. robertying commented on Jan 18, 2026

    @robertying
    Contributor

    This issue seems to have come back when I upgraded to 0.83.1

    I had to redo the same steps I previously commented to fix the framework for it to build for Mac Catalyst

    cd ios/Pods/hermes-engine/destroot/Library/Frameworks/universal/hermesvm.xcframework/ios-arm64_x86_64-maccatalyst/hermesvm.framework
    rm -r hermesvm Resources
    ln -s Versions/Current/Resources Resources
    ln -s Versions/Current/hermesvm hermesvm
    cd Versions && rm -r Current && ln -s 0 Current # this is important
    
  19. birdofpreyru commented on Jan 18, 2026

    @birdofpreyru
    ContributorAuthor

    +1. For me macOS builds broke again after the upgrade from RN@0.82.1 to RN@0.83.0, and neither work with RN@0.83.1, but I had no capacity to report or investigate; thus thanks @robertying for your message 👏

  20. robertying commented on Jan 19, 2026

    @robertying
    Contributor

    The release build for Mac Catalyst (building x86_64 target on an ARM Mac) seems to be broken on 0.83.1 with Hermes 0.14 as well...

    ld: warning: ignoring file '/Users/rying/Library/Developer/Xcode/DerivedData/learnX-bqofrgctsoxzlefwjjfqtyqdttvd/Build/Intermediates.noindex/ArchiveIntermediates/learnX/BuildProductsPath/Release-maccatalyst/XCFrameworkIntermediates/hermes-engine/Pre-built/hermesvm.framework/hermesvm': found architecture 'arm64', required architecture 'x86_64'

    Turns out the bundled hermesvm file doesn't contain x86_64 binary so it was built wrong in the first place:

    Non-fat file: ~/Downloads/hermes-ios-0.14.0-debug/destroot/Library/Frameworks/universal/hermesvm.xcframework/ios-arm64_x86_64-maccatalyst/hermesvm.framework/hermesvm is architecture: arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions