mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 15:05:57 +03:00
[GH-ISSUE #1613] Empty environmental variable results in fork/exec error #2952
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#2952
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NiceGuyIT on GitHub (Aug 23, 2023).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1613
Server Info (please complete the following information):
Installation Method:
Agent Info (please complete the following information):
Describe the bug
When an environmental variable is added but doesn't have a value, a
fork/exec C:\Program Files\TacticalAgent\py38-x64\python.exe: The parameter is incorrect.is thrown. Specifically, if you addNOT_SETto the environmental variables section, the error will be thrown. If you addNOT_SET=, the error is not thrown.To Reproduce
Steps to reproduce the behavior:
SOMETHINGorNOT_SETorWHATEVER.Expected behavior
I would expect a better error message, perhaps something pointing me to an invalid environmental variable. For this one particular script, I had many env vars and the problematic variable was off the screen to the right. If you add a long environmental variable, the widget window size increases horizontally and variables can become hidden. See the 2nd and 3rd screenshots for an example.
Ideally, I don't want to waste time troubleshooting an issue on the agent (
fork/exec) when it's actually a problem with the scripting parameters (The parameter is incorrect). Maybe provide which type of parameter is incorrect: "The environmental parameter(s) is incorrect".Screenshots

This will also generate the error. The problematic variable is off the screen to the right as shown in the 2nd screenshot.

Additional context
Here's the output from the agent when run in debug mode.