Skip to content

theta-client-react-native initialize() Error: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80). #74

@mirabo-trunghoang

Description

@mirabo-trunghoang

When I call initialize(), sometimes it throws this error:

HttpClient: REQUEST http://192.168.1.1/osc/info failed with exception: kotlin.IllegalStateException: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80).
Error: Failed to connect to InetSocketAddress(hostname=192.168.1.1, port=80).

Note that the iPhone is connected to the Theta camera Wifi already, and if I tried to call this function several times, it was successful (maybe the second time or third time,...). Almost the time, it failed when trying to connect after the first time installing the app.

The code I implemented. I use WifiManager to connect to the Theta Wifi first then call initialize()

 try {
      await WifiManager.connectToProtectedSSID(thetaSsid, password, false, false)
      await initialize();
    } catch (error) {
      console.warn(`${error}`)
    }

I know it may encounter some error when connecting but in the production, it seems not acceptable.
Please help to figure out the season why this issue happens.
Thanks.

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