facebook / flipper

A desktop debugging platform for mobile developers.
https://fbflipper.com/
MIT License
13.35k stars 955 forks source link

Error at running app with Flipper: Flipper.sonar (13): EXC_BAD_ACCESS (code=1, address=0x9) #4150

Open malik-coachhub opened 2 years ago

malik-coachhub commented 2 years ago

🐛 Bug Report

-Can not run the app with Flipper. Always show me this error: Flipper.sonar (13): EXC_BAD_ACCESS (code=1, address=0x9)

Screenshot 2022-09-28 at 14 34 31

Code AppDelegate.mm:

`#import "AppDelegate.h"

import <React/RCTBridge.h>

import <React/RCTBundleURLProvider.h>

import <React/RCTRootView.h>

import "RNSplashScreen.h"

import <React/RCTI18nUtil.h>

import <React/RCTAppSetupUtils.h>

import <React/RCTLinkingManager.h>

import <UserNotifications/UserNotifications.h>

import

import <React/RCTAppSetupUtils.h>

if RCT_NEW_ARCH_ENABLED

import <React/CoreModulesPlugins.h>

import <React/RCTCxxBridgeDelegate.h>

import <React/RCTFabricSurfaceHostingProxyRootView.h>

import <React/RCTSurfacePresenter.h>

import <React/RCTSurfacePresenterBridgeAdapter.h>

import <ReactCommon/RCTTurboModuleManager.h>

import <react/config/ReactNativeConfig.h>

static NSString *const kRNConcurrentRoot = @"concurrentRoot";

@interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> { RCTTurboModuleManager _turboModuleManager; RCTSurfacePresenterBridgeAdapter _bridgeAdapter; std::shared_ptr _reactNativeConfig; facebook::react::ContextContainer::Shared _contextContainer; } @end

endif

@implementation AppDelegate

// Deep linking

// Deep Linking (universal links)

if RCT_NEW_ARCH_ENABLED

_contextContainer = std::make_shared(); _reactNativeConfig = std::make_shared(); _contextContainer->insert("ReactNativeConfig", _reactNativeConfig); _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer]; bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;

endif

NSDictionary initProps = [self prepareInitialProps]; UIView rootView = RCTAppSetupDefaultRootView(bridge, @"", nil);

if (@available(iOS 13.0, *)) { rootView.backgroundColor = [UIColor systemBackgroundColor]; } else { rootView.backgroundColor = [UIColor whiteColor]; }

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController; // Define UNUserNotificationCenter UNUserNotificationCenter center = [UNUserNotificationCenter currentNotificationCenter]; center.delegate = self;

[self.window makeKeyAndVisible];

//Splash Screen

[RNSplashScreen show]; // here

return YES; }

/// This method controls whether the concurrentRootfeature of React18 is turned on or off. /// /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). /// @return: true if the concurrentRoot feture is enabled. Otherwise, it returns false.

ifdef RCT_NEW_ARCH_ENABLED

initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);

endif

return initProps; }

if RCT_NEW_ARCH_ENABLED

pragma mark - RCTCxxBridgeDelegate

pragma mark RCTTurboModuleManagerDelegate

endif

@end `

To Reproduce

I have this line in my PodFile: :flipper_configuration => FlipperConfiguration.enabled(["Debug"], { 'Flipper' => '0.166.0' }),

Environment

image
Priyanto16 commented 1 year ago

same here

mateuschaves commented 11 months ago

same here

speam commented 4 months ago

It's been 2 years, what happened to flipper team???