xirdev / xirsys-nodejs

Querying the Xirsys API with Nodejs
0 stars 0 forks source link

server.js issue #1

Open Rejzor opened 7 years ago

Rejzor commented 7 years ago

Problem with server.js

When I'm trying login on https://localhost:8000/webrtc.html I got error message

Server on Port 8000
req:  GET  for:  /webrtc.html
req:  GET  for:  /css/video-call.css
req:  GET  for:  /xirsys_connect.js
req:  GET  for:  /lib/xirsys.core.js
req:  GET  for:  /lib/xirsys.signal.js
req:  GET  for:  /lib/xirsys.api.js
req:  GET  for:  /lib/xirsys.p2p.adapter.js
req:  GET  for:  /lib/xirsys.p2p.js
req:  GET  for:  /images/full-screen.png
req:  POST  for:  /webrtc/signal/token
GET SIGNAL TOKEN!
User request RTC Token username:  dssdds
RTC Token! /webrtc/signal/token {"s":200,"p":"/signal/token","e":null,"d":{"token":"ZCwtNEZcyTxVP0tLr_XZValWZQwDJ1t_aZSMjvy8o7oAwxEV53Pl3d_oF0TDYJmntDpzxdWahTGeS--hwb2J3gjUcT6QR4j_1xZ0-T1cg0NNbx_KL1dqmz_tE6qxOMXtK33tOx3bL72CMIPBfj0HP0RHPus0Z-X792FbnIj_-tSAFfrsiCuZrkexYA"}}

http.js:1166
      var keys = Object.keys(obj);
                        ^
TypeError: Object.keys called on non-object
    at Function.keys (native)
    at ServerResponse.writeHead (http.js:1166:25)
    at IncomingMessage.<anonymous> (/var/www/html/rarez_site/webrtc/test/xirsys-nodejs/xirsys_node_v2/server.js:74:21)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)
jerrychabolla commented 7 years ago

Hey Rejzor, Thanks for notifying us. I will look into this.

jerrychabolla commented 7 years ago

Hey Rejzor, I'm unable to reproduce the error, looks like its an error within the https module. Have you tried making your own Self-Signed certificate and key? I used OpenSSL for the demo.