-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
v4 fails to import https resources on macOS, works in v3 #3693
Comments
Downgrade less to v3. v4 is failing on macOS for some reason. See less/less.js#3693 This also makes some less/CSS changes that are useful for future upgrades: - wrap all calculations in calc(), which is required in less v4 - remove unneeded @transparent variable Finally, this fixes an erroneous error message that said "extern generation failed" instead of "CSS compilation failed". Closes #3981
Facing this same issue on my mac as well Possibly related issue: nodejs/node#27916 |
I've traced it to needle, a new dependency of less.js. They remove their error listener after closing the connection, but nodejs fires an error after that. |
See tomas/needle#391 |
In #3991, I changed the syntax of our colors to a modern rgba syntax. For example, rgba(255, 255, 255, 0.85) would become rgba(255 255 255 / 85%). However, less v3 seems not to understand that properly, and performs division on the last two parts, resulting in output of rgba(255 255 3%), which is indeed invalid. This fixes the issue by upgrading to less v4, which understands the new rgba syntax and leaves it alone. The output for that will now match the input. To work around an issue with less v4, this uses a prerelease version with a fix for less/less.js#3693 . See also tomas/needle#391 This doesn't affect any release branches, since #3991 hasn't been cherry-picked. Closes #4027
Thanks for bug report, wait upstream deps to fix it. |
A new version of needle is available upstream. As soon as I can write a regression test for less.js, I'll put up a PR to upgrade needle. |
There seems to be a timing component to the issue. The simplest possible regression test doesn't reproduce the issue, but the full set of less files in shaka-project/shaka-player does. Also, the issue does not appear in node v12, but does appear in v14, v16, and v17. If I can't modify an existing inline-https test to fail on mac without the fix, I may give up on a regression test. I'd prefer not to, though. |
The issue was traced upstream to needle, and resolved in: - tomas/needle#392 - tomas/needle#394 - tomas/needle#396 - tomas/needle#398 Closes less#3693
If I strip away some of shaka-player's less files, the repro rate goes down steadily, from 100% repro with all of them, down to 0% for just an https inline import statement. I can't find a simple, non-project-specific repro case for a regression test, so I'm giving up. I can confirm, though, that with the needle upgrade, shaka-player's less build works 100% of the time on our mac with node 17. |
The issue was traced upstream to needle, and resolved in: - tomas/needle#392 - tomas/needle#394 - tomas/needle#396 - tomas/needle#398 Closes #3693
Thanks so much for reviewing and merging. Looking forward to seeing the fix in an official release! |
The issue was traced upstream to needle, and resolved in: - tomas/needle#392 - tomas/needle#394 - tomas/needle#396 - tomas/needle#398 Closes less#3693
Any chance we could get an updated release for less.js so we can stop using a fork? |
Less v4.2.0 seems to include the fix. |
To reproduce:
Current behavior:
Fails with
ECONNRESET
on macOS with less v4.1.2, but succeeds with less v3.13.1. Doesn't fail on Linux or Windows. Reproducible in GitHub Actions as well as on our private mac hardware.Expected behavior:
Should be able to fetch https resources equally on all platforms.
Environment information:
less
version: 4.1.2, but not 3.13.1nodejs
version: 17.5.0operating system
: macOSThe text was updated successfully, but these errors were encountered: