RTview and ws:// Socket Connection Error

I’m trying to use RTview on an external web server separate from my test node and running into an error with one of the .js files from RTview. The error I’m getting is:

"haskell.js:82 Uncaught DOMException: Failed to construct 'WebSocket': The URL 'ws:://xxx.xxxxxxx.xxx/websocket/' is invalid."

The issue has to do with one of RTview’s javascript files wanting to connect via websocket using an unencrypted websocket connections. My server is using certificates. I was able to override the haskell.js file to change the ws to wss using the Chrome inspector tools, but I know this is a really hacky way of doing it.

Has anyone run into this issue or have any suggestions themselves? This issue is also out there on Github (support https (and wss:// schema) · Issue #124 · input-output-hk/cardano-rt-view · GitHub). Do I have wait for a bugfix? Has anyone has any success in getting RTview flawlessly working on an external web server?

1 Like

i will get back to you when I installed this for my node - thanks for letting me know about this project

1 Like

Thank you. If you make any headway, I’m curious to hear how you configured your web server. I feel like maybe there’s something missing with my Nginx reverse proxy.

Another item of interest is that it looks like it comes down to a bug in the threepenny-gui library that RTview is using: threepenny-gui/comm.js at master · dailyinvention/threepenny-gui · GitHub

This javascript file doesn’t take into account https://. I’m going to fork it and see if I can get in PR for that change for the threepenny-gui. Maybe then we can that addressed for RTView.

1 Like

It looks like the owner of threepenny-gui made some fixes to the intial repo.

It still is somewhat broken, but ended up fixing it myself. Rather than waiting for everything to get applied to rt-view, I ended up building the two packages together. Maybe in the future it will get resolved for us using this over https://. On the plus side, I learned a little bit about building packages with cabal.

Here are the steps I followed on Ubuntu Linux if you’re interested:

  1. Install cabal: `sudo apt install cabal-install
  2. Create directory for repos: mkdir rt-view && cd rt-view
  3. Clone threepenny-gui repo: git clone https://github.com/HeinrichApfelmus/threepenny-gui.git
  4. Clone cardano-rt-view repo: git clone https://github.com/input-output-hk/cardano-rt-view.git && cd threepenny-gui
  5. Edit comm.js file: nano js/comm.js
  6. On line 21 change '/websocket/' to 'websocket/'
  7. Save and exit
  8. Edit .cabal file: nano threepenny-gui.cabal
  9. Update version to something like ‘0.9.1.0’
  10. Save and exit
  11. Configure and build threepenny-gui (address missing package errors that might occur with apt): cabal new-configure && cabal new-build
  12. Exit and open cabal.project in cardano-rt-view: cd ../cardano-rt-view && nano cabal.project
  13. Under ‘packages’ add another line to the list to reference threepenny-gui: ../threepenny-gui/*.cabal
  14. Save and exit
  15. Configure and build cardano-rt-view (address missing package errors that might occur with apt) : cabal new-configure && cabal new-build
  16. After the build completes successfully the last response should have the location of the working cardano-rt-view binary
1 Like

Using https with RTView would be absolutely great. I posted an issue on github months ago - nothing’s moving until now…

1 Like

@hanswurst, I hope the project isn’t dead because I spent a good deal of time on this yesterday just so a small bit of javascript could be fixed. LOL!

Hi!

just installed rtview…
but I have the same issue as described here:

Any hint how to debug this? Thx

Never had this exact problem. Though I have had these full queues earliert wenn RT-View was not reachable for some time. Since 0.3 this (at least) was resolved for me. Sorry I cannot really help much here.

1 Like

Sorry for the late response. I did not run into this issue, but it looks like you found a solution. Congrats!

1 Like