Partage
  • Partager sur Facebook
  • Partager sur Twitter

watchman warning: Recrawled this watch 3 times

React Native, installation de firebase

    25 septembre 2022 à 13:25:40

    Bonjour, j'ai installer firebase sur mon application. Mais j'ai un problème au lancement :

    watchman warning:  Recrawled this watch 3 times, most recently because:
    MustScanSubDirs UserDroppedTo resolve, please review the information on
    https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
    To clear this warning, run:
    `watchman watch-del '/Users/xxxx/Documents/DEV.nosync/NewReactNative/todoleaf' ; watchman watch-project '/Users/jeff420m/Documents/DEV.nosync/NewReactNative/todoleaf'`
    
    Recrawled this watch 3 times, most recently because:
    MustScanSubDirs UserDroppedTo resolve, please review the information on
    https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
    To clear this warning, run:
    `watchman watch-del '/Users/xxxx/Documents/DEV.nosync/NewReactNative/todoleaf' ; watchman watch-project '/Users/jeff420m/Documents/DEV.nosync/NewReactNative/todoleaf'`

    De plus l'application crash au démarrage.

    Pour linstallation j'ai suivis les points 3 et 4 au complet de cette doc: https://rnfirebase.io/#configure-firebase-with-android-credentials

    Voici mon podfile :

    require_relative '../node_modules/react-native/scripts/react_native_pods'
    require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
    
    platform :ios, '12.4'
    install! 'cocoapods', :deterministic_uuids => false
    
    target 'ReactNativeBoilerplate' do
      config = use_native_modules!
      use_frameworks! :linkage => :static
      # Flags change depending on the env values.
      flags = get_default_flags()
      $RNFirebaseAsStaticFramework = true
      use_react_native!(
        :path => config[:reactNativePath],
        # to enable hermes on iOS, change `false` to `true` and then install pods
        :hermes_enabled => flags[:hermes_enabled],
        :fabric_enabled => flags[:fabric_enabled],
        # An absolute path to your application root.
        :app_path => "#{Pod::Config.instance.installation_root}/.."
      )
    
      target 'ReactNativeBoilerplateTests' do
        inherit! :complete
        # Pods for testing
      end
    
      # Enables Flipper.
      #
      # Note that if you have use_frameworks! enabled, Flipper will not work and
      # you should disable the next line.
      # use_flipper!()
    
      post_install do |installer|
        react_native_post_install(installer)
        __apply_Xcode_12_5_M1_post_install_workaround(installer)
      end
    end
    

    Voici mon AppDelegate.m

    #import "AppDelegate.h"
    #import <Firebase.h>
    #import <React/RCTBridge.h>
    #import <React/RCTBundleURLProvider.h>
    #import <React/RCTRootView.h>
    
    #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<const facebook::react::ReactNativeConfig> _reactNativeConfig;
      facebook::react::ContextContainer::Shared _contextContainer;
    }
    @end
    #endif
    
    @implementation AppDelegate
    
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
      [FIRApp configure];
      RCTAppSetupPrepareApp(application);
    
      RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
    
    #if RCT_NEW_ARCH_ENABLED
      _contextContainer = std::make_shared<facebook::react::ContextContainer const>();
      _reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
      _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
      _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
      bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
    #endif
    
      NSDictionary *initProps = [self prepareInitialProps];
      UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"ReactNativeBoilerplate", initProps);
    
      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];
      return YES;
    }
    
    /// This method controls whether the `concurrentRoot`feature 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`.
    - (BOOL)concurrentRootEnabled
    {
      // Switch this bool to turn on and off the concurrent root
      return true;
    }
    
    - (NSDictionary *)prepareInitialProps
    {
      NSMutableDictionary *initProps = [NSMutableDictionary new];
    
    #ifdef RCT_NEW_ARCH_ENABLED
      initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
    #endif
    
      return initProps;
    }
    
    - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
    {
    #if DEBUG
      return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
    #else
      return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
    #endif
    }
    
    #if RCT_NEW_ARCH_ENABLED
    
    #pragma mark - RCTCxxBridgeDelegate
    
    - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
    {
      _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
                                                                 delegate:self
                                                                jsInvoker:bridge.jsCallInvoker];
      return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
    }
    
    #pragma mark RCTTurboModuleManagerDelegate
    
    - (Class)getModuleClassFromName:(const char *)name
    {
      return RCTCoreModulesClassProvider(name);
    }
    
    - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
                                                          jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
    {
      return nullptr;
    }
    
    - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
                                                         initParams:
                                                             (const facebook::react::ObjCTurboModule::InitParams &)params
    {
      return nullptr;
    }
    
    - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
    {
      return RCTAppSetupDefaultModuleFromClass(moduleClass);
    }
    
    #endif
    
    @end
    

    Je n'ai aucune idée de la source du problème.

    J'ai essayer ça :

     watchman watch-del-all  

     watchman shutdown-server
    sans succès.



    • Partager sur Facebook
    • Partager sur Twitter

    watchman warning: Recrawled this watch 3 times

    × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
    × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
    • Editeur
    • Markdown