hack.chat icon indicating copy to clipboard operation
hack.chat copied to clipboard

JS Popup for Username not Working!

Open NoorQureshi opened this issue 9 years ago • 18 comments

Hello I'm able to install it on my Localhost to test this code. it worked and when i change my url to new group or channel i got no popup for Adding Name and Nothing else working, can't message etc Javascripts not working.

NoorQureshi avatar Oct 11 '15 16:10 NoorQureshi

Odd. Is anything showing up in the web console? (Ctrl-Shift-K)

AndrewBelt avatar Oct 11 '15 20:10 AndrewBelt

Everything Else Working fine! Just didn't saw Popup for username! Because of that Messages isn't showing up as well!

http://i.imgur.com/0xgYt09.png

NoorQureshi avatar Oct 11 '15 23:10 NoorQureshi

It's either not connecting to the websocket server, or localstorage is causing a problem. In either case, a stack should be printed to the web console. So nothing is there?

AndrewBelt avatar Oct 12 '15 00:10 AndrewBelt

Starting up http-server, serving ./ Available on: http:127.0.0.1:8080 http:192.168.1.50:8080 Hit CTRL-C to stop the server [Tue, 13 Oct 2015 11:17:34 GMT] "GET /?banana" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36"

NoorQureshi avatar Oct 13 '15 11:10 NoorQureshi

Oh, sorry, I mean the Web Console in the browser. In Firefox and Chrome, this can be launched with Ctrl-Shift-K. Give the page a refresh and at the minimum a warning from KaTeX should be printed in the console.

AndrewBelt avatar Oct 13 '15 22:10 AndrewBelt

This : WebSocket connection to 'ws://localhost:6060/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

NoorQureshi avatar Oct 14 '15 09:10 NoorQureshi

you need to start the chat server AND the webserver looks like you only started the web (http-server) to me. Try node server.js in the hack.chat source root directory

M4GNV5 avatar Oct 14 '15 11:10 M4GNV5

Thank you for helping me out man! It worked! Just waiting for more update like Register Username :) Else it's really nice code, simple the better, fast and perfect.

NoorQureshi avatar Oct 14 '15 13:10 NoorQureshi

Now this after installing on centos vps 3gb ram

[email protected] start /root/hack.chat node server.js

/root/hack.chat/server.js:87 for (var client of server.clients) { ^^ SyntaxError: Unexpected identifier at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3

npm ERR! [email protected] start: node server.js npm ERR! Exit status 8 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is most likely a problem with the hack.chat package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node server.js npm ERR! You can get their info via: npm ERR! npm owner ls hack.chat npm ERR! There is likely additional logging output above. npm ERR! System Linux 2.6.32-042stab093.4 npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! cwd /root/hack.chat npm ERR! node -v v0.10.30 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /root/hack.chat/npm-debug.log npm ERR! not ok code 0

NoorQureshi avatar Oct 15 '15 21:10 NoorQureshi

update ur node installation, i bet you dont have an ES6 compatible engine yet so it says for ofis invalid

M4GNV5 avatar Oct 16 '15 00:10 M4GNV5

mine says "

for (var client of server.clients) { ^^ SyntaxError: Unexpected identifier at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 " How do i fix this?

The-MAsterV avatar Nov 01 '15 16:11 The-MAsterV

update your node installation (on debian based distros: apt-get update && apt-get upgrade --only-upgrade nodejs)

M4GNV5 avatar Nov 01 '15 20:11 M4GNV5

now it is :

for (var client of server.clients) { ^^ ("^^" is under "of") SyntaxError: Unexpected identifier at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3

The-MAsterV avatar Nov 01 '15 21:11 The-MAsterV

still the same answer: u need to update your node installation

M4GNV5 avatar Nov 01 '15 21:11 M4GNV5

@M4GNV5 Is right. Run node --version. If the version is less than 0.12, which is the Debian/Ubuntu default, Node will not support Ecmascript 6 features like "for of". You could upgrading using his method, or use the up-to-date binaries on the Node.js website (https://nodejs.org/)

AndrewBelt avatar Nov 01 '15 22:11 AndrewBelt

I got the same issue though it works outside of work network though the regular hack.chat site works just fine. Any ideas?

josdmyer avatar Dec 06 '16 00:12 josdmyer

How to keep the client and server running?

NoorQureshi avatar Jan 14 '17 16:01 NoorQureshi

I use Forever, but you can use whatever you want.

AndrewBelt avatar Jan 14 '17 22:01 AndrewBelt