Skip to content

[πŸ›] Thread 1: EXC_BAD_ACCESS (code=1, address=0x20019008070c10)Β #8707

@maksymhcode-care

Description

@maksymhcode-care

Issue

I have updated my react native project from 0.77 and expo 52 to 0.79 and expo 53. The build process went fine, but when the app opens up i get Thread 1: EXC_BAD_ACCESS (code=1, address=0x20019008070c10) error. I only have issues after migration on iOS

Image

My Podfile

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip
#min_ios_version_supported
platform :ios, '15.1'
prepare_react_native_project!

use_frameworks! use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true

target 'projectName' do
  use_expo_modules!
  post_integrate do |installer|
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
  end
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )


  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false,
      # :ccache_enabled => true
    )
  end
end

package.json:

"dependencies": {
    "@gorhom/bottom-sheet": "4.6.4",
    "@invertase/react-native-apple-authentication": "^2.2.2",
    "@notifee/react-native": "^7.8.0",
    "@react-native-async-storage/async-storage": "2.2.0",
    "@react-native-clipboard/clipboard": "^1.11.2",
    "@react-native-community/blur": "^4.3.2",
    "@react-native-community/netinfo": "11.4.1",
    "@react-native-firebase/analytics": "22.1.0",
    "@react-native-firebase/app": "22.1.0",
    "@react-native-firebase/messaging": "22.1.0",
    "@react-native-google-signin/google-signin": "^10.0.1",
    "@react-navigation/bottom-tabs": "6.6.1",
    "@react-navigation/native": "6.1.18",
    "@react-navigation/stack": "6.4.1",
    "@reduxjs/toolkit": "^1.9.5",
    "@types/react-native-video": "^5.0.17",
    "axios": "0.21.1",
    "deprecated-react-native-prop-types": "^5.0.0",
    "expo": "~53.0.20",
    "expo-constants": "^17.0.8",
    "expo-local-authentication": "^15.0.2",
    "lottie-react-native": "7.3.4",
    "moment": "^2.29.4",
    "patch-package": "^8.0.0",
    "postinstall-postinstall": "^2.1.0",
    "react": "19.0.0",
    "react-native": "0.79.6",
    "react-native-actionsheet": "^2.4.2",
    "react-native-fast-image": "^8.6.3",
    "react-native-fbsdk-next": "13.4.1",
    "react-native-gesture-handler": "2.28.0",
    "react-native-image-picker": "^7.0.1",
    "react-native-modal": "^13.0.1",
    "react-native-pager-view": "6.9.1",
    "react-native-paper": "5.14.5",
    "react-native-portalize": "^1.0.7",
    "react-native-reanimated": "3.17.5",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "5.6.1",
    "react-native-screens": "4.14.0",
    "react-native-smooth-pincode-input": "^1.0.9",
    "react-native-splash-screen": "^3.3.0",
    "react-native-svg": "15.13.0",
    "react-native-swipeable": "^0.6.0",
    "react-native-video": "6.12.0",
    "react-native-vimeo-iframe": "^1.2.1",
    "react-native-webview": "13.14.0",
    "react-native-youtube-iframe": "^2.3.0",
    "react-redux": "^8.1.2",
    "redux": "^4.2.1"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@babel/plugin-transform-private-methods": "^7.25.9",
    "@babel/preset-env": "^7.25.3",
    "@babel/preset-react": "^7.24.1",
    "@babel/preset-typescript": "^7.24.1",
    "@babel/runtime": "^7.25.0",
    "@react-native-community/cli": "18.0.0",
    "@react-native-community/cli-platform-android": "18.0.0",
    "@react-native-community/cli-platform-ios": "18.0.0",
    "@react-native/babel-preset": "0.79.6",
    "@react-native/eslint-config": "0.79.6",
    "@react-native/metro-config": "0.79.6",
    "@react-native/typescript-config": "0.79.6",
    "@testing-library/react-native": "^12.4.4",
    "@tsconfig/react-native": "^3.0.0",
    "@types/jest": "^29.5.13",
    "@types/react": "^19.0.0",
    "@types/react-test-renderer": "^19.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "metro-react-native-babel-preset": "0.76.8",
    "prettier": "2.8.8",
    "react-test-renderer": "19.0.0",
    "ts-jest": "^29.1.2",
    "ts-node": "^10.9.2",
    "typescript": "~5.3.3"
  },
  "engines": {
    "node": ">=18"
  }

AppDelegate.mm:

#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import "RNSplashScreen.h"
#import <AuthenticationServices/AuthenticationServices.h>
#import <SafariServices/SafariServices.h>
#import <FBSDKCoreKit/FBSDKCoreKit-swift.h>
#import <RNGoogleSignin/RNGoogleSignin.h>
#import <Firebase.h>
#import <React/RCTLinkingManager.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  self.moduleName = @"projectName";
  self.initialProps = @{};arguments]];
  [FBSDKApplicationDelegate.sharedInstance initializeSDK];
  [FIRApp configure];
  [super application:application didFinishLaunchingWithOptions:launchOptions];
 
  return YES;
}

- (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) {
    return YES;
  }

  if ([RNGoogleSignin application:app openURL:url options:options]) {
    return YES;
  }

  if ([RCTLinkingManager application:app openURL:url options:options]) {
    return YES;
  }

  return NO;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
  return [self bundleURL];
}

- (NSURL *)bundleURL
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@".expo/.virtual-metro-entry"];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
 restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
 return [RCTLinkingManager application:application
                  continueUserActivity:userActivity
                    restorationHandler:restorationHandler];
}

@end

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