This guide provides steps for troubleshooting issues when commands sent from Swif to Windows devices remain in the "Pending" state, particularly for commands involving Winget or custom scripts.
Symptoms
Commands issued through Swif remain in the "Pending" state.
Device agent stops reporting home, increasing the "Last Connected" interval.
The device remains online and accessible via Live Terminal or Remote Desktop, but the command execution stalls.
Possible Causes
Commands running as the system user may encounter issues not observed when running manually.
Certain commands or scripts may cause the Swif agent to await responses indefinitely.
How Commands are Processed in Swif
When a command is sent:
The command is added to the execution queue (status: Pending).
The device attempts execution and waits for the command to complete.
If the command does not complete within 15 minutes, it times out, and Swif marks it as Expired.
Recommended Troubleshooting Steps
Step 1: Local Execution Test
Log into the affected Windows device.
Open CMD or PowerShell manually.
Run your command or script directly (e.g., Winget installation).
winget install --silent --exact --accept-package-agreements --accept-source-agreements --id OpenWhisperSystems.Signal
Confirm it completes without errors.
Step 2: Check Command Permissions
Commands via Swif execute as the system user, which may differ from local administrator execution.
Ensure your script or command can run successfully with system-level privileges.
Step 3: Use Live Terminal for Verification
Access the Live Terminal in Swif.
Execute the command from here to simulate the environment closely to how Swif executes the command.
Step 4: Monitor Timeout
If the command takes longer than expected, wait for Swif’s built-in timeout (15 minutes).
Verify that Swif marks it as Expired and clears the queue.
Upcoming Improvements
Swif is actively working on a solution to allow commands to run as a local user rather than the system user. This upcoming feature is expected to resolve common permission-related command execution issues.
Need Further Assistance?
If you continue experiencing issues, please contact Swif Support or visit our Help Center.
Last Updated: (Insert Date)