@@ -15,15 +15,15 @@ public static class Firefox
1515 /// <summary>
1616 /// Default firefox build.
1717 /// </summary>
18- public const string DefaultBuildId = "FIREFOX_NIGHTLY " ;
18+ public const string DefaultBuildId = "128.0b5 " ;
1919
2020 private static readonly Dictionary < string , string > _cachedBuildIds = [ ] ;
2121
22- internal static Task < string > GetDefaultBuildIdAsync ( ) => ResolveBuildIdAsync ( DefaultBuildId ) ;
22+ internal static Task < string > GetDefaultBuildIdAsync ( ) => Task . FromResult ( DefaultBuildId ) ;
2323
2424 internal static string ResolveDownloadUrl ( Platform platform , string buildId , string baseUrl )
2525 =>
26- $ "{ baseUrl ?? "https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central " } /{ string . Join ( "/" , ResolveDownloadPath ( platform , buildId ) ) } ";
26+ $ "{ baseUrl ?? "https://archive.mozilla.org/pub/firefox/releases " } /{ string . Join ( "/" , ResolveDownloadPath ( platform , buildId ) ) } ";
2727
2828 internal static async Task < string > ResolveBuildIdAsync ( string channel )
2929 {
@@ -49,12 +49,12 @@ internal static string RelativeExecutablePath(Platform platform, string buildId)
4949 => platform switch
5050 {
5151 Platform . MacOS or Platform . MacOSArm64 => Path . Combine (
52- "Firefox Nightly .app" ,
52+ "Firefox.app" ,
5353 "Contents" ,
5454 "MacOS" ,
5555 "firefox" ) ,
5656 Platform . Linux => Path . Combine ( "firefox" , "firefox" ) ,
57- Platform . Win32 or Platform . Win64 => Path . Combine ( "firefox " , "firefox.exe" ) ,
57+ Platform . Win32 or Platform . Win64 => Path . Combine ( "core " , "firefox.exe" ) ,
5858 _ => throw new ArgumentException ( "Invalid platform" , nameof ( platform ) ) ,
5959 } ;
6060
@@ -74,17 +74,27 @@ internal static void CreateProfile(string tempUserDataDirectory, Dictionary<stri
7474 }
7575
7676 private static string [ ] ResolveDownloadPath ( Platform platform , string buildId )
77- => new string [ ] { GetArchive ( platform , buildId ) , } ;
77+ => [ buildId , GetFirefoxPlatform ( platform ) , "en-US" , GetArchive ( platform , buildId ) ] ;
78+
79+ private static string GetFirefoxPlatform ( Platform platform )
80+ => platform switch
81+ {
82+ Platform . Linux => "linux-x86_64" ,
83+ Platform . MacOS or Platform . MacOSArm64 => "mac" ,
84+ Platform . Win32 => "win32" ,
85+ Platform . Win64 => "win64" ,
86+ _ => throw new PuppeteerException ( $ "Unknown platform: { platform } ") ,
87+ } ;
7888
7989 private static string GetArchive ( Platform platform , string buildId )
8090 => platform switch
8191 {
82- Platform . Linux => $ "firefox-{ buildId } .en-US. { platform . ToString ( ) . ToLowerInvariant ( ) } -x86_64. tar.bz2",
83- Platform . MacOS or Platform . MacOSArm64 => $ "firefox- { buildId } .en-US.mac .dmg",
92+ Platform . Linux => $ "firefox-{ buildId } .tar.bz2",
93+ Platform . MacOS or Platform . MacOSArm64 => $ "Firefox { buildId } .dmg",
8494
8595 // Windows archive name changed at r591479.
8696 Platform . Win32 or Platform . Win64 =>
87- $ "firefox- { buildId } .en-US. { platform . ToString ( ) . ToLowerInvariant ( ) } .zip ",
97+ $ "Firefox Setup { buildId } .exe ",
8898 _ => throw new PuppeteerException ( $ "Unknown platform: { platform } ") ,
8999 } ;
90100
0 commit comments