Tor Browser download issues due to connection interruption

I am new to whonix. I have tried unsuccessfully many times since Saturday to download tor browser to my workstation.

My host has torbrowser installed on it and connects to torbrowser just fine there. My whonix gateway is running tor just fine. My whonix workstation is connecting to the intenet through my whonix gatreway just fine. I just can’t seem to get torbrowser downloaded my whonix workstation.

I have whonix running on virtual box and unless I am mistaken my version of whonix is 13.

This is the error message I keep getting.

ERROR: Failed to download: https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux32-6.0.1_en-US.tar.xz
Possible reasons:

  • The download server is down.

  • File size exceeded (endless data attack triggered).

  • Tor Browser Downloader (by Whonix developers) has been broken due to upstream changes.
    Recommendations:

  • Try again later. If the error persists it probably won’t solve itself before the next update.

  • Check News: Follow Whonix ™ Developments

  • Manually update: Tor Browser: Manual Download
    (Debugging information: curl_status_message: [28] - [Operation timeout. The specified time-out period was reached according to the conditions.])

I tried suggestions found in this thread to take care of it-- "Tor Browser Downloader" cancels the download with an error message Those suggestions did not work. Can someone help me get torbrowser downloaded? I am using the torbrowser download button on my whonix workstation, and I have also tried it through the command line. Neither option has worked to get it downloaded. I get the same error message for both procedures. I have also tried running apt-get update && apt-get dist-upgrade and that has not worked either. I don’t know what else to do.

I looked at another topiic in the forums that looked llike it would be similar to mine and followed a suggestion there. The topic was tor browser dosnt install - #8 by sonny The suggestion was to run the following command in a console to see if the cause could be determined that way:

time curl.anondist-orig --fail --proxy socks5h://user:password@10.137.3.1:9115 --tlsv1.2 --proto =https --max-time 3600 --output /home/user/.cache/tb/files/tor-browser-linux64-6.0.1_en-US.tar.xz https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux64-6.0.1_en-US.tar.xz

This is the output I got when I ran that:

Type: "whonix" <enter> for help.
user@host:~$ time curl.anondist-orig --fail --proxy socks5h://user:password@10.137.3.1:9115 --tlsv1.2 --proto =https --max-time 3600 --output /home/user/.cache/tb/files/tor-browser-linux64-6.0.1_en-US.tar.xz https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux64-6.0.1_en-US.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 66.2M  100 66.2M    0     0   358k      0  0:03:09  0:03:09 --:--:--  168k

real    3m9.706s
user    0m1.628s
sys     0m28.224s

Any thoughts on what might be happening and why I can’t get torbrowser to download?

Btw stay with 6.0.1 for now due to another bug:
Tor Browser Downloader (Whonix) download error for version 6.5a1

As for debugging your issue…

bash -x update-torbrowser

Patrick, I tried the command to debug my issue. It almost downloaded it. It downloaded 90 percent of it and then it gave me thhis error message:

Failed to download: https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux32-6.0.1_en-US.tar.xz

Possible reasons:

  • The download server is down.
  • File size exceeded (endless data attack triggered).
  • Tor Browser Downloader (by Whonix developers) has been broken due to upstream changes.

Recommendations:

(Debugging information: curl_status_message: [28] - [Operation timeout. The specified time-out period was reached according to the conditions.])
+++ true
+++ tb_exit_function 17
+++ trap ‘’ ERR
+++ local exit_code
+++ exit_code=17
+++ ‘[’ 17 = 0 ‘]’
+++ ‘[’ ‘’ = open ‘]’
+++ ‘[’ ‘’ = true ‘]’
+++ exit 17

Any other ideas?

Due to technical limitations, I do not think I can help with this. (allow resume of downloads from torproject.org)

Your only option is the following:

Patrick,

I am working on manually downloading this. When I got to the step for verifying my download, this is the message I got:

user@host:~$ gpg --verify ~/Desktop/tor-browser-linux32-6.0.1_en-us.tar.xz{.asc*,}
gpg: can’t open `/home/user/Desktop/tor-browser-linux32-6.0.1_en-us.tar.xz.asc*'
gpg: verify signatures failed: file open error

What do I need to do to get beyond this?

Actually, you can resume downloads from dist.torproject.org.
If you make a request, for example with:
curl -s -D - https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux32-6.0.1_en-US.tar.xz -o /dev/null, you get response headers like these:

HTTP/1.1 200 OK
[…]
Last-Modified: Fri, 03 Jun 2016 10:02:48 GMT
ETag: “43becf4-5345cd32b0200”
Accept-Ranges: bytes
Content-Length: 71036148
[…]

You can request the missing part using a range-request like this:
curl --header "If-Unmodified-Since: Fri, 03 Jun 2016 10:02:48 GMT" --header 'If-Match: "43becf4-5345cd32b0200"' --header "Range: bytes=71000000-71036147" -s -D - https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux32-6.0.1_en-US.tar.xz -o /dev/null, which will request only the missing bytes (where 71000000 is the number of bytes you have already downloaded) if the resource has not been modified.

Just above that step, it says:

To verify the signature of the package you downloaded, you will need to download the “.asc” file as well. Assuming you downloaded the package and its signature to your Downloads folder, run:

Go to the Download page. Just below the big Download button, you will see a link that says (sig). Right-click, Save as…

(The link is for 6.0.2. Either download Tor Browser 6.0.2 or substitute 6.0.1 for 6.0.2 in the (sig) link like this: https://www.torproject.org/dist/torbrowser/6.0.1/tor-browser-linux32-6.0.1_en-US.tar.xz.asc )

With the above commits (which will land in Whonix 14 or if you update tb-updater from source code), it will be easier to resume download for the biggest downloaded file, i.e. the tbb archive file. The other files are smaller and more likely to change, i.e. shasum file and gpg signature. The smaller files are always deleted while the big file is overwritten by curl in normal mode. What about the “non-normal mode”… It will be possible to experiment with injecting command line options for curl. For example.

CURL_OPTS="-C -" update-torbrowser

Which however does not work. Once that works, a command line parameter --resume can be added. (Making that the default will not be a good idea, as download resumption could continuously fail.)

The download resumption examples posted by @Lobster are good to know, but a bit complicated, a bit too complicated to automate them within tb-updater.

If we assume that the file does not change between the initial download and resumption you can skip the checks with if-match and if-unmodified-since (the file will be verified via gpg anyway), the end offset is also optional, so you could simplify it to just curl --range "71000000-" -o /tmp/remaining (you might want to check if the response status is 206 Partial Content), then you concatenate both files and that’s it.

Btw this is not a safe assumption. Which is also why a --resume feature cannot become a default.

If I understand right, you are suggesting the download should be split into a two downloads using fixed values?

you are suggesting the download should be split into a two downloads using fixed values?

No, 71000000 was just an example.
When your downloads gets interrupted you have already downloaded a certain number of bytes (eg. 12345), you insert the number of bytes you have downloaded in your range-request like --range "12345-" and the response will contain all bytes beginning from offset 12345.

You could avoid this splitting entirely and append directly with curl --range "71000000-" http://example.com >> /file/to/resume, but I think that way you can’t check the response code before appending.

I see.

Any way to have curl auto detect this? Any idea why -C - does not work?

Oh, I didn’t see that option. -C - does work on my system:

curl -C - -o tor-browser-linux32-6.0.1_en-US.tar.xz https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux32-6.0.1_en-US.tar.xz
** Resuming transfer from byte position 25100288
% Total % Received % Xferd Average Speed Time Time Time Current
[…]

The update-torbrowser progress bar slows up downloading Tor Browser a lot. This is a bug that I just now noticed. Therefore, try downloading Tor Browser without the progress bar. You can do that by using the following command. (@bsess)

update-torbrowser --ordinary

https://github.com/Whonix/curl-scripts/commit/d439b4c3180a4d2b35163ed05be2c69a99c96c40