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

Frame agent override causes TypeError with an XHR request from Dropzone #7

Open
mjgiarlo opened this issue Dec 12, 2024 · 0 comments
Open

Comments

@mjgiarlo
Copy link

My team's been enjoying Cyperful for ironing out kinks in our system specs, and recently we wrote a test of a file upload feature in our application and found that while the spec passes in RSpec, it fails when invoked via Cyperful. In the JavaScript console of Chrome, when we drop a file into the upload dropzone, we see Uncaught TypeError: Illegal invocation:

Screenshot from 2024-12-12 11-17-19

It appears to be the e.apply(this, n); call in the XHR override within the Cyperful frame agent:

return originalOpen.apply(this, args);
, just after DropzoneJS attempts to make an XHR request (here). It appears the reference to this is problematic here.

Is this XHR override in the frame agent required? When I comment out the XHR override locally, the tests all pass, for what it's worth. Maybe there's a way to rewrite the override so that the this reference doesn't bomb out? Happy to make changes on my side if you have suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant