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

Can't run watchman service, run the project nor archive after upgrade to 0.39 #11281

Closed
antonysastre opened this issue Dec 3, 2016 · 8 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@antonysastre
Copy link

antonysastre commented Dec 3, 2016

Description

Can't run background service since upgrade to 0.39.
Running npm start freezes after this output:

> Projectname@1.0.0 start /Users/antonysastre/Projects/node/project-name/Projectname
> node_modules/react-native/packager/packager.sh

Running react-native start just freezes no output.

Running from Xcode breaks with the following out put:

2016-12-03 17:01:02.243 [info][tid:main][RCTBatchedBridge.m:72] Initializing <RCTBatchedBridge: 0x60000019ce50> (parent: <RCTBridge: 0x6000000bc6e0>, executor: RCTJSCExecutor)
2016-12-03 17:01:02.245 Projectname[28443:221292] *** Assertion failure in -[RCTBatchedBridge loadSource:onProgress:](), /Users/antonysastre/Projects/node/projectname-app/Projectname/node_modules/react-native/React/Base/RCTBatchedBridge.m:196
2016-12-03 17:01:02.346 Projectname[28443:221292] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'bundleURL must be non-nil when not implementing loadSourceForBridge'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001029e434b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00000001018f221e objc_exception_throw + 48
	2   CoreFoundation                      0x00000001029e8442 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x00000001014bed79 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
	4   Projectname                      0x0000000100fe9505 -[RCTBatchedBridge loadSource:onProgress:] + 997
	5   Projectname                      0x0000000100fe7673 -[RCTBatchedBridge start] + 883
	6   Projectname                      0x00000001010297bc -[RCTBridge setUp] + 684
	7   Projectname                      0x0000000101028813 -[RCTBridge initWithDelegate:bundleURL:moduleProvider:launchOptions:] + 387
	8   Projectname                      0x0000000101028622 -[RCTBridge initWithBundleURL:moduleProvider:launchOptions:] + 146
	9   Projectname                      0x0000000100f85dd7 -[RCTRootView initWithBundleURL:moduleName:initialProperties:launchOptions:] + 183
	10  Projectname
                      0x0000000100f5e845 -[AppDelegate application:didFinishLaunchingWithOptions:] + 245
	11  UIKit                               0x0000000104f560be -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
	12  UIKit                               0x0000000104f57a43 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
	13  UIKit                               0x0000000104f5dde9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
	14  UIKit                               0x0000000104f5af69 -[UIApplication workspaceDidEndTransaction:] + 188
	15  FrontBoardServices                  0x00000001083f3723 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
	16  FrontBoardServices                  0x00000001083f359c -[FBSSerialQueue _performNext] + 189
	17  FrontBoardServices                  0x00000001083f3925 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
	18  CoreFoundation                      0x0000000102989311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	19  CoreFoundation                      0x000000010296e59c __CFRunLoopDoSources0 + 556
	20  CoreFoundation                      0x000000010296da86 __CFRunLoopRun + 918
	21  CoreFoundation                      0x000000010296d494 CFRunLoopRunSpecific + 420
	22  UIKit                               0x0000000104f597e6 -[UIApplication _run] + 434
	23  UIKit                               0x0000000104f5f964 UIApplicationMain + 159
	24  Projectname                      0x0000000100f5eeef main + 111
	25  libdyld.dylib                       0x000000010693668d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Trying to build the project with Xcode just freezes at Archiving.

Additional Information

Platform: iOS (haven't tried Android)
Operating System: MacOS
node: 7.1.0
npm: 3.10.9
react-native-cli: 1.2.0
react-native: 0.39.0
Xcode: 8.1 (8B62)

@brunolemos
Copy link
Contributor

brunolemos commented Dec 3, 2016

I'm having the exact same problem. Nothing works.
Any command related to watchman will freeze / give no output.

--
MacOS 10.12.2 Beta
Node.js 7.2.0
npm 3.10.9
react-native-cli 1.3.0
react-native 0.39.0
watchman 4.7.0

--
Things that changed from yesterday, when it was working:

  • Upgraded to react-native 0.39.0
  • Java updated on my machine

@brunolemos
Copy link
Contributor

brunolemos commented Dec 3, 2016

Things I have tried already:

  • Cleaning all caches
  • Removing node_modules and reinstalling (with yarn and with npm)
  • Running first aid on mac
  • Downgrading react native to 0.38.0
  • Downgrading react-native-cli to 1.2.0
  • Downgrading watchman to 4.6.0
  • Creating a new react-native project (will stop doing anything after reaching a watchman command)

Starting to think it's an OS issue. @antonysastre what's the version of your mac os? Is it Beta too?

@brunolemos
Copy link
Contributor

brunolemos commented Dec 3, 2016

After some debugging, it's freezing when trying to run watchman version here:

const detectWatcherClass = () => {
  try {
    execSync('watchman version', {stdio: 'ignore'});
    return sane.WatchmanWatcher;
  } catch (e) {}
  return sane.NodeWatcher;
};

from file node_modules/react-native/packager/react-packager/src/node-haste/FileWatcher/index.js#21

Yeah, is probably an OS issue. See facebook/watchman/issues/388

@brunolemos
Copy link
Contributor

brunolemos commented Dec 3, 2016

All right, here is the fix:

Run: launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist
If you can now run watchman version it means it fixed it.

Solution from facebook/watchman#358 (comment)

--
Twitter: @brunolemos

@antonysastre
Copy link
Author

@brunolemos Awesome man, that fixed for me. I did suspect a watchman/OS related issue but wasn't able to track it down as far as you did. Thanks again!

@vishalkevin11
Copy link

@brunolemos Awesome !!! it worked for me ....

@brunolemos
Copy link
Contributor

Good to know! 🙂

--
Twitter: @brunolemos

@wangking873
Copy link

127.0.0.1 localhost

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants