CEF builds (403) Forbidden downloading using powershell

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CEF builds (403) Forbidden downloading using powershell

Postby amaitland » Tue Feb 11, 2025 4:01 am

Hey,

So to package the CEF Standard Distribution for use with CefSharp, I use a powershell script which downloads and builds CEF for dynamic linking.

Couple of days ago I went to package up 132.3.2+g4997b2f+chromium-132.0.6834.161 and now I'm getting a 403 forbidden.

I can download the files manually with the browser. When running locally on my machine (Australia) or on appveyor I get the same error.

https://ci.appveyor.com/project/cefshar ... 489303#L41

My guess is it's the powershell script specifically being blocked.

Was this a deliberate change? I've been using powershell for years to package CEF.

Thanks,
Alex
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1329
Joined: Wed Jan 14, 2015 2:35 am

Re: CEF builds (403) Forbidden downloading using powershell

Postby magreenblatt » Tue Feb 11, 2025 12:39 pm

Direct downloads work for me via (e.g.) wget. What powershell command are you using?

Code: Select all
% wget https://cef-builds.spotifycdn.com/cef_binary_132.3.2%2Bg4997b2f%2Bchromium-132.0.6834.161_windows64.tar.bz2
--2025-02-11 12:37:00--  https://cef-builds.spotifycdn.com/cef_binary_132.3.2%2Bg4997b2f%2Bchromium-132.0.6834.161_windows64.tar.bz2
Resolving cef-builds.spotifycdn.com (cef-builds.spotifycdn.com)... 2600:1405:d400:5::173e:6a1b, 2600:1405:d400:5::173e:6a05, 23.62.106.5, ...
Connecting to cef-builds.spotifycdn.com (cef-builds.spotifycdn.com)|2600:1405:d400:5::173e:6a1b|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 350639284 (334M) [application/x-tar]
Saving to: ‘cef_binary_132.3.2+g4997b2f+chromium-132.0.6834.161_windows64.tar.bz2’

cef_binary_132.3.2+g4997b 100%[=====================================>] 334.40M  20.1MB/s    in 17s     

2025-02-11 12:37:18 (19.3 MB/s) - ‘cef_binary_132.3.2+g4997b2f+chromium-132.0.6834.161_windows64.tar.bz2’ saved [350639284/350639284]
magreenblatt
Site Admin
 
Posts: 12947
Joined: Fri May 29, 2009 6:57 pm

Re: CEF builds (403) Forbidden downloading using powershell

Postby amaitland » Tue Feb 11, 2025 3:48 pm

Thanks for testing. I tried with curl on windows and that also appears to be working

Currently the script is using System.Net.WebClient.DownloadFile

https://github.com/cefsharp/cef-binary/ ... d.ps1#L541

If it's not something that's been specifically blocked then I'll try switch to Invoke-WebRequest

Thanks
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1329
Joined: Wed Jan 14, 2015 2:35 am

Re: CEF builds (403) Forbidden downloading using powershell

Postby amaitland » Wed Feb 12, 2025 3:04 am

Same error with Invoke-WebRequest

Code: Select all
Caught an exception: The remote server returned an error: (403) Forbidden.
        Exception Type: System.Net.WebException
        Stack Trace: at DownloadCefBinaryAndUnzip, C:\projects\cef-binary\build.ps1: line 540
        at <ScriptBlock>, C:\projects\cef-binary\build.ps1: line 722
        at <ScriptBlock>, <No file>: line 1


Effectively the same result with Start-BitsTransfer
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1329
Joined: Wed Jan 14, 2015 2:35 am

Re: CEF builds (403) Forbidden downloading using powershell

Postby amaitland » Wed Feb 12, 2025 5:01 am

After further investigation I think the 403 is misleading. It would appear the URLs are now case sensitive.

My original url format which has worked up until recently is

Code: Select all
https://cef-builds.spotifycdn.com/cef_binary_132.3.2%2bg4997b2f%2bchromium-132.0.6834.161_windows32.tar.bz2



The url from the spotify index.html which has capital B for the encoded + symbol

Code: Select all
https://cef-builds.spotifycdn.com/cef_binary_132.3.2%2Bg4997b2f%2Bchromium-132.0.6834.161_windows32.tar.bz2


Appears to be downloading now, sorry for wasting your time!
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1329
Joined: Wed Jan 14, 2015 2:35 am

Re: CEF builds (403) Forbidden downloading using powershell

Postby magreenblatt » Wed Feb 12, 2025 9:36 am

No worries :)
magreenblatt
Site Admin
 
Posts: 12947
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 32 guests