SyntaxError: JSON Parse error: Unexpected identifier "WebSocketModule" 嵌入失败



  • Exception in native call from JS
    com.facebook.react.devsupport.DebugServerException: SyntaxError: JSON Parse error: Unexpected identifier "WebSocketModule" (http://30.30.28.34:8080/index.android.bundle?platform=android&dev=true&hot=false&minify=false:7011)

                                                                   Try the following to fix the issue:
                                                                   • Ensure that the packager server is running
                                                                   • Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run 'adb devices' to see a list of connected devices
                                                                   • If you're on a physical device connected to the same machine, run 'adb reverse tcp:8081 tcp:8081' to forward requests from your device
                                                                   • If your device is on the same Wi-Fi network, set 'Debug server host & port for device' in 'Dev settings' to your machine's IP address and the port of the local dev server - e.g. 10.0.1.1:8081
                                                                   
                                                                   
                                                                       at com.facebook.react.cxxbridge.JSBundleLoader$2.loadScript(JSBundleLoader.java:66)
                                                                       at com.facebook.react.cxxbridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:177)
                                                                       at com.facebook.react.XReactInstanceManagerImpl$4.call(XReactInstanceManagerImpl.java:888)
                                                                       at com.facebook.react.XReactInstanceManagerImpl$4.call(XReactInstanceManagerImpl.java:881)
                                                                       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$1.run(MessageQueueThreadImpl.java:74)
                                                                       at android.os.Handler.handleCallback(Handler.java:815)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:104)
                                                                       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
                                                                       at android.os.Looper.loop(Looper.java:199)
                                                                       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
                                                                       at java.lang.Thread.run(Thread.java:818)
                                                                    Caused by: java.lang.RuntimeException: SyntaxError: JSON Parse error: Unexpected identifier "WebSocketModule" (http://30.30.28.34:8080/index.android.bundle?platform=android&dev=true&hot=false&minify=false:7011)
                                                                       at com.facebook.react.cxxbridge.CatalystInstanceImpl.loadScriptFromFile(Native Method)
                                                                       at com.facebook.react.cxxbridge.JSBundleLoader$2.loadScript(JSBundleLoader.java:64)
                                                                       at com.facebook.react.cxxbridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:177) 
                                                                       at com.facebook.react.XReactInstanceManagerImpl$4.call(XReactInstanceManagerImpl.java:888) 
                                                                       at com.facebook.react.XReactInstanceManagerImpl$4.call(XReactInstanceManagerImpl.java:881) 
                                                                       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$1.run(MessageQueueThreadImpl.java:74) 
                                                                       at android.os.Handler.handleCallback(Handler.java:815) 
                                                                       at android.os.Handler.dispatchMessage(Handler.java:104) 
                                                                       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
                                                                       at android.os.Looper.loop(Looper.java:199) 
                                                                       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
                                                                       at java.lang.Thread.run(Thread.java:818)

登录后回复