Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update useDashboardWebSocket to consider url.pathname #3227

Closed
oguzhanakan0 opened this issue Mar 14, 2023 · 7 comments
Closed

Update useDashboardWebSocket to consider url.pathname #3227

oguzhanakan0 opened this issue Mar 14, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request stale No recent activity has been detected on this issue/PR and it will be closed

Comments

@oguzhanakan0
Copy link

Problem

I'm trying to serve Steampipe dashboard under <myhost>/steampipe. This is causing a websocket connection failure error because it assumes my websocket server is in root (eg wss://<myhost>/ws), which fails eventually.

Error

main.e5f5fea6.js:2 WebSocket connection to 'wss://<myhost>/ws' failed: 
t.createOrJoinSocket @ main.e5f5fea6.js:2
....
VM94 react_devtools_backend.js:2655 Max reconnect attempts of 10 exceeded

Solution suggestion

I assume updating useDashboardWebSocket.ts#L45 with

return `${url.protocol === "https:" ? "wss" : "ws"}://${url.host}${url.pathname=="/"?"":url.pathname}/ws`;

would do the trick. I am not aware of any potential side effects though.

@oguzhanakan0 oguzhanakan0 added the enhancement New feature or request label Mar 14, 2023
@e-gineer
Copy link
Contributor

Interesting catch @oguzhanakan0 ... have you tried making the change? We'd be open to a PR for this if you have a chance to try and test it.

@MichaelBurgess
Copy link
Contributor

@oguzhanakan0 I don't see there'd be any real side-effect from this.

I'm happy to review this if you're OK to raise a PR as @e-gineer suggested.

@oguzhanakan0
Copy link
Author

Thanks for your comments, will raise a PR this week.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale No recent activity has been detected on this issue/PR and it will be closed label May 14, 2023
@ajoga
Copy link

ajoga commented Jun 9, 2023

Hey, i'm giving a +1 to this issue to remove the stale label :)

I'm trying to serve it through a reverse proxy that will serve the dashboard at hostname.tld/somepath, and all assets seems to be absolutely linked with href="/asset" (js files, css..) so the dashboard does not load at all:

image

@github-actions github-actions bot removed the stale No recent activity has been detected on this issue/PR and it will be closed label Jun 10, 2023
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale No recent activity has been detected on this issue/PR and it will be closed label Aug 10, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 90 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale No recent activity has been detected on this issue/PR and it will be closed
Projects
None yet
Development

No branches or pull requests

4 participants