Cypress: Server sent events don't work and seem to be buffered by the Cypress proxy.

Created on 12 Mar 2018  路  16Comments  路  Source: cypress-io/cypress

This is following up after tagging onto this issue with my versions, specs and further info:

  • Operating System: macOS 10.13.3
  • Cypress Version: 2.1.0
  • Browser Version: Google Chrome 65

Is this a Feature or Bug?

Bug

Current behavior:

No server sent events are received by the application running in the Cypress browser. If I kill the server then all events are flushed and appear in the browser at once. It seems that the events are getting buffered in Cypress' proxy layer until the connection terminates. This is how nginx works (or more accurately - doesn't work) with buffering turned on.

Desired behavior:

Server sent events are passed through to the application.

How to reproduce:

Run the repro below.

Test code:

https://github.com/hally9k/cypress-sse

feature

Most helpful comment

Released in 3.0.2.

All 16 comments

@brian-mann If you'd like to take a moment to give me a pointer or two I might have a go at a PR?

@brian-mann is there an update on this issue? Or progress on version 3.0 release?

I apologize I have not yet had a chance to resolve this, and the rest of our team are busy on other features outside of this repo. We're in the middle of raising our 3rd round of funding and with that will be able to add 2-3 more engineers which should help maintain the velocity since we have experience a lot of user growth.

I'm looking at this today and will let you know how it goes. I intended to release this fix with 3.0, but it seems we're still a bit aways on that, and will instead release a 2.x.x fix instead.

I have spent the last few hours on this. I can reproduce and am working on a fix. It's not simple, but it's not the worst thing either.

Awesome! Good luck with it. We are really looking forward to resolving this one.

I got it working but the implementation needs more work specifically around error handling through the proxy...

screen shot 2018-03-26 at 12 58 44 am

@brian-mann Are you continuing to work on this? It would be awesome to get an alpha build to tide us over?

I am doing what I can when I have time to work on it. I will try to have a release this weekend. As I mentioned, now is a transition point for Cypress. Our team is busy at work albeit on other things, and we are in the middle of raising (hopefully) a significant round of financing that I am primarily spearheading. When this is over we will add significantly more developers to keep up with the pace of issues. At the moment we're primarily focused on releasing 3.0.

I have your fix in place, but it requires some proxy changes which are really delicate and specifically error handling needs to be updated to better facilitate it. It's probably another 4-6 hours of work for me to do.

@brian-mann How's it all going over there? Any further news regarding the SSE support?

@brian-mann - I hate to be that guy hassling about his one little feature when you guys are clearly doing a heap of awesome work to get 3.0 out, but... Any chance of that 2.x.x patch release you mentioned?

@jennifer-shehane @brian-mann Any chance of an update on this front?

Ugh I just realized that this was in a local branch and was never made into a PR. I was doing the changelog for 3.0 and thought this was finished. I still have it locally and see where I left off. I'll get this in the next patch release and I promise this one won't take months.

Aaaah you missed us out of 3.0!!! Noooooo! Okay, eagerly awaiting 3.0.1 then I suppose...

I am working on this and we should see this get released in 3.0.2 before Monday. Apologize this took so long. With 3.0 out we are back to smaller iterations.

@brian-mann - The team here are super excited to see this land in 3.0.2 !!

Released in 3.0.2.

Was this page helpful?
0 / 5 - 0 ratings