Skip to content

Conversation

@pablopilotti
Copy link

User-Facing Changes

Fixed TeleopPanel crash that occurred when publishing messages under certain conditions. The panel now properly re-advertises topics before publishing to ensure stability.

Description
Fixes a crash in TeleopPanel that occurred when attempting to publish messages. The issue was caused by the topic not being properly advertised before publishing operations.

The fix adds re-advertisement of the topic in the useLayoutEffect hook before publishing messages to ensure the topic is available and prevent crashes.

Fixes #554

Checklist

• [ X] The web version was tested and it is running ok
• [ X] The desktop version was tested and it is running ok
• [ ] This change is covered by unit tests
• [ ] Files constants.ts, types.ts and *.style.ts have been checked and relevant code snippets have been relocated

@aneuwald-ctw
Copy link
Contributor

Hello @pablopilotti, thanks for reaching out.

Look, in my setup I couldn't reproduce your problem, could you share how you created the connection to Lichtblick?

Another thing is, I don't think re-advertise is a good solution. It should advertise in the first time right? we have to investigate why it is not working and find a properly solution in my opinion.

@pablopilotti
Copy link
Author

Hello @aneuwald-ctw
I agree with you, it may not be the best solution.
I am launching my simulation. Then I run foxglove_bridge version 0.6.3, and finally I launch Lichtblick and connect to ws:
//localhost:8765

What is the default setup for testing live connections?

@aneuwald-ctw aneuwald-ctw added the bug Something isn't working label Jul 16, 2025
@gabriela-almeida-ctw gabriela-almeida-ctw changed the base branch from main to develop August 8, 2025 14:51
@gabriela-almeida-ctw gabriela-almeida-ctw changed the base branch from develop to main August 8, 2025 16:28
@pablopilotti
Copy link
Author

@aneuwald-ctw
What is the default setup for testing live connections?

@gabriela-almeida-ctw gabriela-almeida-ctw changed the base branch from main to develop August 29, 2025 10:31
@luluiz
Copy link
Member

luluiz commented Oct 13, 2025

@pablopilotti Hi
We usually test using the server example in ws-protocol, the one in python directory

@ctw-joao-luis
Copy link
Contributor

Hey @pablopilotti I've opened a PR #882 with a potential fix to this issue. There's a more detailed explanation there but basically there were timing issues between the advertising to the topic and publishing messages via Teleop. Check it out if you're able to.
Cheers,
JL

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

None yet

Development

Successfully merging this pull request may close these issues.

TeleopPanel crashes when publishing messages under certain conditions

4 participants