setup-wsl icon indicating copy to clipboard operation
setup-wsl copied to clipboard

action failing with a 403 on Alpine etc

Open ljharb opened this issue 2 years ago • 12 comments

You can see this on your own actions here: https://github.com/Vampire/setup-wsl/actions/runs/6844395408/job/18608259622

ljharb avatar Nov 13 '23 05:11 ljharb

Yeah, I'm already looking into it. Thanks for the issue though. Seems something changed on the WSL distribution download sites.

Vampire avatar Nov 13 '23 12:11 Vampire

I’d be happy to help track it down; unfortunately the action doesn’t log what URL it’s trying to download and i can’t find it in the code.

ljharb avatar Nov 13 '23 16:11 ljharb

This part: https://github.com/Vampire/setup-wsl/blob/master/src/main/kotlin/net/kautler/github/action/setup_wsl/Distribution.kt#L61-L71 with this argument for productId: https://github.com/Vampire/setup-wsl/blob/master/src/main/kotlin/net/kautler/github/action/setup_wsl/Distribution.kt#L438

And locally for example using HTTPie it works perfetly fine.

Vampire avatar Nov 13 '23 17:11 Vampire

And also using HTTPie from GitHub action machine from inside a Debian WSL distribution works fine. And also calling that code in the action locally works fine. It just fails when doing it in the real situation. :-/

Vampire avatar Nov 13 '23 17:11 Vampire

Maybe they blocked some traffic that happens to target GitHub Actions?

ljharb avatar Nov 13 '23 17:11 ljharb

Maybe, but then why does it work from within a WSL distribution on the GHA runner? Should probably be the same outgoing ip.

Vampire avatar Nov 13 '23 17:11 Vampire

From the link I saw your code is querying against the Store. You can also view the WSL distros with links to the appx files here on the WSL repo: https://github.com/microsoft/WSL/blob/master/distributions/DistributionInfo.json

craigloewen-msft avatar Nov 13 '23 18:11 craigloewen-msft

For most distros I use the short-links listed at https://learn.microsoft.com/en-us/windows/wsl/install-manual#downloading-distributions. Only for those where not shortlink exists or existed when I added them, I request the link from the store. In the course of this, I now use shortlinks for all but Alpine. But for Alpine there is still no short-link and it is also not listed on the page you showed. But thanks for the link anyway.

Vampire avatar Nov 13 '23 20:11 Vampire

I really have a hard time getting it. I'm logged in to the running GitHub agent. I have a Debian WSL distribution installed. On Windows itself there is Python 3.9.13. In the WSL Debian there is Python 3.9.2. On both Pythons I have HTTPie 3.2.2 installed. https://www.whois-my-ip.com/api/v1/ip returns the same for both. But the very same HTTPie call for both http -fp HBhm POST https://store.rg-adguard.net/api/GetFiles type=ProductId url=9p804crf0395 works from WSL but fails from Windows. The headers and body sent for both is eactly the same. grml

Vampire avatar Nov 14 '23 03:11 Vampire

And also using https://echo.free.beeceptor.com instead of https://store.rg-adguard.net/api/GetFiles echoes back the exact same values, except for the date.

Vampire avatar Nov 14 '23 03:11 Vampire

I started a discussion at https://github.com/actions/runner-images/discussions/8791, maybe there someone has some idea. :-/

Vampire avatar Nov 14 '23 13:11 Vampire

I at least made a new release that fixes it for kali-linux and openSUSE-Leap-15.2 as they now have a perm-link too. But Alpine stays broken for the meantime. :-(

Vampire avatar Nov 14 '23 14:11 Vampire