Chromium on LXD Ubuntu container using X over ssh to display on client - "X11 connection rejected because of wrong authentication."

Some of the debug output with ssh -vvv ...

$ chromium 
...
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype x11 rchan 5 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 53732
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug3: send packet: type 91
debug2: X11 connection uses different authentication protocol.
X11 connection rejected because of wrong authentication.

(FAILED)

Not a problem with xeyes or firefox:

$ xeyes
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype x11 rchan 5 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 53762
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug3: send packet: type 91

(SUCCESS)

$ firefox
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype x11 rchan 5 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 53784
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug3: send packet: type 91
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype x11 rchan 6 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 53786
debug2: fd 8 setting O_NONBLOCK
debug3: fd 8 is O_NONBLOCK
debug1: channel 2: new [x11]

(SUCCESS)

A workaround appears to be using the older non-snap version of chromium, which is named chromium-browser, which must be installed with apt and not snap. To make that work it is necessary to set these environment variables to suppress shared memory:

export QT_X11_NO_MITSHM=1
export _X11_NO_MITSHM=1
export _MITSHM=0

However the apt-based chromium-browser is apparently not going to be supported for much longer.

Regarding the snap-based chromium bug, I submitted a bug report to chromium bugs:
https://bugs.chromium.org/p/chromium/issues/detail?id=1103135

I read elsewhere that the initial snap-based chromium version was prepared by the LXD group, so perhaps someone reading this understands the problem.