opened
vitogrinds
username_0
There is an error when I use webssh2 in an iframe element. The error reads **WEBSOCKET ERROR - Refresh the browser and try again**

To fix the bug, I tried to read the code and found that cookies were set when the client.html were sent to a blank tab but not set when it sent to an iframe element. I have no idea if its a bug or I didnt set the config in a right way. Please check it out. Thx.

server side config.json: 

{
  "listen": {
    "ip": "0.0.0.0",
    "port": 2222
  },
  "user": {
    "name": 'root',
    "password": 'password',
    "privatekey": null
  },
  "ssh": {
    "host": '10.10.90.91',
    "port": 22,
    "localAddress": null,
    "localPort": null,
    "term": "xterm-color",
    "readyTimeout": 20000,
    "keepaliveInterval": 120000,
    "keepaliveCountMax": 10,
    "allowedSubnets": []
  },
  "terminal": {
    "cursorBlink": true,
    "scrollback": 10000,
    "tabStopWidth": 8,
    "bellStyle": "sound"
  },
  "header": {
    "text": null,
    "background": "green"
  },
  "session": {
    "name": "WebSSH2",
    "secret": "mysecret"
  },
  "options": {
    "challengeButton": true,
    "allowreauth": true
  },
  "algorithms": {
    "kex": [
      "ecdh-sha2-nistp256",
      "ecdh-sha2-nistp384",
      "ecdh-sha2-nistp521",
      "diffie-hellman-group-exchange-sha256",
      "diffie-hellman-group14-sha1"
    ],
    "cipher": [
      "aes128-ctr",
      "aes192-ctr",
      "aes256-ctr",
      "aes128-gcm",
      "aes128-gcm@openssh.com",
      "aes256-gcm",
      "aes256-gcm@openssh.com",
      "aes256-cbc"
    ],
    "hmac": [
      "hmac-sha2-256",
      "hmac-sha2-512",
      "hmac-sha1"
    ],
    "compress": [
      "none",
      "zlib@openssh.com",
      "zlib"
    ]
  },
  "serverlog": {
    "client": false,
    "server": false
  },
  "accesslog": false,
  "verify": false,
  "safeShutdownDuration": 300
}
Doesn't work in <iframe> elements.
issue
created
vitogrinds
username_0
@billchurch Please check it out. Thanks a lot.
comment
created
dawbit
username_1
@username_0 I have the same problem.
Do you have error:  Menu  WEBSOCKET ERROR - Refresh the browser and try again?
comment
created
vitogrinds
username_0
Yep, same problem.
comment
created
Vinsmoke66
username_2
I have the same problem too...
comment
created
dgomezquilon
username_3
Yes, same problem. Any info?
comment
created
Vinsmoke66
username_2
it need chrome 79 version
comment
created
dgomezquilon
username_3
Yes, but it doesn't a solution.
comment
closed
vvyage
username_4
issue
created
bushev
username_5
Hey @username_6 ,

Did you able to solve this?
comment
reopened
itshxu
username_6
There is an error when I use webssh2 in an iframe element. The error reads **WEBSOCKET ERROR - Refresh the browser and try again**

To fix the bug, I tried to read the code and found that cookies were set when the client.html were sent to a blank tab but not set when it sent to an iframe element. I have no idea if its a bug or I didnt set the config in a right way. Please check it out. Thx.

server side config.json: 

{
  "listen": {
    "ip": "0.0.0.0",
    "port": 2222
  },
  "user": {
    "name": 'root',
    "password": 'password',
    "privatekey": null
  },
  "ssh": {
    "host": '10.10.90.91',
    "port": 22,
    "localAddress": null,
    "localPort": null,
    "term": "xterm-color",
    "readyTimeout": 20000,
    "keepaliveInterval": 120000,
    "keepaliveCountMax": 10,
    "allowedSubnets": []
  },
  "terminal": {
    "cursorBlink": true,
    "scrollback": 10000,
    "tabStopWidth": 8,
    "bellStyle": "sound"
  },
  "header": {
    "text": null,
    "background": "green"
  },
  "session": {
    "name": "WebSSH2",
    "secret": "mysecret"
  },
  "options": {
    "challengeButton": true,
    "allowreauth": true
  },
  "algorithms": {
    "kex": [
      "ecdh-sha2-nistp256",
      "ecdh-sha2-nistp384",
      "ecdh-sha2-nistp521",
      "diffie-hellman-group-exchange-sha256",
      "diffie-hellman-group14-sha1"
    ],
    "cipher": [
      "aes128-ctr",
      "aes192-ctr",
      "aes256-ctr",
      "aes128-gcm",
      "aes128-gcm@openssh.com",
      "aes256-gcm",
      "aes256-gcm@openssh.com",
      "aes256-cbc"
    ],
    "hmac": [
      "hmac-sha2-256",
      "hmac-sha2-512",
      "hmac-sha1"
    ],
    "compress": [
      "none",
      "zlib@openssh.com",
      "zlib"
    ]
  },
  "serverlog": {
    "client": false,
    "server": false
  },
  "accesslog": false,
  "verify": false,
  "safeShutdownDuration": 300
}
Doesn't work in <iframe> elements.
issue
created
itshxu
username_6
@username_5 Sorry, I didn't use this repo anymore. So I've no idea if this problem is solved
comment