yudai / gotty

Share your terminal as a web application
MIT License
18.74k stars 1.37k forks source link

gotty does not work properly under firefox 64.0 #236

Closed olivewind closed 4 years ago

olivewind commented 5 years ago

What version of GoTTY are you using (gotty --version)?

gotty version 1.0.1

What operating system and browser are you using?

Mac os 10.14.1 Firfox 64.0

What did you do?

set the '--once' option, just like:

gotty --address 0.0.0.0 --port 9091 --w --once docker exec -it b4598916268f sh

What did you expect to see?

Gotty Can be work normally at firefox 64.0

What did you see instead?

everything works fine under Chrome image

but can't work under Firefox 64.0 image

image

I guess it is caused by the code below, but I don't know how to fix it image

When file a new feature proposal

mateuszkwiatkowski commented 5 years ago

Hello, we're experiencing the same behavior under Firefox 64. Chrome, Edge and Safari work fine.

mateuszkwiatkowski commented 5 years ago

It is --once and/or --max-connections 1 flags that broke the gotty in Firefox for us. For some reason Firefox establishes two connections to gotty:

2019/02/08 13:54:26 read tcp 127.0.0.1:40332->127.0.0.1:43213: use of closed network connection
2019/02/08 13:54:26 Connection closed: 127.0.0.1:43213, connections: 1/5
2019/02/08 13:54:36 New client connected: 127.0.0.1:54234
2019/02/08 13:54:36 Command is running for client 127.0.0.1:54234 with PID 4421 (args="bash -l"), connections: 2/5

After removing --once and bumping --max-connections it works when opened directly in Firefox, but is still broken when loaded in iframe.

sctlee commented 5 years ago

Hi there, Is there updates? This problem also occurs in Firefox 65 66...

sctlee commented 5 years ago

https://github.com/DaoCloud/gotty/commit/1e03cc863be22003635c4a61b7b9f2b5b8df4cf7

After I update hterm to v1.84, it works!