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

Autobahn introduced in #426 breaks jrosbridge #488

Closed
moriarty opened this issue Apr 23, 2020 · 9 comments
Closed

Autobahn introduced in #426 breaks jrosbridge #488

moriarty opened this issue Apr 23, 2020 · 9 comments
Labels

Comments

@moriarty
Copy link

Expected Behavior

Breaking changes to wait until the next version

Actual Behavior

Something which was working stopped working

Steps to Reproduce the Problem

Any sample code using jrosbridge should be broken.
Also anything that previously set Origin without a protocol, just host:port in the header.
Possibly other things.

Specifications

  • ROS Version: Melodic
  • Rosbridge Version: breaking version is 0.11.4
@mvollrath
Copy link
Contributor

Are there any relevant errors in the logs?

@moriarty
Copy link
Author

I can try to setup a mock example to generate a log.

I think I commented in #426 with a link to the function in Autobahn which is complaining.

With wireshark we found the websocket header was not specifying the protocol in the Origin field, so Autobahn fails to parse the host.

Inserting a small proxy between code that was running and the a rosbridge websocket server >= 11.4 and adding the protocol to the header is making it work.

@mvollrath
Copy link
Contributor

Sorry that this changed when it did.

jrosbridge has a couple of options for both maintaining spec conformance (RFC6454, RFC6455) and working with rosbridge/Autobahn:

If you haven't already, try jrosbridge against 0.11.5 which should allow missing or null origin by default.

@mvollrath
Copy link
Contributor

@moriarty is 0.11.5 working for you?

@zheolls
Copy link

zheolls commented May 16, 2020

@moriarty is 0.11.5 working for you?

I upgraded to 0.11.5, but it still error.

@moriarty
Copy link
Author

No 0.11.5 does not work. Which is why I titled the issue 0.11.4 & newer.

The two “fixes” state - omit the origin field, or set it to null. But the field was set, it is not omitted nor null, but it is set without the “ws://“

Adding a proxy and appending the “ws://“ seems to be the only way- I don’t see a configuration only change to get back to the original behaviour. #426 (comment)

Unfortunately I likely won’t look into this any further- the proxy is a quick work around until the use of jrosbridge and rosbridge is removed.

@zheolls
Copy link

zheolls commented May 17, 2020

@moriarty I seem to have solved the problem, just update the dependency of jrosbridge.

<dependency>
	<groupId>org.glassfish.tyrus</groupId>
	<artifactId>tyrus-client</artifactId>
	<version>1.17</version>
</dependency>

<dependency>
	<groupId>org.glassfish.tyrus</groupId>
	<artifactId>tyrus-container-grizzly-client</artifactId>
	<version>1.17</version>
</dependency>

<dependency>
	<groupId>org.glassfish.tyrus</groupId>
	<artifactId>tyrus-server</artifactId>
	<version>1.17</version>
</dependency>

@moriarty
Copy link
Author

@zheolls if that works I’m sure @rctoris would not mind a PR to fix this issue rctoris/jrosbridge#26 he’s usually busy and doesn’t actively maintain/test that repo but he might merge it

@github-actions
Copy link

This issue has been marked as stale because it has been open for 180 days with no activity. Please remove the stale label or add a comment to keep it open.

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

No branches or pull requests

3 participants