Skip to content

tor-browser-bundle-bin: error: hash mismatch in Russia #152281

@psydvl

Description

@psydvl

Describe the bug

I live in Russia and we have blocked https://torproject.org/
So, when I connect to it, my internet provider replaces certificate to self-signed one and redirects to another site
However, according to console output, nix keeps trying to download from https://dist.torproject.org/ instead of fully accessible second mirror from package

x86_64-linux = fetchurl {
urls = [
"https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
"https://tor.eff.org/dist/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
];
sha256 = "1a2nxxmjg1gk8p0bxxjqx2g9bwv4ivz8hndabg31nglzv83r7p35";
};

trying https://dist.torproject.org/torbrowser/11.0.3/tor-browser-linux64-11.0.3_en-US.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   170  100   170    0     0   2465      0 --:--:-- --:--:-- --:--:--  2500
100  6571  100  6571    0     0  75228      0 --:--:-- --:--:-- --:--:-- 75228
error: hash mismatch in fixed-output derivation '/nix/store/85n1fj7ikpi7hmra79ccqmyg2aapn03j-tor-browser-linux64-11.0.3_en-US.tar.xz.drv':
         specified: sha256-ZdyTB9qfPhvGW6pZiP6OZPOVnuhY9r7ARfOFJ2vvVqg=
            got:    sha256-5K1w6i+bM/22aJ/sqaN1rxO91S56I0Uvf4EfUbZH/Pg=
error: 1 dependencies of derivation '/nix/store/xv9a1zmz36av7khlg65mwqzksr14abn0-tor-browser-bundle-bin-11.0.3.drv' failed to build

Steps To Reproduce

Steps to reproduce the behavior:

  1. Move to Russia(?) or launch VPN to Russia or create some DNS rule(?)
  2. Try to install tor-browser-bundle-bin

Expected behavior

Package successfully downloaded from second mirror

Additional context

Firefox certificate data
about:certificate?cert=MIICLzCCAZgCCQD%2FIKpzd285qTANBgkqhkiG9w0BAQsFADBcMQswCQYDVQQGEwJSVTEPMA0GA1UECAwGTW9zY293MQ8wDQYDVQQHDAZNb3Njb3cxDTALBgNVBAoMBE1HVFMxDTALBgNVBAsMBE1HVFMxDTALBgNVBAMMBE1HVFMwHhcNMjAwNTA4MDgwNTU2WhcNMzAwNTA2MDgwNTU2WjBcMQswCQYDVQQGEwJSVTEPMA0GA1UECAwGTW9zY293MQ8wDQYDVQQHDAZNb3Njb3cxDTALBgNVBAoMBE1HVFMxDTALBgNVBAsMBE1HVFMxDTALBgNVBAMMBE1HVFMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANUC7TY6QI8%2FXjlG6UgqdYSPKLQN%2B7j2OSnztQTjZ75SxNDYlqLAIx6PBcF0EAdGAc0ERaeJXqnEoEyJbqHlWXPBpy%2FTMn%2FC3BPBBhebHot01oe9sNNV%2FWtQmOtdSgGoQd6KDBf1LhZTWgvzInOpXO3YjFwApL1rSaGnPnq27k8FAgMBAAEwDQYJKoZIhvcNAQELBQADgYEAB2LqJ%2FQsjHtR4oMV3fT9L9m3PiZncAw%2BH9nRt0B74Eipo5c88lRoQ9lG3yF11ZKmLBKqD%2FAh8VSJZtCpwSEq6bTJLYlAgGEYuSBtPIR8FCS7LT5GR4YkU4yMbmtP8sfnT9S9ISd7wkFiX1DvyOFvfNxRZ1FdwelM2XM1Uas6TaM%3D

Notify maintainers

@offline @matejc @thoughtpolice @joachifm @hax404 @KarlJoad

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.3-zen1, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4`
 - channels(root): `"nixos-21.11.334797.6979c0e49bb, nixos-unstable-22.05pre340469.cb372c3b888"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions