[Pkg-javascript-devel] Bug#1016732: node-sockjs throws: TypeError: Cannot read properties of undefined (reading 'addEventListener') at WebSocketReceiver.setUp

Nilesh Patra nilesh at debian.org
Wed Aug 10 18:32:39 BST 2022


Hi,

Sorry to bother you over this again, but would you have any idea?
I'd be OK with a workaround if you don't have the bandwidth at the moment, but this
seems to come from coffee related modifications only.

On Sun, 7 Aug 2022 11:42:45 +0530 Nilesh Patra <nilesh at debian.org> wrote:
> On 8/7/22 11:04 AM, Yadd wrote:
> > On 06/08/2022 14:59, Nilesh Patra wrote:
> >> Yadd,
> >>
> >> Since you added in coffeescript patch for this package, I'd highly appreciate if
> >> you could consider taking a look.
> > 
> > Hi,
> > 
> > is there a test somewhere to see this error ?
> 
> I'm not aware of any specific test that could trigger this code unfortunately, but I can reproduce
> it on running shiny-server.
> (Sorry for the long procedure)
> 
> | # apt install shiny-server
> | # cd /srv
> | # mkdir -p shiny-server
> | # cd shiny-server
> | # mkdir covid
> | # cd covid
> | # wget https://raw.githubusercontent.com/eebrown/covidprobability_shiny/main/app.R
> | # R -e 'install.packages(c("covidprobability", "shinyjs"))'
> | # # Start shiny server
> | # shiny-server
> |
> |  ===> This will start on localhost:3838. Migrate to localhost:3838/covid, click on any of the bars and you will see this on terminal
> |
> | [2022-08-06T23:03:16.777] [INFO] shiny-server - Shiny Server v1.5.19.0 (Node.js v18.6.0)
> | [2022-08-06T23:03:16.779] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
> | [2022-08-06T23:03:16.830] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
> | [2022-08-06T23:03:16.836] [INFO] shiny-server - Starting listener on http://[::]:3838
> | [2022-08-06T23:03:33.825] [ERROR] shiny-server - Uncaught exception: TypeError: Cannot read properties of undefined (reading 'addEventListener')
> | [2022-08-06T23:03:33.829] [ERROR] shiny-server - TypeError: Cannot read properties of undefined (reading 'addEventListener')
> | at WebSocketReceiver.setUp (/usr/share/nodejs/sockjs/lib/trans-websocket.js:76:24)
> | at new GenericReceiver (/usr/share/nodejs/sockjs/lib/transport.js:313:12)
> | at new WebSocketReceiver (/usr/share/nodejs/sockjs/lib/trans-websocket.js:63:9)
> | at ws.onopen (/usr/share/nodejs/sockjs/lib/trans-websocket.js:31:55)
> | at WebSocket.dispatchEvent (/usr/share/nodejs/faye-websocket/lib/faye/websocket/api/event_target.js:24:30)
> | at WebSocket._open (/usr/share/nodejs/faye-websocket/lib/faye/websocket/api.js:144:10)
> | at Hybi.<anonymous> (/usr/share/nodejs/faye-websocket/lib/faye/websocket/api.js:35:49)
> | at Hybi.emit (node:events:513:28)
> | at Hybi._open (/usr/share/nodejs/websocket-driver/lib/websocket/driver/base.js:148:10)
> | at Hybi.start (/usr/share/nodejs/websocket-driver/lib/websocket/driver/base.js:105:34)
> | [2022-08-06T23:03:33.839] [INFO] shiny-server - Stopping listener on http://[::]:3838
> | [2022-08-06T23:03:33.839] [INFO] shiny-server - Shutting down worker processes (with notification)
> | /usr/lib/shiny-server/lib/main.js:391
> |   throw err;
> |   ^
> |
> | TypeError: Cannot read properties of undefined (reading 'addEventListener')
> | at WebSocketReceiver.setUp (/usr/share/nodejs/sockjs/lib/trans-websocket.js:76:24)
> | at new GenericReceiver (/usr/share/nodejs/sockjs/lib/transport.js:313:12)
> | at new WebSocketReceiver (/usr/share/nodejs/sockjs/lib/trans-websocket.js:63:9)
> | at ws.onopen (/usr/share/nodejs/sockjs/lib/trans-websocket.js:31:55)
> | at WebSocket.dispatchEvent (/usr/share/nodejs/faye-websocket/lib/faye/websocket/api/event_target.js:24:30)
> | at WebSocket._open (/usr/share/nodejs/faye-websocket/lib/faye/websocket/api.js:144:10)
> | at Hybi.<anonymous> (/usr/share/nodejs/faye-websocket/lib/faye/websocket/api.js:35:49)
> | at Hybi.emit (node:events:513:28)
> | at Hybi._open (/usr/share/nodejs/websocket-driver/lib/websocket/driver/base.js:148:10)

-- 
Best,
Nilesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20220810/5e85cb5f/attachment.sig>


More information about the Pkg-javascript-devel mailing list