Skip to content

[Bug] Linux: Race condition during Git Sync causes "Script not found" and schedule deserialization errors #5589

@lysharing

Description

@lysharing

Description of Issue

On PowerShell Universal running on Linux, a race condition occurs during the Git Sync cycle. The engine attempts to validate and deserialize schedules.ps1 before the new script files (pushed in the same commit) have been fully indexed/registered in the internal metadata database.

Steps to Reproduce
Use a PSU instance on Linux with Git Sync enabled (Automatic mode).

Create a new directory and a script locally (e.g., TestB/script.ps1).

Update schedules.ps1 adding new schedule to point to this new path.

Push both the directory/script and the config change in a single Git commit and uptadate schedule from TestA folder to TestB folder.

Observe the System Logs during the next sync cycle.

Actual Behavior
The logs show a deserialization error because the script is not yet "known" by the system when the configuration is reloaded. This happens systematically for any new folder/script combination pushed simultaneously:

Plaintext

Examples from our logs:

[XX:XX:XX] Error deserializing schedules.ps1: Script 'TestA/script.ps1' not found
[XX:XX:XX] Error deserializing schedules.ps1: Script 'TestB/script.ps1' not found
Impacts:

The schedules fail to load and disappear from the UI.

Sometimes triggers a blank /status page and an unresponsive Management API.

Manual execution fails with a "Failed to start" popup (no logs recorded).

Expected Behavior
The Git Sync process should ensure that all physical file changes (scripts) are fully indexed and registered before triggering the validation of configuration files (schedules.ps1) that depend on those files.

Additional Context
OS: Linux (Casing has been verified and matches exactly).

Settings: "Code First Editing" and "Auto Reload" are Disabled, but the issue persists during Git Sync.

Workaround: A "Staged Commit" (pushing the script first to TestB/, waiting for a sync cycle, then pushing the schedules.ps1 update) works, confirming it is a timing/ordering issue.

Community: Other users report similar behavior

Version

2026.1.2

Severity

Low

Hosting Method

Docker Container

Operating System

Linux

Database

SQL

Licensed

Yes

Features

No response

Additional Environment data

No response

Screenshots/Animations

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    requires triageIssue has not yet been verified by the development team.v5Version 5 issue.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions