Qt: Session management error: None of the authentication protocols specified are supported. When using Python sockets on Linux

Perhaps this may help, although it's not exactly the same situation. I've gotten the same error when using matplotlib to display a plot running inside pycharm IDE, so it's possible the error could be coming from cv2.imshow("stream", img).

For example,

import matplotlib.pyplot as plt
plt.plot([i for i in range(10)])
plt.show()

Generates error (even though it still shows the plot):

Qt: Session management error: None of the authentication protocols specified are supported

Starting pycharm without the env variable SESSION_MANAGER causes the error to not occur — either unset it (unset SESSION_MANAGER), or unset it just to launch the program (eg, python3, pycharm, etc):

env -u SESSION_MANAGER pycharm-community