Reputation: 2001
I'm trying to deploy React Native app to my phone with an offline bundle. I haven't developed for ios before and not sure where to look for this error. And yes my app is named "ReactNativeTest", I didn't knew that Xcode would make a folder named "ReactNativeTestTests" haha.
So where should I begin with this problem?
2015-11-14 15:58:36.637 [error][tid:com.facebook.React.WebSocketExecutor][RCTWebSocketExecutor.m:127]
WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
2015-11-14 15:58:36.686 reactNativeTest[5240:2439923] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x136f60520 V:|-(20)-[UIInputSetContainerView:0x136f5f8b0] (Names: '|':UITextEffectsWindow:0x136f5ece0 )>",
"<NSLayoutConstraint:0x136e2fc60 'UIInputWindowController-top' V:|-(0)-[UIInputSetContainerView:0x136f5f8b0] (Names: '|':UITextEffectsWindow:0x136f5ece0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x136f60520 V:|-(20)-[UIInputSetContainerView:0x136f5f8b0] (Names: '|':UITextEffectsWindow:0x136f5ece0 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-11-14 15:58:38.625 [error][tid:com.facebook.react.RCTBridgeQueue][RCTWebSocketExecutor.m:70] Connection to http://localhost:8081/debugger-proxy timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in `RCTWebSocketExecutor.m`.
Upvotes: 7
Views: 9373
Reputation: 11
I've get this issue "Connect Refused" once time. While I shake the phone to debug remote, the chrome open the http://localhost:8081/debugger-proxy, but the phone and simulator can't connect to the server.It take me for days and finally I found chrome hint me cannot use cookie for this website. So I allow the chrome use cookie in this website and it work fine.
Upvotes: 1
Reputation: 121
I've had issues before where the IP address was wrong but most recently I hadn't been able to resolve this issue until I simply turned off WiFi and then back on again.
Same network. Same IP. Who knows why but it worked for me ¯_(ツ)_/¯
Upvotes: 2
Reputation: 4059
The last row of the error gives you a hint where to look:
Connection to http://localhost:8081/debugger-proxy timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in
RCTWebSocketExecutor.m
.
Additional information:
To debug on a real device: Open the file RCTWebSocketExecutor.m and change localhost to the IP address of your computer. Shake the device to open the development menu with the option to start debugging.
Even better, check the documentation that Facebook provides for Running On Device.
Upvotes: 7