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: node-fetch hanging issue when fetching checksum after fetching binary #2804

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

xmliszt
Copy link
Contributor

@xmliszt xmliszt commented Oct 25, 2024

What kind of change does this PR introduce?

  • Bug fix:

Fix node-fetch fetch command hangs indefinitely when fetching the checksum file after fetching the binary, on some macOS devices that have stricter network restrictions. This PR will fix #2798

  • Misc:

Added some comments to explain the process clearly.

What is the current behavior?

#2798 : running npm install supabase@latest --save-dev hangs and failed after waiting for a long time, the error happens at the fetching of the checksum file. However, running sudo npm install ... works.

Some investigation shows that this error starts happening from version 1.90.0, version 1.89.1 did not have such issue. The change that was made between these two version is in this commit: 571f336

By examining the commit, it shows that checksum verification was added as a result, and since then the checksum fetch was run after the fetching of the binary.

What is the new behavior?

By fetching the checksum file (small in size) before fetching the binary file (big in size), both fetch succeeded without error.

…e binary. Add comments to explain the process.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11523242399

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 8 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.06%) to 59.757%

Files with Coverage Reduction New Missed Lines %
internal/debug/postgres.go 3 64.86%
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 11517732223: -0.06%
Covered Lines: 6357
Relevant Lines: 10638

💛 - Coveralls

@sweatybridge
Copy link
Contributor

Thank for you investigating this and pushing a fix!

@sweatybridge sweatybridge changed the title Fix node-fetch hanging issue when fetching checksum after fetching binary fix: node-fetch hanging issue when fetching checksum after fetching binary Oct 26, 2024
@sweatybridge sweatybridge merged commit b322db7 into supabase:develop Oct 26, 2024
28 checks passed
@github-actions github-actions bot mentioned this pull request Oct 29, 2024
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

Successfully merging this pull request may close these issues.

npm install --save-dev failed at postinstall stage
3 participants