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

Our apps break using the package >= v1.8.8 #410

Closed
oderwat opened this issue Oct 25, 2023 · 10 comments
Closed

Our apps break using the package >= v1.8.8 #410

oderwat opened this issue Oct 25, 2023 · 10 comments
Labels
Milestone

Comments

@oderwat
Copy link

oderwat commented Oct 25, 2023

Hi @nhooyr,

we just spent some hours searching an error in our application which resulted from the "patch" update from v1.8.7 to v.1.8.8. Besides the problem (which is of unclear origin by now), I wonder a bit that two years of development get releases as a patch increase.

Anyway. With the new code we get "read limited at -1 bytes" in the upstream error message. The code we use seems not to be too sophisticated, but we have a hard time to debug what is going wrong.

Gladly we have some public demonstration code that exposes the same problem:

https://github.com/oderwat/go-nats-app/

If one changes the nhooyr.io/websocket from v1.8.7 to v1.8.9 (or v1.8.8) the connection returns the same error.

Because of the massive amount of changes we would really like if you could check out what may go wrong here, as you likely remember what change may introduce the problem on our (or your) side.

Related code is most likely here

@nhooyr
Copy link
Contributor

nhooyr commented Oct 25, 2023

Yea def should have upped the minor instead of a patch but welp. It wasn't really two years of development though more like a few weeks of mainly bug fixes, just was super delayed.

Looking into it.

@nhooyr
Copy link
Contributor

nhooyr commented Oct 25, 2023

Not sure how that error is even possible. -1 means this code should run instead: https://github.com/nhooyr/websocket/blob/b4e4f4f12ee47d9827cee352c52b612944bad6bf/read.go#L485

Thus never entering this branch here which is where your error is coming from https://github.com/nhooyr/websocket/blob/b4e4f4f12ee47d9827cee352c52b612944bad6bf/read.go#L489

@nhooyr
Copy link
Contributor

nhooyr commented Oct 25, 2023

Oh this is in WASM!

@oderwat
Copy link
Author

oderwat commented Oct 25, 2023

Yes, your web socket package is the one that always worked so well for us.

nhooyr added a commit that referenced this issue Oct 25, 2023
Whoops, updates #254 and closes #410
@nhooyr
Copy link
Contributor

nhooyr commented Oct 25, 2023

Pushed a fix to dev 454aee8

Can you try to confirm it fixes the issue? If it does, I'll make a v1.8.10 release.

@nhooyr nhooyr added this to the v1.8.10 milestone Oct 25, 2023
@oderwat
Copy link
Author

oderwat commented Oct 25, 2023

I can confirm that the change fixes it.

@nhooyr
Copy link
Contributor

nhooyr commented Oct 25, 2023

Sweet, will release now.

@nhooyr nhooyr closed this as completed Oct 25, 2023
@oderwat
Copy link
Author

oderwat commented Oct 25, 2023

It does not yet find the release. I guess that is because the "nhooyr.io/websocket" repository is not yet synced?

@nhooyr
Copy link
Contributor

nhooyr commented Oct 25, 2023

The go module proxy does take some time. If you turn off the proxy with GOPROXY=direct or GOPRIVATE=nhooyr.io/websocket it should work.

@oderwat
Copy link
Author

oderwat commented Oct 25, 2023

Yeah, that thing drove me nuts in the past already. TY for the headsup.

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

2 participants