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

Hermes 0.10 has invalid Bitcode #649

Closed
mrousavy opened this issue Dec 2, 2021 · 18 comments
Closed

Hermes 0.10 has invalid Bitcode #649

mrousavy opened this issue Dec 2, 2021 · 18 comments
Labels
bug Something isn't working

Comments

@mrousavy
Copy link
Contributor

mrousavy commented Dec 2, 2021

Bug Description

I've tried to upgrade to React Native 0.67-4 (which uses Hermes 0.10) and published a version to TestFlight.
While the build & publish succeeded, I got the following response from apple:


Dear Developer,

We identified one or more issues with a recent delivery for your app, "XXXXXXXXX" 1.0 (9). Please correct the following issues, then upload again.

ITMS-90562: Invalid Bundle - The app cannot be processed because options not allowed to be embedded in bitcode are detected in the submission. It is likely that you are not building the app with the toolchain provided in Xcode. Rebuild your entire app with the latest GM Xcode and submit the app again.

Best regards,

The App Store Team


Note that the app builds and runs fine (in debug at least), it's just that AppStore Connect rejects the app.

Hermes version: 0.10.
React Native version (if any): 0.67-4
OS version (if any): iOS 15
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): All / Bitcode ipa

Steps To Reproduce

  1. Install React Native 0.67 (with Hermes)
  2. Build and publish app to TestFlight/AppStore

Related

Maybe these two commits are somewhat related?

  1. af68186
  2. fc8e622

Also, maybe this guide can help: Resolving “ITMS-90562: Invalid Bundle” email from App Store - I'd guess that there is some Framework not correctly listed for Hermes?

@mrousavy mrousavy added the bug Something isn't working label Dec 2, 2021
@kelset
Copy link

kelset commented Dec 2, 2021

cc @neildhar @tmikov (who worked on those commits)

@mrousavy
Copy link
Contributor Author

mrousavy commented Dec 2, 2021

@neildhar @tmikov DM me on discord if you want to see the .xcarchive. Uploaded both the working one (RN 0.66) and the one that got rejected (RN 0.67) to Google Drive.

@mikehardy
Copy link

I cross-linked this to the 0.67 release post, someone else stubbed their toe on it unaware it was a known issue. Just trying to save folks time before they try it reactwg/react-native-releases#1 (comment)

@grabbou
Copy link
Contributor

grabbou commented Dec 6, 2021

Interestingly, you can rebuild from Bitcode locally to try to get a better error description: googlesamples/mlkit#347 (comment).

Dropping as a reference in case someone wants to give it a go.

@mrousavy
Copy link
Contributor Author

mrousavy commented Dec 6, 2021

@grabbou oh yeah, I already tried that twice and Xcode/Organizer kept crashing 😄

@grabbou
Copy link
Contributor

grabbou commented Dec 8, 2021

Maybe these two commits are somewhat related?

Not sure about that one, but I might be of course wrong. In my opinion these commits are not the ones that are breaking 0.10 release.

The commits that you have referred are about unlinking CoreFoundation in the targets where it is not used.

Assuming that the error is because some frameworks are missing (which is what the guide you've linked suggests as as solution for this error message), this can't be true for CoreFoundation which is always present on a device.

If you look at the output from otool:

/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 1854.0.0)
@rpath/libswiftDispatch.dylib (compatibility version 1.0.0, current version 9.0.0, weak)

CoreFoundation is referred from System, whereas other frameworks are referred from @rpath, which is a Frameworks directory.

That said, we have about 653 files changed between 0.9 and 0.10 to inspect -> v0.9.0...v0.10.0

leotm added a commit to leotm/react-native-template-new-architecture that referenced this issue Dec 21, 2021
@billnbell
Copy link

what is the status of 0.10 ?

@cristianoccazinsp
Copy link

Is this fixed with 0.11 ? Looking forward to upgrade from 0.9, but curious about this.

@neildhar
Copy link
Contributor

@cristianoccazinsp Yes, this is fixed in 0.11

@johnf
Copy link

johnf commented Mar 16, 2022

I'm seeing the same app store issue with hermes on 0.68-rc.2, which has 0.11. Let me know if I can help debug in some way

@kelset
Copy link

kelset commented Mar 16, 2022

@johnf could you expand a bit on what you are experiencing? Are you getting the same rejection? Is your setup custom in some way (RN can be used in a lot of different ways so the more info you can share, the better)?

@johnf
Copy link

johnf commented Mar 16, 2022

I'm seeing the same ITSM-90562 error.

I'll revert tomorrow, I need to confirm 100% that this is the reason why. I've made a number of major changes since I last pushed to the store including

  • Updating to 0.68-rc.2
  • Adding react-native-renamiated2 so I can use draw navigation in react-navigation
  • Which meant I needed to enable hermes
    I'll try and do some git bisecting tomorrow to workout where it broke

@kelset
Copy link

kelset commented Mar 16, 2022

cool - keep us posted 🙏

@mrousavy could you double-check if with your app things go smoothly with RC2+Hermes?

@mrousavy
Copy link
Contributor Author

Yep, works for me. @johnf it's probably your cache.

@johnf
Copy link

johnf commented Mar 16, 2022

So I made sure my GitHub runner had no pod cache or compile cache and performed a brand new build and am seeing the same issue.

I get two errors from apple

ITMS-90562: Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.
ITMS-90562: Invalid Bundle - There's an issue with the app's bitcode compilation. Rebuild the app using the current public (GM) version of Xcode and upload it again.

I'll try some bisecting to make sure it isn't something else I've done.

@johnf
Copy link

johnf commented Mar 17, 2022

This ended up being my fault. I was missing a setup in my Podfile for react-native mapbox

@manosKas
Copy link

so im on rn 0.67.3 and hermes-engine 0.9.0 and i want to update hermes
should i just update rn to 0.68 ?

@kelset
Copy link

kelset commented Mar 21, 2022

@manosKas unless you have some very important and urgent reason to update your Hermes engine, I would suggest waiting for 0.68.0 to be out and upgrade RN & Hermes together so that they are aligned. If not you could use something like a yarn resolution to force hermes 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants