Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Fungování této stránky je z důvodu údržby dočasně omezeno. Pokud žádný článek nápovědy nevyřeší váš problém a potřebujete se zeptat na další řešení, napište nám na Twitter @FirefoxSupport nebo Reddit /r/firefox.

Prohledat stránky podpory

Vyhněte se podvodům. Za účelem poskytnutí podpory vás nikdy nežádáme, abyste zavolali nebo poslali SMS na nějaké telefonní číslo nebo abyste sdělili své osobní údaje. Jakékoliv podezřelé chování nám prosím nahlaste pomocí odkazu „Nahlásit zneužití“.

Zjistit více

firefox keeps updating the same mar file

  • 3 odpovědi
  • 1 má tento problém
  • 5 zobrazení
  • Poslední odpověď od zbence

more options

Hi,

I have made an update server following the article: https://firefox-source-docs.mozilla.org/taskcluster/setting-up-an-update-server.html The server works perfectly, my clients can see the update.xml and the mar file, but even after the client updates itself, it can not identify the update as the same and tries to update again and again...

My update xml is like this: <updates>

  <update type="minor" displayVersion="83.0" appVersion="83.0" platformVersion="83.0" buildID="21181002100236">
Hi, I have made an update server following the article: https://firefox-source-docs.mozilla.org/taskcluster/setting-up-an-update-server.html The server works perfectly, my clients can see the update.xml and the mar file, but even after the client updates itself, it can not identify the update as the same and tries to update again and again... My update xml is like this: <?xml version="1.0" encoding="utf-8"?> <updates> <update type="minor" displayVersion="83.0" appVersion="83.0" platformVersion="83.0" buildID="21181002100236"> <patch type="complete" URL="http://<myserver>/firefox-83.0.complete.mar" hashFunction="sha512" hashValue="A8B8FEDEAEE383D2D712B8303C2BEBC88133939A7B691E7BA7CC3D4A220BDE22D33FA0D57BD0060036BC533AAD69F972D1BB6F8EFB385E5B59C8BBE3A6734A52" size="61899176" /> </update> </updates>
Přiložené obrázky

Zvolené řešení

Hi, It seems that the MAR file does not contains the build number directly. It contains the "application.ini", which holds this information. I have written a powershell script which can extract the file for me, 7zip can extract that ini file so I could parse it's content. As long this information stays in there, I'm happy.

The relevant part of this script:

$file = [System.IO.File]::ReadAllBytes($localfile) function Read-4bytes{ Param ( [int]$offset ) Process { return $file[$offset]*256*256*256+$file[$offset+1]*256*256+$file[$offset+2]*256+$file[$offset+3] } } $indexoffset = Read-4bytes(4) $indexsize = Read-4bytes($indexoffset) $remaining = $indexsize $pointer = $indexoffset + 4 while($remaining -gt 0){ $filename = "" $contentoffset = Read-4bytes($pointer) $contentsize = Read-4bytes($pointer+4) $flags = Read-4bytes($pointer+8) $pointer+=12 while($file[$pointer] -gt 0){ $filename += [char]$file[$pointer] $pointer++ $remaining-- } $pointer++ $remaining-=13 if($filename -eq "application.ini"){$remaining=0} } $content = @() for($i = 0; $i -lt $contentsize; $i++){ $content += $file[$contentoffset+$i] } $tempout = $localfolder + "temp.i" [System.IO.File]::WriteAllBytes($tempout, $content) $unzipfile = $localfolder + "temp" c:\tools\7z.exe e $tempout -o"$localfolder" $appini=Get-Content $unzipfile $buildID = ($appini -like "buildid*").split("=")[1] remove-item $tempout remove-item $unzipfile

It is not bulletproof, but works.

Přečíst dotaz v kontextu 👍 0

Všechny odpovědi (3)

more options

It seems that the xml content is not showing correctly, so I've attached a screenshot of it.

more options

Hi, I could find out why it is keep updating itself. The buildID in the update.xml is much higher than in the real update file. If I can put the correct buildID in the xml, it stops the update cycle. Now my question - how could I get the correct buildID from the MAR file itself?

more options

Zvolené řešení

Hi, It seems that the MAR file does not contains the build number directly. It contains the "application.ini", which holds this information. I have written a powershell script which can extract the file for me, 7zip can extract that ini file so I could parse it's content. As long this information stays in there, I'm happy.

The relevant part of this script:

$file = [System.IO.File]::ReadAllBytes($localfile) function Read-4bytes{ Param ( [int]$offset ) Process { return $file[$offset]*256*256*256+$file[$offset+1]*256*256+$file[$offset+2]*256+$file[$offset+3] } } $indexoffset = Read-4bytes(4) $indexsize = Read-4bytes($indexoffset) $remaining = $indexsize $pointer = $indexoffset + 4 while($remaining -gt 0){ $filename = "" $contentoffset = Read-4bytes($pointer) $contentsize = Read-4bytes($pointer+4) $flags = Read-4bytes($pointer+8) $pointer+=12 while($file[$pointer] -gt 0){ $filename += [char]$file[$pointer] $pointer++ $remaining-- } $pointer++ $remaining-=13 if($filename -eq "application.ini"){$remaining=0} } $content = @() for($i = 0; $i -lt $contentsize; $i++){ $content += $file[$contentoffset+$i] } $tempout = $localfolder + "temp.i" [System.IO.File]::WriteAllBytes($tempout, $content) $unzipfile = $localfolder + "temp" c:\tools\7z.exe e $tempout -o"$localfolder" $appini=Get-Content $unzipfile $buildID = ($appini -like "buildid*").split("=")[1] remove-item $tempout remove-item $unzipfile

It is not bulletproof, but works.