Giter Site home page Giter Site logo

react-native-http-server's People

Contributors

strainy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-http-server's Issues

why server didnt work ?

I just try to start the server services but didnt work ? how make it work ? i have try your simply sample

Cannot access!!!

Use example, the port is 8181, but the local use of 127.0.0.1:8181 can not be accessed

Error report & suggestion for an option

Your library always makes error when I close app with the following stacktrace. Can you check and revise it?

FATAL EXCEPTION: main
Process: com.ohsupir, PID: 12983
java.lang.RuntimeException: Unable to destroy activity {com.ohsupir/com.ohsupir.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.strainy.RNHttpServer.Server.stop()' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5061)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5084)
at android.app.ActivityThread.access$1700(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1853)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.strainy.RNHttpServer.Server.stop()' on a null object reference
at com.strainy.RNHttpServer.RNHttpServerModule.stop(RNHttpServerModule.java:116)
at com.strainy.RNHttpServer.RNHttpServerModule.onHostDestroy(RNHttpServerModule.java:152)
at com.facebook.react.bridge.ReactContext.onHostDestroy(ReactContext.java:240)
at com.facebook.react.XReactInstanceManagerImpl.moveToBeforeCreateLifecycleState(XReactInstanceManagerImpl.java:618)
at com.facebook.react.XReactInstanceManagerImpl.onHostDestroy(XReactInstanceManagerImpl.java:550)
at com.facebook.react.XReactInstanceManagerImpl.onHostDestroy(XReactInstanceManagerImpl.java:557)
at com.facebook.react.ReactActivityDelegate.onDestroy(ReactActivityDelegate.java:142)
at com.facebook.react.ReactActivity.onDestroy(ReactActivity.java:72)
at android.app.Activity.performDestroy(Activity.java:7102)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1170)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5039)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5084) 
at android.app.ActivityThread.access$1700(ActivityThread.java:221) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1853) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:158) 
at android.app.ActivityThread.main(ActivityThread.java:7224) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 


Please add an option to make server which can be accessed from outside like another smartphone. Currently I manually revise com.strainy.RNHttpServer.Server like the following.

public Server(ReactContext context, int port, int timeout) {
// super("127.0.0.1", port);
super("0.0.0.0", port);
......
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.