-
Notifications
You must be signed in to change notification settings - Fork 953
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
"NO APPLICATION SELECTED" issue with Flipper #3027
Comments
Please do provide some additional information, like the logs (under exclamation mark icon). Are you using a debug build? Please compare your setup with our reference example https://github.com/facebook/flipper/tree/main/react-native/ReactNativeFlipperExample, make sure that Flipper is started as part of the debug build. Does the reference example work correctly? |
Please don't ping individuals unless there is a specific reason to do so. |
@mweststrate that's what I got: in
|
Sorry that is not enough information to be able to act upon. Can you check if the reference example does work correctly? That gives some clarity on where potential problems might be. |
@mweststrate i've similar issue, the funny thing is that it worked on friday. I've tried with a new Flipper SDK (0.123.0), but no success. I've connection to device, but no to app. RN: 0.66.3 |
@mweststrate nevermind, after restart my computer, it's working :) |
@mweststrate All debugging on Hermes, React DevTools, and logs for device & JS work just fine, including breakpoints. The only problem is I still see "NO APPLICATION SELECTED" My AndroidManifest.xml in both debug and main contains 'android:name=".MainActivity" and the app itself works fine. ADB devices lists the device correctly, and this project has been working fine for over 3 years with React Native Debugger so we know most if not all of the setup is correct (due to the expo upgrade, I needed to drop off from react-native debugger and switch to Flipper) |
I had exactly the same symptoms. Then I discovered that in settings the path of the android SDK was incorrect. It was pointing to The mobile application fails to start with Flipper 0.127.0 with the error |
I'm experiencing the This poses a problem as I'm unable to use Flipper's plugins for:
What does work even with this error:
The version of Flipper we're using is I've gone as far back as Flipper version I'd be happy getting this working just on iOS at least. Our # Enables Flipper.
use_flipper!({'Flipper' => '0.135.0'}) Additional information:OS: macOS Monterey version 12.2 Questions
|
Hi @sabun123, sorry to hear you're having issues. I've just tried with:
The application appeared on the drop down and got connected, at least on iOS simulator. Can you please try the same on your end? I used the bundled ReactNativeExample app. |
Hey @lblasa thanks for getting back to me on this. I've tried the ReactNativeFlipperExample app, and it does work with Flipper correctly. The major difference between my project and the ReactNativeFlipperExample project appears to be a single dependency: "react-native-flipper": "^0.131.0" I added it to the package.json file along with this section from the example app package.json: "relativeDependencies": {
"react-native-flipper": "../react-native-flipper"
} Adding this in seems to break the build though: Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FlipperClient", referenced from:
objc-class-ref in libreact-native-flipper.a(FlipperReactNativeJavaScriptPluginManager.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED ** These differences don't seem to be in the documentation https://fbflipper.com/docs/getting-started/react-native/ and I can't find it on the Github page either. Am I on the right path here, and is there a way to overcome that build error? |
I would:
FlipperClient is defined in Flipper. So it looks like is completely missing. |
Thanks for pointing that out @lblasa , I did not fully understand what the relativeDependencies piece was doing. I have removed it from the package.json file upon your guidance. Tried doing a What else I've triedRemoved the
As far as can be seen, looks like cocoapods is installing the dependencies correctly. Outcome: Still failing at the build stage Went one step further:
Ran the build once more Outcome: Still failing with Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FlipperClient", referenced from:
objc-class-ref in libreact-native-flipper.a(FlipperReactNativeJavaScriptPluginManager.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation) No dice so far, any other ideas to try to get this working? |
Check your AppDelegate.m file, maybe you forgot to add the initialization code there. |
Thanks for the suggestion @stanwrkt. That file should have been pre-filled as linking performs these steps automatically in React Native 0.62 onwards for this library. Here's my AppDelegate.m file (the imports seem to match one-to-one with the example app). #import <React/RCTLinkingManager.h>
#import <Firebase.h>
#import "AppDelegate.h"
#import <AppCenterReactNative.h>
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import "RNSplashScreen.h"
#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
{
if ([FIRApp defaultApp] == nil) {
[FIRApp configure];
}
#ifdef FB_SONARKIT_ENABLED
InitializeFlipper(application);
#endif
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"myapp"
initialProperties:nil];
[AppCenterReactNative register];
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;
[self.window makeKeyAndVisible];
[RNSplashScreen show];
return YES;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
// Below is required for Deep Linking
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}
// This one is for Universal Links
- (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
Does anything seem amiss here? |
I can add that this issue occurs to me on iOS only if I select some build scheme that is different from the "main" scheme. |
Update Android sdk location in Flipper's settings and reload. Hope it helps :D |
I can add that my issue was resolved after I specified flipper version and build configurations in Podfile like this for example:
|
@gax97 you are an amazing individual! This did the trick, would be lovely to have this in the official Flipper setup documentation for those of us in production setups where we support multiple build configurations. I modified my Podfile to the following (the ... are skipped lines):
As can be seen we have a tonne of build configurations setup, and after defining it in Thanks again @gax97 for sharing your findings. |
I'm on the latest version (v0.138.0) and am unable to get either my app or the ReactNativeFlipperExample Android app to show up properly in Flipper. I'm running Linux, but my colleague on a Mac is having the same problem. Here's a screenshot of the Flipper interface (I've tried both the distributed Release and also building from source with the same results): ADB logs and so on are showing correctly. But when I try to select React Native as the target for inspection, I get the following: I'm unable to select any plugins like Network because they say I don't have an application selected (but there are none to select). My Flipper logs show only warnings (no errors): Setup Doctor shows no issues: |
Hello - I am also getting the same issue with Flipper 0.142.0. I can view logs but Flipper is not connecting to my application running on the iOS Simulator. My specs: MacOS Monterey 12.2 I have tried everything I can find through this repo's issues and Stackoverflow but I cannot get Flipper to recognize my application. Any suggestions are much appreciated |
Hello! I have the same issue. I did everything that has been described above, but I am still not succeed... |
+1 bump |
I tried everything above, but it still with the "NO APPLICATION SELECTED" status. It's pretty interesting because it was working just fine, then suddenly, it just couldn't find any app on any device. I love the project and hope it starts to work again someday, as easy as it was. |
Same issue here. "NO APPLICATION SELECTED" on v0.143.0. |
Hi folks, there is many different reasons why Flipper might not be able to connect, and with +1 ing we don't know anything more about your situation, nor gives it any signal on what we could potentially improve on our side. There is sadly quite a lot of reasons why things might not connect, like adb crashes, xcode upgrades, mismatching RN and Flipper versions, not using a debug build, etc. Regularly even a reboot can fix issues.
For now closing this issue, since there are multiple separate discussions going on, but none from the OP |
Oops, in a React Native upgrade I had clobbered the initialisation code in AppDelegate.m, check that you have not done the same. Fixed now. |
RN 0.69.5. Application detecting works after adding part for React Native 0.67 to AppDelegate.mm. Flipper configuration inside use_react_native: |
I got it! 1º problem was the 2º problem was the next line 3º problem was The docs should be more clear about the FULL instalation process, there are a lot of parts missing here that may confuse us making us believe we are doing right |
These are the steps I took to fix the issue Install and configure idb
Set the Android SDK location in flipper -> settings to Set the idb binary location in flipper -> settings to Update my podfile for RN 0.69.0
This should match your installed version of flipper, in my case 0.166.0 |
I was able to solve that on Android open In the first line |
This last comm' saved me ! I had replaced the whole file contents during a RN update, forgetting to update the package name at the top of the file, tx |
Hello, I was having the "NO APPLICATION SELECTED" issue with flipper and managed to detect my app in flipper after several hours of searching. I'm using Flipper 0.183.0 and in my package.json, 0.183.0 as well. react-native: 0.69.7
|
I was having "NO APPLICATION SELECTED" issue on iOS with RN 0.71.3. |
The following worked for me.
None of the above resolved the issue until I uninstall the app from the device, close the Metro Bundler terminal, and then run Desktop FLIPPER_VERSION=0.201.0 |
@Seunope should i run yarn android (or ios) even though i use npm ? |
You can use either yarn or npm, it should still work. |
Just wanted to add what was needed to fix it for me. This is on AppDelegate.swift import UIKit
+import FlipperKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
+ let client = FlipperClient.shared()
+ let layoutDescriptorMapper = SKDescriptorMapper(defaults: ())
+ client?.add(FlipperKitLayoutPlugin(rootNode: application, with: layoutDescriptorMapper!))
+ client?.add(FKUserDefaultsPlugin(suiteName: nil))
+ client?.add(FlipperKitReactPlugin())
+ client?.add(FlipperKitNetworkPlugin(networkAdapter: SKIOSNetworkAdapter()))
+ client?.start()
window = UIWindow()
window?.rootViewController = TabViewController()
window?.makeKeyAndVisible()
return true
}
}
|
Hum.. I'm having this problem as well. Expo with filler 0.210.0 |
This fixed my error, using React Native 0.71.5 and Flipper 0.218.0 Thank you so much! |
|
thank you @sabun123 you save my day #3027 (comment) |
It works for me. Thanks! |
makesure your app in debug mode. |
I have managed to connect a device ( I see logs and see the tree of React Native elements), but now I have an issue with connecting the app - "NO APPLICATION SELECTED" is what I see. Any ideas to fix it?
Using react native 0.64.2/ tried 0.66.1 as well.
The text was updated successfully, but these errors were encountered: