flipper icon indicating copy to clipboard operation
flipper copied to clipboard

Latest Flipper 0.166 with a freshly setup RN project not working

Open czaku opened this issue 3 years ago • 4 comments

🐛 Bug Report

I cannot properly debug my app using Network and other built-in plugins

I have just set up a fresh RN project (0.70) with latest flipper 0.166. I am getting some issues, no app is selected and some warnings in Flipper logs. Most of built in plugins are deactivated (like Network) and there is a warning "Loading plugins from Plugin Marketplace disabled by GK or env var". There is few other warnings too. All on screenshots attached. For now attempting debugging RN App installed on iOS Simulator.

To Reproduce

Fresh RN project (0.70) with latest flipper 0.166 MacBook Pro (14-inch, 2021), Apple M1 Max, 32GB RAM, macOS Monterey 12.6

flipper1 flipper2 flipper3

czaku avatar Sep 22 '22 13:09 czaku

@czaku could you attach Flipper logs? image

fxlrnrpt avatar Sep 22 '22 19:09 fxlrnrpt

Thanks so much, logs attached: flipper_logs.txt

czaku avatar Sep 22 '22 20:09 czaku

Is there any update on this? I am still blocked with debugging...

czaku avatar Sep 26 '22 19:09 czaku

Same laptop, same settings, and same error on my side as well... can anyone please take a look on this issue? I am having the same error telling NO APPLICATION SELECTED, I tried everything possible and the error is still persisting...

MensurRasic avatar Jan 10 '23 14:01 MensurRasic

any update on this guys?

senghuot-lay avatar Apr 03 '23 06:04 senghuot-lay

@czaku are u running your app through rosetta?

senghuot-lay avatar Apr 03 '23 06:04 senghuot-lay

For anyone that's having the issue when upgrading to react native 0.70+, and unable to got NO APPLICATION SELECTED you should add this in your code base. I believe that when we're manually updating for a pretty old version RN 0.66ish, all necessary flipper's file isn't included. Therefore, you would be required to actually add it manually. And could also be because our project is running through rosetta as well for our iOS which is x86 simulator.

#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>

static void InitializeFlipper(UIApplication* application) {
  FlipperClient* client = [FlipperClient sharedClient];
  SKDescriptorMapper* layoutDescriptorMapper =
      [[SKDescriptorMapper alloc] initWithDefaults];
  [client addPlugin:[[FlipperKitLayoutPlugin alloc]
                            initWithRootNode:application
                        withDescriptorMapper:layoutDescriptorMapper]];
  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  [client addPlugin:[FlipperKitReactPlugin new]];
  [client addPlugin:[[FlipperKitNetworkPlugin alloc]
                        initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  [client start];
}
#endif

@implementation AppDelegate

- (BOOL)application:(UIApplication*)application
    didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
#ifdef FB_SONARKIT_ENABLED
  InitializeFlipper(application);
#endif

senghuot-lay avatar Apr 03 '23 10:04 senghuot-lay

In my case my RN version is 0.66.1 and I'm also experiencing this issue

dmsierra11 avatar May 26 '23 12:05 dmsierra11