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

[iOS] - App freezing on launch #7782

Open
1 task done
ValentinOUI opened this issue Sep 7, 2023 · 0 comments
Open
1 task done

[iOS] - App freezing on launch #7782

ValentinOUI opened this issue Sep 7, 2023 · 0 comments

Comments

@ValentinOUI
Copy link

What happened?

Hello,

Since I upgraded react-native and react-native-navigation to their latest version, my application is freezing on the login screen.
More specifically, I get the following error :

*** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: TypeError: Cannot read property 'startLoadWithResult' of null, js engine: hermes, reason 'Unhandled JS Exception: TypeError: Cannot read property 'startLoadWithResult' of null, js engine: hermes, stack

I already tried to remove/deintegrate pods and to reinstall them but the issue remains. I followed the migration guide and also tried different things (few differences between the migration guide and the playground)
My AppDelegate.h looks like this

#import "RNNAppDelegate.h"

#import <UIKit/UIKit.h>
#import <UserNotifications/UserNotifications.h>
#import <MarketingCloudSDK/MarketingCloudSDK.h>
#import <SFMCSDK/SFMCSDK.h>

@interface AppDelegate : RNNAppDelegate <UNUserNotificationCenterDelegate, SFMCSdkURLHandlingDelegate>

@end

and here is my AppDelegate.mm :

#import "Firebase.h"
#import "AppDelegate.h"
#import "RCTLinkingManager.h"
#import "ReactNativeConfig.h"

#import <React/RCTBundleURLProvider.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [FIRApp configure];

  //SFMCSDK setup...

  //RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  //[ReactNativeNavigation bootstrapWithBridge:bridge];

  [ReactNativeNavigation bootstrapWithDelegate:self launchOptions:launchOptions];
  return YES;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
  return [ReactNativeNavigation extraModulesForBridge:bridge];
}

- (BOOL)concurrentROotEnabled
{
  return true;
}

// other methods for notifications handling

@end

Thank you for your help!

What was the expected behaviour?

No response

Was it tested on latest react-native-navigation?

  • I have tested this issue on the latest react-native-navigation release and it still reproduces.

Help us reproduce this issue!

No response

In what environment did this happen?

React Native Navigation version: 7.37.0
React Native version: 0.72.4
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: 16.4.2
Device model: iPhone 13 (Simulator)
iOS version: iOS 15.0

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

No branches or pull requests

1 participant