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

fix: missing fetch-dependent interfaces in Node.js #42419

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

codebytere
Copy link
Member

Description of Change

Closes #42381.
Refs #41710

Fixes an issue where fetch dependent interfaces in Node.js were not defined when nodeIntegration was enabled in some circumstances. I handled this partially in 9e4ae9c, but the problem extended slightly further and the same approach needed to be taken for FormData, Request, etc.

Checklist

Release Notes

Notes: Fixed an issue where fetch dependent interfaces in Node.js were not defined when nodeIntegration was enabled in some circumstances.

@codebytere codebytere added target/29-x-y PR should also be added to the "29-x-y" branch. target/30-x-y PR should also be added to the "30-x-y" branch. target/31-x-y PR should also be added to the "31-x-y" branch. labels Jun 10, 2024
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jun 10, 2024
@codebytere codebytere force-pushed the fix-missing-fetch-interfaces branch 2 times, most recently from 1320f48 to 5459638 Compare June 10, 2024 11:52
@codebytere codebytere force-pushed the fix-missing-fetch-interfaces branch from 5459638 to 5a401dc Compare June 10, 2024 11:54
@codebytere codebytere added semver/patch backwards-compatible bug fixes labels Jun 10, 2024
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jun 11, 2024
@jkleinsc jkleinsc merged commit 4aa9070 into main Jun 11, 2024
21 checks passed
@jkleinsc jkleinsc deleted the fix-missing-fetch-interfaces branch June 11, 2024 21:59
Copy link

release-clerk bot commented Jun 11, 2024

Release Notes Persisted

Fixed an issue where fetch dependent interfaces in Node.js were not defined when nodeIntegration was enabled in some circumstances.

@trop
Copy link
Contributor

trop bot commented Jun 11, 2024

I was unable to backport this PR to "29-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot added needs-manual-bp/29-x-y and removed target/29-x-y PR should also be added to the "29-x-y" branch. labels Jun 11, 2024
@trop
Copy link
Contributor

trop bot commented Jun 11, 2024

I have automatically backported this PR to "31-x-y", please check out #42453

@trop trop bot added in-flight/31-x-y and removed target/31-x-y PR should also be added to the "31-x-y" branch. labels Jun 11, 2024
@trop
Copy link
Contributor

trop bot commented Jun 11, 2024

I have automatically backported this PR to "30-x-y", please check out #42454

@trop trop bot added in-flight/30-x-y and removed target/30-x-y PR should also be added to the "30-x-y" branch. labels Jun 11, 2024
@danielweck
Copy link

Thank you for fixing this! The Response/Request/etc. API was available in v29, and has been broken since v30. Will this be back-ported into v30 even though v31 is now available? Do you have an estimated shipping timeframe for this bugfix?

Screenshot 2024-06-12 at 17 11 23 Screenshot 2024-06-12 at 17 10 39

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link

efb4f5ff-1298-471a-8973-3d47447115dc commented Jun 12, 2024

@danielweck already backported into v30 see #42454

@thomas-jakemeyn
Copy link

Hello @codebytere,

Thank you for the fix!

I think that a similar patch must be applied to shell/renderer/web_worker_observer.cc where fetch is handled but not the related interfaces, like in shell/renderer/electron_renderer_client.cc before this pull request was merged (see code change here).

We use TestCafe to end-to-end test our Electron application and this breaks the Hammerhead web proxy that is used internally (this code block is executed by a web worker and triggers an error because win.Response is undefined).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/30-x-y PR was merged to the "30-x-y" branch. merged/31-x-y PR was merged to the "31-x-y" branch. needs-manual-bp/29-x-y semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: In version 30.1.0, the FormData object is not available.
6 participants