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

Cypress returns 404 error for URL that i can connect to via a web browser #30906

Open
camtaylor27 opened this issue Jan 17, 2025 · 2 comments
Open
Labels
stage: needs information Not enough info to reproduce the issue

Comments

@camtaylor27
Copy link

camtaylor27 commented Jan 17, 2025

I have a device that runs a webserver, allowing the user to connect to it via VNC using the devices IP address (Shown in attached photo)

Using a web browser i am able to connect to it without any issues.

I cannot connect to it however through Cypress as it returns a 404 error.

Image

Image

Response:

<html>
    <head>
        <script type='text/javascript'>
            document.domain = '10.27.105.71';
            ( () => {
                "use strict";
                const e = window.Cypress = parent.Cypress;
                if (!e)
                    throw new Error("Something went terribly wrong and we cannot proceed. We expected to find the global Cypress in the parent window but it is missing. This should never happen and likely is a bug. Please open an issue.");
                const t = ( () => {
                    let e, t, n, r;
                    const i = () => {
                        e = !1,
                        t = !1,
                        n = [],
                        r = {}
                    }
                      , o = (e, t=[]) => "function" == typeof e ? e.apply(window, t) : window.eval(e);
                    return i(),
                    {
                        wrap: () => {
                            const i = {
                                setTimeout: window.setTimeout,
                                setInterval: window.setInterval,
                                requestAnimationFrame: window.requestAnimationFrame,
                                clearTimeout: window.clearTimeout,
                                clearInterval: window.clearInterval
                            }
                              , a = (e, t) => i[e].apply(window, t)
                              , s = e => n => (t && (r[n] = !0),
                            a(e, [n]))
                              , w = t => (...r) => {
                                let i, [s,w,...p] = r;
                                return i = a(t, [ (...r) => {
                                    if (!e)
                                        return o(s, r);
                                    n.push({
                                        timerId: i,
                                        fnOrCode: s,
                                        params: r,
                                        type: t
                                    })
                                }
                                , w, ...p]),
                                i
                            }
                            ;
                            window.setTimeout = w("setTimeout"),
                            window.setInterval = w("setInterval"),
                            window.requestAnimationFrame = w("requestAnimationFrame"),
                            window.clearTimeout = s("clearTimeout"),
                            window.clearInterval = s("clearInterval")
                        }
                        ,
                        reset: i,
                        pause: a => {
                            e = Boolean(a),
                            e || (t = !0,
                            n.forEach((e => {
                                const {timerId: t, type: n, fnOrCode: i, params: a} = e;
                                "setInterval" === n && r[t] || o(i, a)
                            }
                            )),
                            i())
                        }
                    }
                }
                )();
                e.removeAllListeners("app:timers:reset"),
                e.removeAllListeners("app:timers:pause"),
                e.on("app:timers:reset", t.reset),
                e.on("app:timers:pause", t.pause),
                t.wrap(),
                e.action("app:window:before:load", window)
            }
            )();
        </script>
    </head>
    <body>
        <h2>404 Error</h2>
        The requested resource cannot be found.
    </body>
</html>
@jennifer-shehane
Copy link
Member

@camtaylor27 Which Cypress version is this happening in? Is this a new issue? Or are you new to testing this website in Cypress itself?

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Jan 17, 2025
@camtaylor27
Copy link
Author

camtaylor27 commented Jan 17, 2025

@jennifer-shehane I am using v13.17.0

I have been using Cypress for a year or so, but this is the first time i have tried to automate this website using Cypress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs information Not enough info to reproduce the issue
Projects
None yet
Development

No branches or pull requests

2 participants