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

Update WebSockets library #1030

Closed
fassko opened this issue Feb 20, 2020 · 20 comments
Closed

Update WebSockets library #1030

fassko opened this issue Feb 20, 2020 · 20 comments
Assignees
Milestone

Comments

@fassko
Copy link
Contributor

fassko commented Feb 20, 2020

Need to check before what's up with latest Starscream version because it has several issues.

@designatednerd
Copy link
Contributor

@fassko You thinking Starscream 4.x here?

@fassko
Copy link
Contributor Author

fassko commented Feb 23, 2020

@designatednerd Yep Starscream 4.x

@fassko
Copy link
Contributor Author

fassko commented Apr 20, 2020

Seems that 4.x version is more stable and I will move with this in coming week(s) :)

@sneakyness
Copy link

Is there anything Starscream 4.x does that URLSessionWebSocketTask doesn't? Pending the update to that I think I might try to get a fork going that conditionally uses it if iOS 13.

@designatednerd
Copy link
Contributor

My recollection is that Starscream is already doing that under the hood - @fassko you'd know better than me, can you confirm?

@fassko
Copy link
Contributor Author

fassko commented May 12, 2020

Yes, just need to release to cocoapods. SwiftPM should be fine. Just need to test it, just sadly I'm not using it on day-to-day development anymore myself.

@designatednerd
Copy link
Contributor

Fiiiiinally upgraded with #1394

@designatednerd designatednerd added this to the Next Release milestone Sep 16, 2020
@designatednerd
Copy link
Contributor

JK, undoing with #1395 - I need to have more time than I've got right now to get into what's happening with these changes under the hood, because they remove a bunch of stuff that we've been using and after a fairly significant amount of fighting I was able to get it to build, but not get it anywhere near passing tests.

@designatednerd designatednerd removed this from the 0.34.0 milestone Sep 29, 2020
@mtbohm
Copy link

mtbohm commented Oct 24, 2020

Any updates on this? We would love to use this library but we are currently stuck with a dependency conflict here.

@designatednerd
Copy link
Contributor

Unfortunately at the moment we're focused elsewhere, but would be more than happy to take a look at a PR!

@yayang
Copy link

yayang commented Nov 9, 2020

Hi, I have met a socket issue, too.
sometimes the connect doesn't receive anything from server side, but webpage and android work well.
In my app, 2 parts use socket to fetch server data, one works well, but the other works bad sometimes.
Is that the same problem with this issue?

And I have found that you moved to starscream 4.x in 1394 and rollbacked in 1395...

@designatednerd
Copy link
Contributor

Yep, the rollback was what "JK, undoing in 1395" in the next comment after woo hoo meant. 🤦‍♀️

Can you please open a separate ticket with more details about your issue, including what happens when it "works bad"? That's almost certainly a different problem.

@yayang
Copy link

yayang commented Nov 10, 2020

Yep, the rollback was what "JK, undoing in 1395" in the next comment after woo hoo meant. 🤦‍♀️

Can you please open a separate ticket with more details about your issue, including what happens when it "works bad"? That's almost certainly a different problem.

Thank you for your quick reply, I can't reproduce it now.
But still I think it may occur under some vpn.

One thing I do can reproduce is that, at the beginning of app launching time(about 1-2 seconds), the request sent by apollo-ios could not receive any response. So for now, I have to delay all request from apollo-ios to avoid the problem.

@designatednerd
Copy link
Contributor

That, I've got no idea on. If you're able to create a more detailed example can you please open a separate issue? Thank you.

@MatejBalantic
Copy link

Hey all, thanks for keeping this project running.

Just wanted to add that we are also locked into dependency conflict between apollo-ios and another library, over the starscream.

I know that adding just another +1 isn't helpful; I'd consider contributing a PR, but given I don't really have much context on how Apollo uses websockets and that @designatednerd couldn't get this done despite a relatively large effort, I don't really feel qualified.

Maybe we could start a branch with what was already done and I can try helping to push this thing forward.

@MatejBalantic
Copy link

For anyone in our situation: as a workaround, if you are not using the Apollo framework that relies on starscream (e.g. ApolloWebSocket) you can get away by forking the apollo-ios, bumping the starscream to 4.0 and then importing this fork as your dependency.

Obviously everything that is using starscream would be broken until this issue is closed, but at least you can unblock yourself if you are not actually using the Apollo frameworks that rely on this dependecy.

@designatednerd
Copy link
Contributor

I would welcome a PR - my failure should not be interpreted as anything other than "I haven't worked with websockets much and I thought this was going to be a one-afternoon thing and got very frustrated when it became clear it wasn't because I have 37 million other things to do".

@designatednerd
Copy link
Contributor

Took a second stab with #1659, if anyone on this thread has thoughts on the issue I ran into but couldn't figure out, would love to hear them!

@designatednerd designatednerd added this to the Next Release milestone Feb 19, 2021
@designatednerd
Copy link
Contributor

Shipped (at last) with 0.42.0

@MatejBalantic
Copy link

Thanks so much for your hard work and for figuring this one out, it really unblocked us. It's a bummer I couldn't be more helpful here, but I do hope we can contribute something back in the future.

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

No branches or pull requests

6 participants