Closed sethidden closed 3 months ago
I didn't test this yet. I'm just uploading my detective work, but perhaps this issue is really fixed in the latest versions of playwright and terminate can just be removed.
I ran this on my fork and the CI's e2e prerender integration tests seem to be passing https://github.com/sethidden/og-image/actions/runs/9560988925/job/26354214621
@harlan-zw Is there any additional way I can test the CI freezes?
Thanks for the great investigation, will merge for now and re-visit if the issue pops up again.
@harlan-zw Is it ok to port this to v2.x as well? I could make a PR, I'd have to bump playwright to 1.41 there
@harlan-zw Is it ok to port this to v2.x as well? I could make a PR, I'd have to bump playwright to 1.41 there, or just update to latest version
Sounds good 👍
Fixes #212
The 'terminate' package is licensed under GPL-2.0: https://github.com/dwyl/terminate/blob/main/LICENSE
However, this og-image package is licensed under MIT.
Because 'terminate' was being used in the og-image runtime rather than as a dev tool as the author of 'terminate' intended...: https://github.com/dwyl/terminate/issues/35#issuecomment-441572754 ... this caused og-image to be a work derived from GPL-licensed code.
As per GPL-2.0 section 2 point B:
This essentially meant that if you use GPL code (here, it's 'terminate') as a part of your code (here, 'og-image'), your work MUST be licensed under GPL as well.
However the intention of og-image is to still be licensed under MIT.
Now, 'terminate' was first introduced in 'og-image' on September 6, 2023: https://github.com/nuxt-modules/og-image/commit/e0cdde74906c5862757c070b379b393e2a9e8bd7#diff-030fc083b2cbf5cf008cfc0c49bb4f1b8d97ac07f93a291d068d81b4d1416f70R687
As Harlan said (https://github.com/nuxt-modules/og-image/issues/212#issuecomment-2149392241), 'terminate' was added to circumvent an issue where the
npx playwright install chromium
process would hang and never exit.Do note that at the time, the version of 'playwright' in the repo was 1.37.1: https://github.com/nuxt-modules/og-image/blob/e0cdde74906c5862757c070b379b393e2a9e8bd7/package.json#L63
The issue where playwright doesn't exit after installing browsers sounds like this issue: https://github.com/microsoft/playwright/issues/28189
The issue was fixed on November 22, 2023 in these two commits:
We can see at the top of the UI that this commit is tagged 1.41.0.
At the time Harlan occured came across this issue the version was again, 1.37.1. However now it's: https://github.com/nuxt-modules/og-image/blob/4e0fa43a92f7bad8544647fbd0e8e471d54b96e2/package.json#L73
So my guess it's that I could just revert to the previous way of killing the process (from before September 6, 2023) and installation is not going to freeze anymore, as the underlying Playwright issue is fixed.