reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

Multiple connections for the same device/emulator

Open developerantoniosousa opened this issue 4 years ago • 6 comments
trafficstars

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:

reactotron-multiple-connections-error

developerantoniosousa avatar May 09 '21 06:05 developerantoniosousa

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.

developerantoniosousa avatar May 09 '21 06:05 developerantoniosousa

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

rizwanatta avatar Jul 19 '21 07:07 rizwanatta

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.

rizwanatta avatar Aug 14 '21 19:08 rizwanatta

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

developerantoniosousa avatar Mar 11 '22 07:03 developerantoniosousa

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.

alexanderdavide avatar Jun 24 '22 13:06 alexanderdavide

@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

joshuayoes avatar Jan 05 '24 18:01 joshuayoes