Cannot instantiate env in Julia 1.10: adwaita_icon_theme_jll git tree hash error - anyone else?

Hello all, long-time lurker, first time caller, etc. etc.

When excitedly trying to instantiate an environment w/ shiny new Julia 1.10 today (Windows), I encountered an odd error, which I’ve submitted/summarized here: Cannot instantiate env in Julia 1.10, "ERROR: Unable to automatically download/install artifact 'adwaita_icon_theme'" · Issue #7860 · JuliaPackaging/Yggdrasil · GitHub.

tl;dr version, an autogenerated / generic JuliaBinary adwaita_icon_theme_jll gives a calculated git tree sha1 hash that doesn’t match any of the hashes for its releases including the target release (Releases · JuliaBinaryWrappers/adwaita_icon_theme_jll.jl · GitHub), so it throws an error.

Has anyone else ran into this? It seems like a substantive issue given that this is all auto-generated, and I’ve never run into a similar issue previously. Doubting a MITM attack, it seems the downloaded/extracted tree is getting altered unintentionally somewhere i.e. would apply to others.

Here’s the top of the REPL error/output (the full stack trace is in the linked issue):

  Downloaded artifact: adwaita_icon_theme
  Downloaded artifact: adwaita_icon_theme
ERROR: Unable to automatically download/install artifact 'adwaita_icon_theme' from sources listed in 'C:\1\.julia\packages\adwaita_icon_theme_jll\YjPmX\Artifacts.toml'.
Sources attempted:
    Error: Tree Hash Mismatch!
  Expected git-tree-sha1:   65eca7c48dea1e32203b205613441ce9506045b4
  Calculated git-tree-sha1: 043d0732f572e66059278f5964e3752f018a5cdf

Apologies for double-posting, but I’m not allowed to have more than 2 links in a post as a new user. Here’s an update:

Update: upon trying again about an hour after the initial attempt, the instantiation progressed through a couple dozen additional artifact files. I don’t have anything in the artifacts directory matching the above expected hash “65eca7c48dea1e32203b205613441ce9506045b4”, but nonetheless the process skipped it / changed the order of things, seemingly.

Now, iso_codes_jll is giving me the same type of error. A quick reply on my issue above suggested this is a Pkg issue, which indeed seems more obviously relevant than Yggdrasil itself given that it is a tree hash.

Given that it is now happening with a 2nd _jll, it seems it may be fairly common/widespread. This issue was linked to me on github: “Artifact hash mismatch with P4est_jll on Julia v1.10 · Issue #3643 · JuliaLang/Pkg.jl · GitHub” (and my above issue was linked to this one), so it is the more relevant one for any discussion.

Here’s the iso_codes_jll tree hash error:

(JL1XVENV) pkg> up
    Updating registry at `C:\1\.julia\registries\General.toml`
  Downloaded artifact: iso_codes
  Downloaded artifact: iso_codes
ERROR: Unable to automatically download/install artifact 'iso_codes' from sources listed in 'C:\1\.julia\packages\iso_codes_jll\wcUPz\Artifacts.toml'.
Sources attempted:
    Error: Tree Hash Mismatch!
  Expected git-tree-sha1:   71f68a3d55d73f2e15a3969c241fae2349b1feb5
  Calculated git-tree-sha1: 409d6ac4c02dae43ff4fe576b5c5820d0386fb3f

I’ve never had this happen with any previous version of Julia, so I presume it is likely related to the 1.10 release. At least in my case it seems to be pretty significant speedbump in what is normally a friendly, automated process that takes minutes.

I was going to edit the title to reflect that this is a V1.10 Pkg issue (from what I can tell), but it appears I can’t edit it now.

In any case, as a generic Windows user trying to use Julia 1.10 with a large environment, I would hope there is some way to bypass this issue? It seems like somewhat of a “show-stopper” type of issue for a new version (unless I am somehow very unique), so certainly I wouldn’t want this to be experienced by newer users (I :heart: Julia and want it to gain popularity!).

I have simply reverted to 1.9.4 as I am low on time, not a big deal at all, but if anyone is working on fixing this / has a fix available, you sharing that would be appreciated!

Do you know to which packages/dependencies these artifacts belong? Maybe it’s possible to trim your environment to eliminate the error in the short term?

Edit: Typing ? at the pkg> prompt told me that in Pkg mode, why PackageA will give the dependency relations for PackageA. So you could start there.

As a temporary workaround until the issue is properly resolved you can try setting the environment variable JULIA_PKG_IGNORE_HASHES to true (no idea how to do that on Windows).

For Windows it would be something like

  • go to search bar and type “environment”, then open “edit variables for user account”
  • Click “New…” to add a new variable with Variable name = JULIA_PKG_IGNORE_HASHES and Variable value = true
  • Hit Okay to apply settings and restart the machine or log off and back in for it to take effect.

Given this is a regression in 1.10, maybe a safer workaround is to just add the required package in 1.9, which will download the jll and make it available to 1.10 as well? Worked for me.

1 Like

Isn’t that solved already? I cannot instantiate some of my environments because of this…

One easy workaround is to install the same packages (and thus the same artifacts) in Julia 1.9. Then the artifacts will be already downloaded and they will be available for 1.10

(Well, the same said above)

Did you try one of the above workarounds?

I’ve used temporary workaround to set ENV["JULIA_PKG_IGNORE_HASHES"] = true in current REPL.

If you update your environment using Pkg.update(), adwaita_icon_theme_jll should install on Windows now without needing “Developer Mode” or ENV["JULIA_PKG_IGNORE_HASHES"] = true.