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

meshcat in react #106

Open
emsoft1 opened this issue Oct 6, 2021 · 2 comments
Open

meshcat in react #106

emsoft1 opened this issue Oct 6, 2021 · 2 comments

Comments

@emsoft1
Copy link

emsoft1 commented Oct 6, 2021

hi @rdeits
I need your help I want to use Meshcat inside a react component. before I change the HTML file in the Meshcat folder to add more abject but now I like to work with Mechcat inside the react component. is there any trick or tips you have for doing this?
please tell me if you need more details.
best regards mehrdad

@emsoft1
Copy link
Author

emsoft1 commented Oct 6, 2021

I find a way to run the visualizer on the react, and I have a viewer on the frontend. but the issue is I get a web socket error 1006
(onclose event ) .
I get the same error if I run the HTML file in the dist folder alone or on another server app.
I test the WebSocket on the postman, and it works, but I get the 1006 error in the browser even if I write a simple code to connect this WebSocket.
This error happens as a restriction on the browser, and I think it is possible to solve it if we reduce the restriction in the server. I need help to solve the issue.
How to set the server to allow any domain (local ) or host can connect to this server.
In javascript, we have 'Access-Control-Allow-Origin.' Maybe there is a similar option here?

@emsoft1
Copy link
Author

emsoft1 commented Oct 13, 2021

@nim65s @jcarpent @wxmerkt
any body can answer me here, please .?

I find a way to run the visualizer on the react, and I have a viewer on the frontend. but the issue is I get a web socket error 1006 (onclose event ) . I get the same error if I run the HTML file in the dist folder alone or on another server app. I test the WebSocket on the postman, and it works, but I get the 1006 error in the browser even if I write a simple code to connect this WebSocket. This error happens as a restriction on the browser, and I think it is possible to solve it if we reduce the restriction in the server. I need help to solve the issue. How to set the server to allow any domain (local ) or host can connect to this server. In javascript, we have 'Access-Control-Allow-Origin.' Maybe there is a similar option here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant