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

R.REPLACE IS NOT A FUNCTION ISSUE #133

Open
eiazeez opened this issue May 15, 2024 · 3 comments
Open

R.REPLACE IS NOT A FUNCTION ISSUE #133

eiazeez opened this issue May 15, 2024 · 3 comments

Comments

@eiazeez
Copy link

eiazeez commented May 15, 2024

Sometimes, and i don't know why or what cause this, i get this error when i use cy.api.
image

To resolve this issue, i put .toString() between "r"and "replace" function, in >> node_modules/cypress-plugin-api/dist/support.js line 9 <<
Here a example:

image

@filiphric
Copy link
Owner

hey @eiazeez! I’m back to working on this. would it be possible for you to provide an example response that causes this issue? there’s probably something wrong with how data is parsed and I’m assuming that it has something to do with the response body, or headers

@eiazeez
Copy link
Author

eiazeez commented Jul 15, 2024

Hey, @filiphric
As i shared, i don't know how exactly to reproduce. Sometimes i get this error, sometimes not. I tried to reproduce a step by step scenario but it's intermitent behave

@Dale-777
Copy link

I am seeing this issue when the response body is HTML

Content-Type | text/html; charset=utf-8

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Error</title>
    </head>
    <body>
        <pre>Cannot POST /datahub/v1/csv/upload</pre>
    </body>
</html>
index-DzmIZ6wu.js:96640 TypeError: r.replace is not a function
    at o (webpack://@doitint/client-api-tests/../../../node_modules/cypress-plugin-api/dist/support.js:9:212)
    at Array.map (<anonymous>)
    at Object.o [as encode] (webpack://@doitint/client-api-tests/../../../node_modules/cypress-plugin-api/dist/support.js:9:212)
    at Object.highlight (webpack://@doitint/client-api-tests/../../../node_modules/cypress-plugin-api/dist/support.js:9:3805)
    at P (webpack://@doitint/client-api-tests/../../../node_modules/cypress-plugin-api/dist/support.js:10:1036)
    at Fe (webpack://@doitint/client-api-tests/../../../node_modules/cypress-plugin-api/dist/support.js:12:1536)
    at Context.eval (webpack://@doitint/client-api-tests/../../../node_modules/cypress-plugin-api/dist/support.js:14:2091)
From previous event:
    at Promise.longStackTracesCaptureStackTrace [as _captureStackTrace] (http://localhost:57764/__cypress/runner/cypress_runner.js:3486:19)
    at Promise._then (http://localhost:57764/__cypress/runner/cypress_runner.js:1239:17)
    at Promise.then (http://localhost:57764/__cypress/runner/cypress_runner.js:1132:17)
    at next (http://localhost:57764/__cypress/runner/cypress_runner.js:144025:64)
    at <unknown> (http://localhost:57764/__cypress/runner/cypress_runner.js:144046:16)
    at tryCatcher (http://localhost:57764/__cypress/runner/cypress_runner.js:1807:23)
    at Promise._settlePromiseFromHandler (http://localhost:57764/__cypress/runner/cypress_runner.js:1519:31)
    at Promise._settlePromise (http://localhost:57764/__cypress/runner/cypress_runner.js:1576:18)
    at Promise._settlePromise0 (http://localhost:57764/__cypress/runner/cypress_runner.js:1621:10)
    at Promise._settlePromises (http://localhost:57764/__cypress/runner/cypress_runner.js:1701:18)
    at <unknown> (http://localhost:57764/__cypress/runner/cypress_runner.js:2392:25)

Screenshot 2024-12-10 at 14 12 12

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

3 participants