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
"/" is added at end of loaded URLs breaks GET parameters #2101
Comments
What is making what invalid? Can you explain what you mean by the extra I get how it may look different, but under the hood the browser is actually making requests including the |
In the electron developer console, the request is being sent with the "/", thus making it invalid as the server is expecting it without. |
If you were to visit say In other words it would become: Check it out in Chrome + Firefox. Whenever you make a request that only includes the domain, the user agent will automatically add Can you explain what you mean by: "invalid"? |
If you see my first screenshot, I have a GET parameter after example.com/ (https://example.com/?exam=param). The issue is the final GET parameter is send with a "/" at the end, which is invalid because it's a different value than the server is expecting. |
Okay I understand now. It's because you added a param in the |
Excellent! |
Real world use cases always are more exciting than our own imagination, great find
…Sent from my iPhone
On Jul 5, 2018, at 17:57, sam delong ***@***.***> wrote:
Excellent!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@jennifer-shehane @bahmutov @brian-mann This issue still exists in latest version. I am interested in fixing it. Do we really need to fix this since the baseUrl key in cypress.json should only contain top level domain without the param. It doesn't makes sense to me, how can a base url has params in it? |
I'm pretty sure a good deal of the baseUrl logic is contained in this file: https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/cypress/location.coffee |
@gautamkrishnar many baseUrls can contain url params. Take for instance one page apps, which might pass a sessionId as url param, for example. I can think of hundreds of examples. Anyway, I found a workaround by adding an extra dummy url param at the end of my url, which cypress' visit() can break without any backslash in my app. I gave it this key value combination: |
The code for this is done in cypress-io/cypress#8630, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Issue
Currently when calling .visit('url'), cypress loads it as url/, which makes the final GET parameter invalid
My cypress.json:

My test.js:

The loaded URL in Cypress
Desired behavior:
Either don't add the extra character, or possibly add an option for removing it.
Steps to reproduce:
Screenshots above
Versions
Ran on Ubuntu 18.04, using Cypress v3.0.2
The text was updated successfully, but these errors were encountered: