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

Content-Type and other headers missing in gRPC requests in Cypress with Connect-ES #28849

Closed
robertwenquan opened this issue Feb 2, 2024 · 5 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this stale no activity on this issue for a long period

Comments

@robertwenquan
Copy link

robertwenquan commented Feb 2, 2024

Current behavior

In Cypress E2E test, a few HTTP headers are not set.
Specifically, Content-Type header is not set along with other headers with running with cypress that lead to 415 Content not supported error returned from the API gateway.
The request doesn't reach the API server bacause of this.

Desired behavior

Content-Type and other headers are set just like it behaves in a normal Chrome browser.

Test code to reproduce

describe("LoginForm component test", () => {
    it("normal login", () => {
        cy.visit("/login");
        cy.get("[data-cy='input-email']").type("[[email protected]](mailto:[email protected])");
        cy.get("[data-cy='input-password']").type("password.123{enter}");
    });
});

Cypress Version

13.6.3

Node version

v20.10.0

Operating System

macOS 14.2.1 (23C71)

Debug Logs

No response

Other

Browser console

img_v3_027m_e33aba24-cad2-41d1-bcbf-a10a8c45136g

Running console

img_v3_027m_2bf823e2-463a-4fac-a1ac-324cfce4f20g

Business Logic code

img_v3_027m_f9b34815-86df-4bb6-b304-c3341a424b7g

Expected Good Behavior on a regular browser

img_v3_027m_95ac6e5e-076d-4177-bb9d-7e026200a3cg

The behavior with cypress:open

missing headers with cypress

img_v3_027m_01f634e3-4aa7-44a5-afdd-09befeb395dg

@robertwenquan robertwenquan changed the title Content-Type and other headers not set in gRPC request in Cypress with Connect-ES Content-Type and other headers missing in gRPC requests in Cypress with Connect-ES Feb 2, 2024
@jennifer-shehane jennifer-shehane added the stage: needs investigating Someone from Cypress needs to look at this label Feb 2, 2024
@senpl
Copy link

senpl commented Feb 15, 2024

Does it worked in previous cypress version ???

@robertwenquan
Copy link
Author

Does it worked in previous cypress version ???

seems not related to previous version.

this was cleared by either:

  1. changed the ConnectTransport to WebTransport (grpc-web)
  2. removed experimentalFetchPolyfill: true while keeping the ConnectTransport

In the end we changed to WebTransport and disabled the experimentalFetchPolyfill as well.

@yordis
Copy link

yordis commented Jun 11, 2024

Hey @jennifer-shehane any opportunity to get some attention from Cypress? I am trying my best to figure out the situation but I am not sure what else to try. The changes suggested by @robertwenquan didn't work me

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Dec 8, 2024
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests

5 participants