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

App crash after Archive IOS in XCode v15.4 15f31d for apps/tester-app on repack v4.3.3 #764

Open
doiya46 opened this issue Oct 7, 2024 · 3 comments
Assignees
Labels
status:waiting-for-response Waiting for a response or clarification from the issue creator type:bug A bug report.

Comments

@doiya46
Copy link

doiya46 commented Oct 7, 2024

Describe the bug

I have to update my project from react-native: 0.71.19 to 0.74.5. I used template super-app-showcase https://github.com/callstack/super-app-showcase . Because the Android Play Store requires the app to be built with at least API 34, I need support to archive iOS for apps/tester-app so I can updated my project and release my app on the Apple Store

I updated repack to v4.3.3 and react-native to 0.74.5. I released Android App Bundles, everything work well with android (I release Android in my Ubuntu PC). With iOS, I run debug and release (the command like: pnpm ios and pnpm ios:release), it also work well.

But when I run Archive in XCode v15.4 15f31d, app release crash immediately after start.

To reproduce: I use Repack tag v4.3.3. Application after Archive in xCode crash with real device and simulator.

I also tested using React Native CLI to initialize an app with React Native 0.74.5 without Re.pack to verify whether my archive steps work, and after archiving, it worked well on both a real device and the simulator.

System Info

System:
  OS: macOS 14.6.1
  CPU: (8) arm64 Apple M1
  Memory: 732.69 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.17.0
    path: ~/.nvm/versions/node/v18.17.0/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v18.17.0/bin/yarn
  npm:
    version: 9.6.7
    path: ~/.nvm/versions/node/v18.17.0/bin/npm
  Watchman:
    version: 2024.09.23.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    API Levels:
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12169540
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Re.Pack Version

4.3.3

Reproduction

https://github.com/callstack/repack/releases/tag/%40callstack%2Frepack-init%404.3.3

Steps to reproduce

Install

git clone https://github.com/callstack/repack.git
cd repack
# Checkout tag `v4.3.3`
git checkout 039acb7
export REPACK_ROOT=$(pwd)
# My pnpm is same version with package.json["packageManager": "[email protected]"] (npm i -g [email protected] && pnpm -v = 9.5.0)
pnpm install
cd $REPACK_ROOT/apps/tester-app && pnpm bundle:ios
cd $REPACK_ROOT/apps/tester-app/ios && bundle install && bundle exec pod install
open $REPACK_ROOT/apps/tester-app/ios/TesterApp.xcworkspace

Archive In XCode

1. Check `Supported Destination` to iPhone in General tab
2. Then change `Bundle identifier` to my bundle and import my `Provisioning profile` in Signing & Capabilities tab

Case simulator:
3. Run Product -> Archive (Any iOS Simulator Device (arm64, x86_64))
3.1. Open app by (Show package content -> Products -> Applications -> ReactTestApp.app) and drag drop to stated simulator
3.2 Start app in simulator and App crash after start

Case real device:
4. Run Product -> Archive (Any iOS Device (arm64))
4.1. Open app by (Show package content -> Products -> Applications -> ReactTestApp.app) to My iPhone by select menu Window -> Devices and Simulators then drag drop to my iPhone in Devices tab.
4.2 Start app in my iPhone and App crash after start

Note: I run debug by command pnpm ios and pnpm ios:release in apps/tester-app, all of them work well on the simulator.

cd repack
export REPACK_ROOT=$(pwd)
# Start host in other terminal: cd $REPACK_ROOT/apps/tester-app && pnpm start
cd $REPACK_ROOT/apps/tester-app && pnpm ios
# or
cd $REPACK_ROOT/apps/tester-app && pnpm ios:release 
@doiya46 doiya46 added status:new New issue, not reviewed by the team yet. type:bug A bug report. labels Oct 7, 2024
@doiya46 doiya46 changed the title App crash after Archive IOS in XCode for apps/tester-app on repack v4.3.3 App crash after Archive IOS in XCode v15.4 15f31d for apps/tester-app on repack v4.3.3 Oct 7, 2024
@Duyanh92798
Copy link

I'm also having this error
Has anyone fixed it yet?

@jbroma jbroma self-assigned this Oct 8, 2024
@jbroma jbroma added status:waiting-for-response Waiting for a response or clarification from the issue creator and removed status:new New issue, not reviewed by the team yet. labels Oct 8, 2024
@jbroma
Copy link
Member

jbroma commented Oct 8, 2024

@doiya46 tried reproducing on a new app created through @callstack/repack-init but everything is working as expected - please provide a minimal reproduction repository that showcases that there is a problem with the Re.Pack itself and not just the configuration of your project, thanks!

@doiya46
Copy link
Author

doiya46 commented Oct 8, 2024

@doiya46 tried reproducing on a new app created through @callstack/repack-init but everything is working as expected - please provide a minimal reproduction repository that showcases that there is a problem with the Re.Pack itself and not just the configuration of your project, thanks!

Thanks @jbroma, It worked with npx react-native@latest init TestApp --skip-install --version 0.74.5 and npx @callstack/repack-init.

I think it's because I based it on super-app-showcase/tree/repack-v4, so when updating the package, the configuration might have changed and different with @callstack/repack-init. I will try reinitializing the host and config with npx @callstack/repack-init. I’ll also recheck the repack-v4 branch in super-app-showcase to create a minimal reproduction repository, but it may take more time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-response Waiting for a response or clarification from the issue creator type:bug A bug report.
Projects
None yet
Development

No branches or pull requests

3 participants