Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Connection timeout with react native #8

Open

Description

@thitemple

Description

I'm trying to use this with React Native and it's failing with connection timeout.

"TimeoutError: Event response for 'login' timed out
    at SCSocket._handleEventAckTimeout (blob:http://localhost:8081/26f10f58-4ab3-4aa1-8116-d08fdb9bae27:84260:19)
    at blob:http://localhost:8081/26f10f58-4ab3-4aa1-8116-d08fdb9bae27:84286:12
    at blob:http://localhost:8081/26f10f58-4ab3-4aa1-8116-d08fdb9bae27:23291:21
    at _callTimer (blob:http://localhost:8081/26f10f58-4ab3-4aa1-8116-d08fdb9bae27:23208:9)
    at Object.callTimers (blob:http://localhost:8081/26f10f58-4ab3-4aa1-8116-d08fdb9bae27:23415:9)
    at MessageQueue.__callFunction (blob:http://localhost:8081/26f10f58-4ab3-4aa1-8116-d08fdb9bae27:10183:44)
    at blob:http://localhost:8081/26f10f58-4ab3-4aa1-8116-d08fdb9bae27:9953:17
    at MessageQueue.__guardSafe (blob:http://localhost:8081/26f10f58-4ab3-4aa1-8116-d08fdb9bae27:10145:11)
    at MessageQueue.callFunctionReturnFlushedQueue (blob:http://localhost:8081/26f10f58-4ab3-4aa1-8116-d08fdb9bae27:9952:14)
    at http://localhost:8081/debugger-ui/debuggerWorker.js:72:58"

Repro code

Here's what I'm using to set it up:

Program.mkProgram App.init App.update App.view
|> Program.withSubscription subscribe
#if RELEASE
#else
|> Program.withDebuggerAt (Debugger.Remote("localhost", 8081))
|> Program.withConsoleTrace
|> Program.withHMR
#endif
|> Program.withReactNative "demoApp"
|> Program.run

Expected and actual results

Please provide the expected and actual results.

Related information

  • elmish version: 1.0.3
  • fable-compiler version: 1.3.17
  • fable-core version: 1.3.17
  • Operating system: Windows 10

Activity

  1. MangelMaxime commented on Jun 25, 2018

    @MangelMaxime
    Member

    Hum... You are using react-native so the code is running on your mobile device/emulator.

    IMHO localhost refer to the device and not your computer.

  2. thitemple commented on Jun 25, 2018

    @thitemple
    Author

    I tried replacing localhost with my local IP and that didn't fix it.

  3. et1975 commented on Jun 26, 2018

    @et1975
    Member
    • Are you running emulator (which one?) or is it Windows RN? iOS needs certain permissions, I haven't tried running Windows RN with debugger, it may need network access permissions as well. Android emulator needs port forwarding. See the server instructions bellow.

    • Are you running a local server?

    • Do you have a monitor/UI up and running (options are listed on the server README)?

  4. thitemple commented on Jun 26, 2018

    @thitemple
    Author

    I'm running on my actual device (Android) connected via USB
    I'm not running local server, or at least I don't think I am. I'm implementing my tests on top of the Nightwatch repo

  5. et1975 commented on Jun 26, 2018

    @et1975
    Member

    I'm not running local server

    The debugger client elmish runs needs to connect to something that will index and store the state. In case of SPA (React) it is as easy as installing the browser plugin, in case of Native, we need to talk over the network to a server. That server will keep the history and actions, but has no UI. For the UI you need a "monitor" that would connect to the same server and let you browse the data and go back and forth in history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions