ID 597006 - Multiple Sync Review clients with the same machine ID cannot connect to the same host

Follow

Problem summary
Multiple clients are unable to connect to a Sync Review host when hiero.syncreview.config.MACHINE_ID is the same for multiple client sessions.

def __readMachineId():  # Try to get a unique id for the machine. QSysInfo.machineUniqueId() doesn't  # work properly on Mac, so fallback to uuid.getnode() which I believe reads a  # network MAC address  from PySide6.QtCore import QSysInfo  import sys  if sys.version_info.major == 3:    id = str(QSysInfo.machineUniqueId(), "ascii") # Decode the QByteArray, which should be in hex  else:    id = str(QSysInfo.machineUniqueId())  if not id:    import uuid    id = str(uuid.getnode())  return idMACHINE_ID = __readMachineId()
 
This can happen when, for example, the clients are all running Nuke Studio/Hiero on virtual machines.
 
Customer reported version
Hiero 15.1v5
 
Customer reported platform
Rocky 9
 
Steps to reproduce
 
1) Launch three Nuke Studio sessions.

2) In the first Nuke Studio session, session, change the Workspace to "Sync Session" (Workspace > Sync Session). Press the Host button and, in the dialog that appears, press Start.

3) In the second Nuke Studio also change the Workspace to "Sync Session". Press the Connect button and, in the dialog that appears, set the Host field to localhost then press Connect. 
This should successfully connect to the Host session.
 
4) Repeat step 3 in the third Nuke Studio session, however, this will fail to connect.
 
5) Run the following code in the Script Editor, to change the machine ID in the Python code, and try to connect the session again:
import hiero.syncreview.config hiero.syncreview.config.MACHINE_ID = 'mymaachineid'
 
Expected behaviour
The hiero.syncreview.config code should ensure that non-unique machine IDs cannot occur.
 
Actual behaviour
The following error appears in the dialog, when trying to connect:

 
The following errors also appear in command line:
ERROR:asyncio:Exception in callback Socket._handleSocketEvents()handle: <Handle Socket._handleSocketEvents()>Traceback (most recent call last):  File "C:\Program Files\Nuke16.0v1\python311.zip\asyncio\events.py", line 80, in _run    self._context.run(self._callback, *self._args)  File "C:\Program Files\Nuke16.0v1\pythonextensions\site-packages\hiero\syncreview\socket.py", line 77, in _handleSocketEvents    self._onDataReceived(data)  File "C:\Program Files\Nuke16.0v1\pythonextensions\site-packages\hiero\syncreview\socket.py", line 134, in _onDataReceived    self._dataReceivedCallback(sender, payload)  File "C:\Program Files\Nuke16.0v1\pythonextensions\site-packages\hiero\syncreview\server.py", line 67, in _onDataReceived    self._handleConnectRequest(clientSocketId, msg)  File "C:\Program Files\Nuke16.0v1\pythonextensions\site-packages\hiero\syncreview\server.py", line 94, in _handleConnectRequest    self._addClientConnection(clientSocketId, msg.sender)  File "C:\Program Files\Nuke16.0v1\pythonextensions\site-packages\hiero\syncreview\server.py", line 105, in _addClientConnection    assert(clientId not in self._clients)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError
 
Workaround
You can change the machine ID (in the Python code) by running the following code in the Script Editor, for any sessions that are failing to connect:
import hiero.syncreview.config hiero.syncreview.config.MACHINE_ID = 'mymaachineid'
 
NOTE: 'mymachineid' should be a unique string for each client session.
 
Reproduced by support
This bug has been reproduced in:
Nuke Studio 16.0v1 - Windows 11 - Linux Rocky 9
Nuke Studio 12.2v1 - Windows 11 - Linux CentOS 7
 
Earliest version tested
Nuke Studio 12.2v1
- This feature did not exist before this version
 

    We're sorry to hear that

    Please tell us why