[GH-ISSUE #1737] The handle is invalid - windows 11 #851

Closed
opened 2026-03-01 21:46:53 +03:00 by kerem · 1 comment
Owner

Originally created by @magedhelmy1 on GitHub (Apr 17, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1737

Bug report info

(.env) C:\Users\maged\Desktop\projects\compute-local>act --bug-report
act version:            0.2.43
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 32
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        \\.\pipe\docker_engine
Config files:
Build info:
        Go version:            go1.18.10
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.43 -X main.commit=44b510f48cac6a58654bf920ee26cc6e1d36ac3a -X main.date=2023-03-01T02:33:51Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         44b510f48cac6a58654bf920ee26cc6e1d36ac3a
                vcs.time:             2023-03-01T02:33:29Z
                vcs.modified:         false
Docker Engine:
        Engine version:        20.10.24
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             5.15.90.1-microsoft-standard-WSL2
        OS CPU:                32
        OS memory:             32065 MB
        Security options:
                name=seccomp,profile=default
                name=cgroupns


level=info msg=️📣 A newer version of 'act' is available - consider ugrading to 0.2.44.

Command used with act

C:\Users\maged\Desktop\projects\compute-local>act -p ubuntu-latest:12 -v -d
Error: unknown shorthand flag: 'd' in -d


C:\Users\maged\Desktop\projects\compute-local>act -p ubuntu-latest:12 -v   
time="2023-04-17T17:58:58+02:00" level=debug msg="Loading environment from C:\\Users\\maged\\Desktop\\projects\\compute-local\\.env"
time="2023-04-17T17:58:58+02:00" level=debug msg="Conditional GET for notices etag=b3720412-909f-4b7a-85f0-93b22247e4f1"
time="2023-04-17T17:58:58+02:00" level=fatal msg="Error loading from C:\\Users\\maged\\Desktop\\projects\\compute-local\\.env: read C:\\Users\\maged\\Desktop\\projects\\compute-local\\.env: The handle is invalid."

Describe issue

I was never able to get act to work in windows 11 - here is the error:

(.env) C:\Users\maged\Desktop\projects\compute-local>act -v
time="2023-04-17T17:57:10+02:00" level=debug msg="Loading environment from C:\Users\maged\Desktop\projects\compute-local\.env"
time="2023-04-17T17:57:10+02:00" level=debug msg="Conditional GET for notices etag=b3720412-909f-4b7a-85f0-93b22247e4f1"
time="2023-04-17T17:57:10+02:00" level=fatal msg="Error loading from C:\Users\maged\Desktop\projects\compute-local\.env: read C:\Users\maged\Desktop\projects\compute-local\.env: The handle is invalid."

No response

Workflow content

name: Build Executable

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: windows-latest

    steps:

      - uses: actions/checkout@v3

      - uses: actions/setup-python@v2.2.2
        with:
          python-version: '3.10.10' 
          architecture: 'x64'

      - name: Install Dependencies
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          git config --global credential.helper store # This command stores the credentials locally so that they can be used in subsequent git commands
          export GIT_TERMINAL_PROMPT=0
          pip install -r requirements.txt
          set DEPENDENCIES_PATH=$(python -c 'import site; print(site.getsitepackages()[0])')
          echo "Dependencies installed at $DEPENDENCIES_PATH"


      - name: Build Executable
        run: |
          pyinstaller --noconfirm --onedir --console --log-level "ERROR" --add-data "$DEPENDENCIES_PATH;."  "backend/manage.py"

      - name: Create Release
        id: create_release
        uses: actions/create-release@v1.0.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          body: Automated build of release ${{ github.ref }}

Relevant log output

Same as above

Additional information

No response

Originally created by @magedhelmy1 on GitHub (Apr 17, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1737 ### Bug report info ```plain text (.env) C:\Users\maged\Desktop\projects\compute-local>act --bug-report act version: 0.2.43 GOOS: windows GOARCH: amd64 NumCPU: 32 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: \\.\pipe\docker_engine Config files: Build info: Go version: go1.18.10 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -compiler: gc -ldflags: -s -w -X main.version=0.2.43 -X main.commit=44b510f48cac6a58654bf920ee26cc6e1d36ac3a -X main.date=2023-03-01T02:33:51Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: windows GOAMD64: v1 vcs: git vcs.revision: 44b510f48cac6a58654bf920ee26cc6e1d36ac3a vcs.time: 2023-03-01T02:33:29Z vcs.modified: false Docker Engine: Engine version: 20.10.24 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 5.15.90.1-microsoft-standard-WSL2 OS CPU: 32 OS memory: 32065 MB Security options: name=seccomp,profile=default name=cgroupns level=info msg=️📣 A newer version of 'act' is available - consider ugrading to 0.2.44. ``` ### Command used with act ```sh C:\Users\maged\Desktop\projects\compute-local>act -p ubuntu-latest:12 -v -d Error: unknown shorthand flag: 'd' in -d C:\Users\maged\Desktop\projects\compute-local>act -p ubuntu-latest:12 -v time="2023-04-17T17:58:58+02:00" level=debug msg="Loading environment from C:\\Users\\maged\\Desktop\\projects\\compute-local\\.env" time="2023-04-17T17:58:58+02:00" level=debug msg="Conditional GET for notices etag=b3720412-909f-4b7a-85f0-93b22247e4f1" time="2023-04-17T17:58:58+02:00" level=fatal msg="Error loading from C:\\Users\\maged\\Desktop\\projects\\compute-local\\.env: read C:\\Users\\maged\\Desktop\\projects\\compute-local\\.env: The handle is invalid." ``` ### Describe issue I was never able to get act to work in windows 11 - here is the error: (.env) C:\Users\maged\Desktop\projects\compute-local>act -v time="2023-04-17T17:57:10+02:00" level=debug msg="Loading environment from C:\\Users\\maged\\Desktop\\projects\\compute-local\\.env" time="2023-04-17T17:57:10+02:00" level=debug msg="Conditional GET for notices etag=b3720412-909f-4b7a-85f0-93b22247e4f1" time="2023-04-17T17:57:10+02:00" level=fatal msg="Error loading from C:\\Users\\maged\\Desktop\\projects\\compute-local\\.env: read C:\\Users\\maged\\Desktop\\projects\\compute-local\\.env: The handle is invalid." ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Build Executable on: push: branches: - main jobs: build: runs-on: windows-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v2.2.2 with: python-version: '3.10.10' architecture: 'x64' - name: Install Dependencies env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git config --global credential.helper store # This command stores the credentials locally so that they can be used in subsequent git commands export GIT_TERMINAL_PROMPT=0 pip install -r requirements.txt set DEPENDENCIES_PATH=$(python -c 'import site; print(site.getsitepackages()[0])') echo "Dependencies installed at $DEPENDENCIES_PATH" - name: Build Executable run: | pyinstaller --noconfirm --onedir --console --log-level "ERROR" --add-data "$DEPENDENCIES_PATH;." "backend/manage.py" - name: Create Release id: create_release uses: actions/create-release@v1.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} body: Automated build of release ${{ github.ref }} ``` ### Relevant log output ```sh Same as above ``` ### Additional information _No response_
kerem 2026-03-01 21:46:53 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@magedhelmy1 commented on GitHub (Apr 17, 2023):

deleted .env and this error is bypassed

<!-- gh-comment-id:1512059962 --> @magedhelmy1 commented on GitHub (Apr 17, 2023): deleted .env and this error is bypassed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#851
No description provided.