React-native远程捆绑包会导致重新加载垃圾邮件

时间:2017-03-02 03:52:28

标签: react-native

我正在尝试从远程系统(我的网络中的本地)加载一个捆绑包,这是我的开发机器。为此,我更改了AppDelegate.m文件中的一行代码

jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource: nil];

已更改为

jsCodeLocation = [NSURL URLWithString:@"http://192.168.1.12:8081/index.ios.bundle";

导航到浏览器中的捆绑链接会给出捆绑包。导航到192.168.1.12显示react-native packager正在运行,导航到http://192.168.1.12:8081/debugger-proxy?role=client有一个指向缓存包的链接。

尝试启动应用时,“从192.168.1.12加载”会反复发送垃圾邮件。伴随着这个无限重复的错误。

2017-03-01 21:40:24.375 [fatal][tid:com.facebook.react.RCTBridgeQueue] Connection to http://192.168.1.12:8081/debugger-proxy?role=client 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`.
2017-03-01 21:40:24.380 [info][tid:main][RCTBatchedBridge.m:72] Initializing <RCTBatchedBridge: 0x60800079e440> (parent: <RCTBridge: 0x6000000bb7e0>, executor: RCTWebSocketExecutor)
2017-03-01 21:40:24.396 [info][tid:main][RCTBatchedBridge.m:72] Initializing <RCTBatchedBridge: 0x60000078ad10> (parent: <RCTBridge: 0x6000000bb7e0>, executor: RCTWebSocketExecutor)
2017-03-01 21:40:24.406249 myapp[53952:690926] [] __nwlog_err_simulate_crash simulate crash already simulated "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
2017-03-01 21:40:24.406708 myapp[53952:690926] [] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
        [x86_64] libnetcore-856.30.16
    0   libsystem_network.dylib             0x0000000112a32666 __nw_create_backtrace_string + 123
    1   libnetwork.dylib                    0x0000000113289006 nw_socket_add_input_handler + 3164
    2   libnetwork.dylib                    0x0000000113266555 nw_endpoint_flow_attach_protocols + 3768
    3   libnetwork.dylib                    0x0000000113265572 nw_endpoint_flow_setup_socket + 563
    4   libnetwork.dylib                    0x0000000113264298 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
    5   libnetwork.dylib                    0x000000011327fae1 nw_endpoint_handler_path_change + 1261
    6   libnetwork.dylib                    0x000000011327f510 nw_endpoint_handler_start + 570
    7   libdispatch.dylib                   0x00000001127af978 _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00000001127d90cd _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00000001127b6e17 _dispatch_queue_serial_drain + 236
    10  libdispatch.dylib                   0x00000001127b7b4b _dispatch_queue_invoke + 1073
    11  libdispatch.dylib                   0x00000001127ba385 _dispatch_root_queue_drain + 720
    12  libdispatch.dylib                   0x00000001127ba059 _dispatch_worker_thread3 + 123
    13  libsystem_pthread.dylib             0x0000000112b824de _pthread_wqthread + 1129
    14  libsystem_pthread.dylib             0x0000000112b80341 start_wqthread + 13
2017-03-01 21:40:24.490 [fatal][tid:com.facebook.react.RCTBridgeQueue] Connection to http://192.168.1.12:8081/debugger-proxy?role=client 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`.
2017-03-01 21:40:24.519487 myapp[53952:690889] [] __nwlog_err_simulate_crash simulate crash already simulated "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
2017-03-01 21:40:24.520108 myapp[53952:690889] [] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
 .......

然而,打包者正在收到请求:

Loading dependency graph...
React packager ready.

Loading dependency graph, done.
Bundling `index.ios.js`
  Transforming modules  99.8% (809/810), done.
::ffff:192.168.1.20 - - [02/Mar/2017:03:38:26 +0000] "GET /favicon.ico HTTP/1.1" 404 24 "http://192.168.1.12:8081/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
Bundling `index.ios.js`
  No module changed.
Bundling `index.ios.js`
  No module changed.
Bundling `index.ios.js`
  No module changed.
Bundling `index.ios.js`
  No module changed.
Bundling `index.ios.js`
  No module changed.
Bundling `index.ios.js`
  No module changed.
Bundling `index.ios.js`
  No module changed.
Bundling `index.ios.js`
  No module changed.
Bundling `index.ios.js`
  No module changed.
.....

我该怎么办?

0 个答案:

没有答案