Reputation: 8962
I am trying to connect to a mobile phone to run a React Native app via XCode on MacOS. Unfortunately, the connection fails with the error: No bundle URL present
This is the full error:
2022-07-22 11:51:39.924974+0200 neoAppTemplate[85080:3120936] [connection] nw_connection_get_connected_socket [C1] Client called nw_connection_get_connected_socket on unconnected nw_connection 2022-07-22 11:51:39.925176+0200 neoAppTemplate[85080:3120936] TCP Conn 0x281158580 Failed : error 0:61 [61] 2022-07-22 11:51:49.796105+0200 neoAppTemplate[85080:3120936] Task <0BDA59B9-E698-4AAE-8049-4B42365D1BBF>.<1> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 “Zeitüberschreitung bei der Anforderung.” UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x282800d20 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 “(null)” UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <0BDA59B9-E698-4AAE-8049-4B42365D1BBF>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( “LocalDataTask <0BDA59B9-E698-4AAE-8049-4B42365D1BBF>.<1>” ), NSLocalizedDescription=Zeitüberschreitung bei der Anforderung., NSErrorFailingURLStringKey=http://192.168.179.5:8081/status, NSErrorFailingURLKey=http://192.168.179.5:8081/status, _kCFStreamErrorDomainKey=4} 2022-07-22 11:51:49.849678+0200 neoAppTemplate[85080:3120676] [native] No bundle URL present.
I am running on React Native 0.69.2
XCode 13
I added this to my Info.plist file:
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
I am connected to Metro
Both devices are on the same network
So what could the problem be?
Upvotes: 3
Views: 1546
Reputation: 2417
Not the most ideal answer, I've currently given up trying to make it work over WiFI. The below has at least got me back on my feet.
With iPhone connected over USB, go to System Preferences->Network, find your device and untick "Disable unless needed" then press apply. Note down the IP address:
Manually set the IP address into the "Configure Bundler" in the apps shake to debug window. I'll update this again when/if I figure out the lack of WiFi connectivity.
Upvotes: 1