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

websocket server sends duplicate message headers in protos response #246

Open
mjay-cr opened this issue Feb 8, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@mjay-cr
Copy link

mjay-cr commented Feb 8, 2024

Environment

  • OS Version: Ubuntu 20.04
    Binary gz-harmonic package from ubuntu-stable

Description

  • Expected behavior: Running shapes.sdf simulation, then websocket server and connecting with web app shows visualisation of simulation in browser.
  • Actual behavior: Nothing happens when you click connect, looking at console log gives error.

Steps to reproduce

  1. Install gz-harmonic
  2. On a terminal run gz sim -v 4 -s -r shapes.sdf
  3. In another terminal run gz launch -v 4 /usr/share/gz/gz-launch7/configs/websocket.gzlaunch
  4. Go to web app and click connect

Output

If you open up the dev-tools on the browswer and then look at console, you will see the error:

ERROR Error: duplicate name 'Any' in Namespace .gz.msgs
    add namespace.js:240
    parseType parse.js:354
    parseCommon parse.js:261
    parse parse.js:790
    onloadend gzweb.module.js:11673

Switching to network and filtering by WebSocket requests, you will see that gzweb sends protos request. (Looking at the gz_launch console log will also show that it has been received). Then the response, when viewed as UTF-8 will see the proto headers sent below. After Wrench message it seems to repeat? Response from gz-garden and gz-harmonic are attached. Note: that the web visualisation works with garden and fortress (as per the steps above)

gz-garden-response.txt
gz-harmonic-response.txt

Not sure if these duplicate headers are the problem but seems like a bug

@mjay-cr mjay-cr added the bug Something isn't working label Feb 8, 2024
@hughlv
Copy link

hughlv commented Apr 29, 2024

Before this issue gets solved, what is the best workaround? I need to run gazebo as a websocket server so I can use gzweb2 to render on webpage.

@mjay-cr
Copy link
Author

mjay-cr commented Apr 29, 2024

Before this issue gets solved, what is the best workaround? I need to run gazebo as a websocket server so I can use gzweb2 to render on webpage.

Not sure if this is helpful but my current "workaround" is to just not migrate to harmonic, this is the only thing that is stopping me from migrating from fortress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

3 participants