2015-11-14 11 views
5

Ich versuche die React Native App mit einem Offline-Bundle auf meinem Telefon bereitzustellen. Ich habe mich vorher nicht für ios entwickelt und bin mir nicht sicher, wo ich nach diesem Fehler suchen soll. Und ja meine App heißt "ReactNativeTest", ich wusste nicht, dass Xcode einen Ordner namens "ReactNativeTestTests" machen würde haha.Reagiere native NSPOSIXErrorDomain Code = 61 "Verbindung abgelehnt"

Also wo soll ich mit diesem Problem beginnen?

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`. 

Antwort

6

Die letzte Zeile des Fehlers gibt Ihnen einen Hinweis, wo Sie suchen:

Anschluss an http://localhost:8081/debugger-proxy abgelaufen. Sind Sie laufenden Knoten Proxy? Wenn Sie auf dem Gerät laufen, überprüfen Sie, ob Sie die richtige IP-Adresse in RCTWebSocketExecutor.m haben.

Zusätzliche Informationen:

auf einem echten Gerät zu debuggen: Öffnen Sie die Datei RCTWebSocketExecutor.m und Änderung localhost an die IP-Adresse Ihres Computers. Schütteln Sie das Gerät , um das Entwicklungsmenü mit der Option zum Debuggen zu öffnen.

Noch besser, überprüfen Sie die Dokumentation, die Facebook für Running On Device bietet.

+0

Es gibt ein Problem für dieses Problem. Beschreibung kann gesehen werden und verfolgen Sie hier https://github.com/facebook/react-native/issues/1429 – Dan

1

Ich hatte vorher Probleme, wo die IP-Adresse falsch war, aber in letzter Zeit konnte ich dieses Problem nicht lösen, bis ich einfach WiFi ausgeschaltet und dann wieder eingeschaltet habe.

Gleiches Netzwerk. Gleiche IP. Wer weiß warum, aber es hat für mich funktioniert ¯_ (ツ) _/¯

+0

Gleich hier, danke! –

Verwandte Themen