butlerx / wetty

Terminal in browser over http/https. (Ajaxterm/Anyterm alternative, but much better)
https://butlerx.github.io/wetty
MIT License
4.2k stars 665 forks source link

Black screen on fresh install #513

Closed Kptainflintt closed 6 days ago

Kptainflintt commented 9 months ago

Rebuilding my old docker with wetty. Working fine before, not now

To Reproduce Built with this Dockerfile :

FROM kalilinux/kali-rolling
RUN apt-get update
RUN apt-get install -y libncurses-dev flex libssl-dev libelf-dev bc bison curl build-essential python3 git make gcc g++ gnupg2
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y sudo nodejs
RUN npm -g i wetty
RUN apt-get install -y net-tools netcat-traditional john nmap vim hydra zip telnet ftp steghide tcpdump
ENTRYPOINT ["wetty","-p","3000","-b","/","--allow-iframe"]
EXPOSE 3000

tested with yarn or npm install, same result

If I make a cURL I got a response :

curl http://172.26.5.30:8080
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <link rel="icon" type="image/x-icon" href="/favicon.ico">
    <title>WeTTY - The Web Terminal Emulator</title>
    <link rel="stylesheet" href="/assets/css/styles.css" />
<link rel="stylesheet" href="/assets/css/options.css" />
<link rel="stylesheet" href="/assets/css/overlay.css" />
<link rel="stylesheet" href="/assets/css/terminal.css" />
  </head>
  <body>
    <div id="overlay">
      <div class="error">
        <div id="msg"></div>
        <input type="button" onclick="location.reload();" value="reconnect" />
      </div>
    </div>
    <div id="options">
      <a class="toggler"
         href="#"
         alt="Toggle options"
       ><i class="fas fa-cogs"></i></a>
      <iframe class="editor" src="/assets/xterm_config/index.html"></iframe>
    </div>
    <div id="terminal"></div>
    <script type="module" src="/client/wetty.js"></script>
  </body>
</html>

If I test opened ports on the container :

# netstat -aon
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       Timer
tcp        0      0 0.0.0.0:3000            0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp        0      0 127.0.0.11:40231        0.0.0.0:*               LISTEN      off (0.00/0/0)
udp        0      0 127.0.0.11:34854        0.0.0.0:*                           off (0.00/0/0)
Active UNIX domain sockets (servers and established)

So, wetty is up, but screen still black :

image

Tested on Firefox, Edge and K-meleon

ptorrent commented 9 months ago

same here

RyanRosario commented 9 months ago

Also having this problem

RyanRosario commented 9 months ago

For now, you can just downgrade the version

sudo npm -g install wetty@2.6.0

Works for me.

SteelAlloy commented 8 months ago

same issue here

Laphatize commented 8 months ago

Running Wetty from source on my machine also results in a black screen.

gardiol commented 7 months ago

Same issue here. Tried downgrading with no result. It complains (in firefox javascript console) that "Uncaught TypeError: Error resolving module specifier “@fortawesome/fontawesome-svg-core”. Relative module specifiers must start with “./”, “../” or “/”." but the fontawesome modules are installed (npm i --save @fortawesome/fontawesome-svg-core) so... clueless.

gardiol commented 7 months ago

Additional note: i have installed on bare metal, no docker.

Malacarne commented 7 months ago

Same issue here

iskandercod commented 6 months ago

For now, you can just downgrade the version

sudo npm -g install wetty@2.6.0

Works for me.

Thanks, brooo It works.

yong-ya commented 6 months ago

We're encountering a very similar issue with 2.7.0 running on Ubuntu 23.04. When the OS is restarted Wetty initially will work fine but after a while it will stop (again for a while) and then recover. It does this in cycles.

During the time that it is not working, we've noticed that it pegs the CPU at 100%. This continues for anywhere from two to fifteen minutes and then it recovers. When the CPU drops back down, Wetty again responds.

Throughout the entire time a web request to the "home" page will work, but files referenced from there (js, css) will not, hence a "black" or "white" page without any functionality.

We've downgraded to version 2.6.0 and are now testing...

Unfortunately, the downgrade had no apparent impact. We still see the same behavior.

gardiol commented 3 months ago

npm -i wetty@2.6.0

seems to fix with a downgrade.

MustagheesButt commented 1 month ago

Facing same issue, fresh install no docker. Tested on chrome. Same error in console as @gardiol described. Downgrade to 2.6.0 works.

Laphatize commented 1 month ago

It seems the issue is due to the wetty client not being able to load in the resources it needs. I'll take a look and see if I can make a PR.