reactotron
reactotron copied to clipboard
Multiple connections for the same device/emulator
I have been using Reactotron for some years and there is one issue that sometimes freaks me out which is multiple connections for the same device/emulator. Each reloads creates a new connection and we must access the new connection every time.
Take a look at screenshot below:
I forgot my environment details, basically, it's already happened on Windows and macOS for me. On Linux I don't know, because I no longer use it.
i second that! @developerantoniosousa
its still happening in the latest beta too!.
i am thinking can it be because of our tool configuration !
I am on a mac though
This seems to be some configuration issue! as I reverted to an older version of 2.17.1 of reactotron but it did not work! has the same multi-connection Problem.
I'm not sure if there's something with it, but for me here there's been a while since I've seen this Reactotron behavior. What I did differently was that I've been reversing ports to Packager and Reactotron.
For Reactotron:
$ adb reverse tcp:9090 tcp:9090
For Packager:
$ adb -s <device_identifier> reverse tcp:8081 tcp:8081
I still encounter this problem and it certainly freaks me out too.
Sure, I am also reversing port 9090 because otherwise the device or emulator wouldn't connect to Reactotron.
@jamonholmgren @morganick @markrickert this is the issue we were discussing today
This is caused by getClientId not being deterministic https://github.com/infinitered/reactotron/blob/master/lib/reactotron-core-client/src/reactotron-core-client.ts#L286-L305
We need to create a better default id than emptyPromise that is based on the connection information, such as app name, device info, or metro port