flyctl deploy --local-only - "error building: failed to dial gRPC: http: invalid Host header"

I can confirm that using --local-only with flyctl installed from the script works.

Rearding “flyctl >= v0.1.59 made this context building part much faster than the previous versions. Could you try remote builder once again with the latest flyctl?”, that’s great to hear!

@kaz and @jphenow - thanks a lot for your support on this one guys!

1 Like

Thanks and sorry for the inconvenience. The fix above has been merged and v0.1.63 has released. So --local-only should work without FROM --platform!

No worries at all!

Hello, I still get this error on M2 Pro MacBook where fly is installed with HomeBrew.

here is the error

fly deploy --local-only
==> Verifying app config
Validating ***/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
==> Building image with Docker
--> docker host: 24.0.2 linux aarch64
[+] Building 0.0s (0/0)
Error: failed to fetch an image or build from source: error building: failed to dial gRPC: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: http: invalid Host header"

Here is the version I have

fly version update
Already running latest flyctl v0.1.66

fly version
fly v0.1.66 darwin/arm64 Commit: 01075166a03c73f81747a0bf55dc070e7e4a6c1f-dirty BuildDate: 2023-07-28T18:05:53Z

After installing it with the curl ... .sh I don’t get this error, but local build fails after a long time.
docker compose build finishes in 100 seconds but fly deploy --local-only fails after 1263 seconds. But the error is related to swift package resolve. Here is the Dockerfile and the project template I’m using https://github.com/vapor/template-bare/blob/main/Dockerfile

remote builder worked without a problem, by the way.

Currently flyctl is picky about Go versions. Go 1.20.6 doesn’t work and Homebrew built flyctl with the version. Fortunately, Docker’s latest version supports Go 1.20.6 and I’m upgrading flyctl to use the version.

This issue seems different. Can you start a new Discourse thread?