{"id":17994306,"url":"https://github.com/mhart/nextjs-patch-bug","last_synced_at":"2025-10-30T04:42:14.781Z","repository":{"id":238279696,"uuid":"796238275","full_name":"mhart/nextjs-patch-bug","owner":"mhart","description":"Reproduction for Next.js issue 65381","archived":false,"fork":false,"pushed_at":"2024-05-05T11:15:34.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T16:42:57.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-05T11:09:18.000Z","updated_at":"2024-05-05T11:15:53.000Z","dependencies_parsed_at":"2024-05-05T12:24:27.517Z","dependency_job_id":"e816b837-375c-4c2c-9c0d-4161368fc27f","html_url":"https://github.com/mhart/nextjs-patch-bug","commit_stats":null,"previous_names":["mhart/nextjs-patch-bug"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhart%2Fnextjs-patch-bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhart%2Fnextjs-patch-bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhart%2Fnextjs-patch-bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhart%2Fnextjs-patch-bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhart","download_url":"https://codeload.github.com/mhart/nextjs-patch-bug/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247124898,"owners_count":20887590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T20:14:52.046Z","updated_at":"2025-10-30T04:42:09.736Z","avatar_url":"https://github.com/mhart.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js fetch-patch bug\n\nReproduction for [Next.js issue 65381](https://github.com/vercel/next.js/issues/65381)\n\nIllustrates the problem with [setting the `__nextPatched` property on the fetch function itself](https://github.com/vercel/next.js/blob/9ec37c120aba9d5f16e00566a10cba68858e363d/packages/next/src/server/lib/patch-fetch.ts#L779) to determine if the function has already been patched.\n\nAny other library / function that patches global fetch will essentially hide this property, and so Next.js will subsequently try to patch it again.\n\nAside from extra stack overhead, memory usage, recursive trace calls, etc, this might not be a huge problem – but something (not entirely sure what) causes it to deadlock once it's been wrapped multiple times.\n\n## Reproducing\n\n```\nnpm install\nnpm run deploy\n```\n\nThen load the page (will probably load fine), and then reload the page.\nMay need to load a few times to ensure you hit the same isolate, but works first reload for me.\n\nSecond page load should freeze and eventually 504.\n\nCan be seen live at https://nextjs-bug-eight.vercel.app\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhart%2Fnextjs-patch-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhart%2Fnextjs-patch-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhart%2Fnextjs-patch-bug/lists"}