-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Fix loading mappings.wasm on authenticated URLs #7555
Conversation
providing a url (the previous method) causes the source-map package to use fetch to obtain it. this breaks if the baseUrl is authenticated. needed to update to beta version the source-map package because it supports providing the mappings.wasm synchronously as an ArrayBuffer
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manually verified this fixes the issue. Test also covers use case. 👍
User facing changelog
Request cannot be constructed from a URL that includes credentials: /__cypress/runner/./wasm/mappings.wasm
Additional details
For the sake of source maps and all their goodness, we use the source-map package. It needs to load a
mappings.wasm
file in order to parse the source map. Previously, we provided a url to themappings.wasm
file and thesource-map
package loaded it asynchronously viafetch
.This worked fine in most cases but failed when the URL was authenticated, because the
fetch
needs to be authenticated too.The fix is that, instead of having the
mappings.wasm
loaded asynchronously, we provide it to thesource-map
package synchronously as anArrayBuffer
. Therefore, nofetch
and no issues with loading it regardless of the URL.How has the user experience changed?
Any spec run on an authenticated URL would error and fail immediately. Now those specs run normally.
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?