Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform init cannot compute checksum on Windows 10 #36357

Open
borrrden opened this issue Jan 17, 2025 · 3 comments
Open

terraform init cannot compute checksum on Windows 10 #36357

borrrden opened this issue Jan 17, 2025 · 3 comments
Labels
bug new new issue not yet triaged waiting for reproduction unable to reproduce issue without further information windows

Comments

@borrrden
Copy link

Terraform Version

Terraform v1.10.4
on windows_amd64

Terraform Configuration Files

terraform {
    required_providers {
      aws = {
        source  = "hashicorp/aws"
        version = "~> 4.16"
      }
    }

    required_version = ">= 1.2.0"
}

Debug Output

https://gist.github.com/borrrden/65db1481e5e2a1e88e2cc6b64ce4b849

Expected Behavior

The init should succeed

Actual Behavior

The error message

╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/aws v4.67.0: failed to compute checksum for C:\Users\jim.borden\AppData\Local\Temp\terraform-provider4160808953: The system cannot find the path
│ specified.
╵

But, this file exists so I'm guessing it is something ELSE that cannot be found:

ls C:\Users\jim.borden\AppData\Local\Temp\terraform-provider4160808953

        Directory: C:\Users\jim.borden\AppData\Local\Temp


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a---         1/17/2025  12:02 PM       82080760   terraform-provider4160808953

Steps to Reproduce

  1. terraform init

Additional Context

No response

References

No response

Generative AI / LLM assisted development?

No response

@borrrden borrrden added bug new new issue not yet triaged labels Jan 17, 2025
@jbardin jbardin added windows waiting for reproduction unable to reproduce issue without further information labels Jan 17, 2025
@jbardin
Copy link
Member

jbardin commented Jan 17, 2025

Hi @borrrden,

There is really only one system call which would return that Windows error from that point, which is where the file is opened, so there not really anything else that it could be failing to find. The path is first normalized with filepath.EvalSymlinks though to give a better error in the case of a bad link, so it's possible the result of that is slightly different if there are any symlinks involved.

Do you have multiple filesystems or volumes linked together (I'm not sure what the windows terminology is for this)? The ls output has some unprintable/invalid unicode characters, I'm not sure if that's an artifact from copy&paste or maybe something obscuring the file name.

What we need to do here is either need to figure out how your system differs from other similar systems, or create a reproducible example for further investigation.

Thanks!

@borrrden
Copy link
Author

I do not have multiple filesystems here. The unprintable character there is just because I use a profile to make things print a little more pretty.

Here is the output without a profile set:

PS C:\Users\jim.borden> ls C:\Users\jim.borden\AppData\Local\Temp\terraform-provider4160808953


    Directory: C:\Users\jim.borden\AppData\Local\Temp


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         1/17/2025  12:02 PM       82080760 terraform-provider4160808953

@borrrden
Copy link
Author

Ok I found the problem actually. You reminded me that C:\Users\jim.borden is a symlink because so many programs have issues with what the folder actually is (C:\Users\Jim Borden with a space in it). If I alter $TMP to be the real path there is no issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new new issue not yet triaged waiting for reproduction unable to reproduce issue without further information windows
Projects
None yet
Development

No branches or pull requests

2 participants