[GH-ISSUE #3352] macOS: error 1200 during server setup after launching AmneziaVPN from the PKG installer #3206

Open
opened 2026-10-30 04:57:47 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @odmin4eg on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3352

Environment

  • AmneziaVPN 5.0.3.0, macOS x64 PKG
  • macOS 26.6.2 (25G83)
  • Server: Ubuntu 22.04.5 LTS

Steps leading to the issue

  1. Install AmneziaVPN using the macOS PKG installer.
  2. Use the application automatically launched by the installer.
  3. Start a self-hosted AmneziaWG server installation.

Actual result

ErrorCode: 1200. QFile error: The file could not be opened

Docker was successfully installed on the server, but /opt/amnezia/amnezia-awg2/Dockerfile was created with a size of 0 bytes. No VPN container was created.

Diagnostic findings

The running AmneziaVPN process inherited:

TMPDIR=/private/tmp/PKInstallSandbox.<id>/tmp

That directory no longer existed when server setup failed (confirmed by inspecting the process environment and checking the directory).

The installer log showed that post_install.sh launched AmneziaVPN with open -a.

Source inspection suggests the following failure chain:

  • In SshSession::uploadFileToHost(), the return values of QTemporaryFile::open() and write() are not checked before attempting SCP.
  • The SCP implementation creates the remote file before opening the local source file.
  • Failure to open the local source maps to QFile OpenError (1200), leaving the remote Dockerfile empty.

Relevant source:

Workaround verified

Fully quit AmneziaVPN and relaunch it from Applications. After relaunching, the Dockerfile uploaded successfully (1461 bytes), the image built, and the amnezia-awg2 container started successfully on the same server. No server package changes were needed.

Expected behavior / suggested improvements

  • Avoid inheriting the installer's temporary directory when launching the application from post_install.sh.
  • Validate that the temporary directory exists and is writable; use a valid fallback if necessary.
  • Check temporary-file open/write results before starting SCP.
  • Show an actionable error explaining that a local temporary file could not be created/opened.

This report concerns the macOS temporary-directory issue; netcat was present on the server.

Originally created by @odmin4eg on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3352 ## Environment - AmneziaVPN 5.0.3.0, macOS x64 PKG - macOS 26.6.2 (25G83) - Server: Ubuntu 22.04.5 LTS ## Steps leading to the issue 1. Install AmneziaVPN using the macOS PKG installer. 2. Use the application automatically launched by the installer. 3. Start a self-hosted AmneziaWG server installation. ## Actual result `ErrorCode: 1200. QFile error: The file could not be opened` Docker was successfully installed on the server, but `/opt/amnezia/amnezia-awg2/Dockerfile` was created with a size of 0 bytes. No VPN container was created. ## Diagnostic findings The running AmneziaVPN process inherited: ```text TMPDIR=/private/tmp/PKInstallSandbox.<id>/tmp ``` That directory no longer existed when server setup failed (confirmed by inspecting the process environment and checking the directory). The installer log showed that post_install.sh launched AmneziaVPN with `open -a`. Source inspection suggests the following failure chain: - In `SshSession::uploadFileToHost()`, the return values of `QTemporaryFile::open()` and `write()` are not checked before attempting SCP. - The SCP implementation creates the remote file before opening the local source file. - Failure to open the local source maps to QFile OpenError (1200), leaving the remote Dockerfile empty. Relevant source: - https://github.com/amnezia-vpn/amnezia-client/blob/dev/deploy/data/macos/post_install.sh - https://github.com/amnezia-vpn/amnezia-client/blob/dev/client/core/utils/selfhosted/sshSession.cpp - https://github.com/amnezia-vpn/amnezia-client/blob/dev/client/core/utils/selfhosted/sshClient.cpp ## Workaround verified Fully quit AmneziaVPN and relaunch it from Applications. After relaunching, the Dockerfile uploaded successfully (1461 bytes), the image built, and the amnezia-awg2 container started successfully on the same server. No server package changes were needed. ## Expected behavior / suggested improvements - Avoid inheriting the installer's temporary directory when launching the application from post_install.sh. - Validate that the temporary directory exists and is writable; use a valid fallback if necessary. - Check temporary-file open/write results before starting SCP. - Show an actionable error explaining that a local temporary file could not be created/opened. This report concerns the macOS temporary-directory issue; netcat was present on the server.
Author
Owner

@agmitron commented on GitHub (Nov 1, 2026):

Thanks for the workaround!

<!-- gh-comment-id:6556886180 --> @agmitron commented on GitHub (Nov 1, 2026): Thanks for the workaround!
Sign in to join this conversation.
No labels
pull-request
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
amnezia-vpn/amnezia-client#3206
No description provided.