I am facing an issue with Global Variables in UiPath Studio after pulling and merging code from my teammate.
• Project type: Process
• Global variables (testID, suiteID, reportID, etc.) are visible in Data Manager and in .project/globalVariables.json.
• But they are not accessible in any workflow (old or new).
• I get errors like:
• “Global variable is inaccessible in this context”
• or “The name reportID does not exist in the current context”.
I already tried:
• Deleting .local folder and reopening the project
• Validating project
• Setting Isolated = False for invoked workflows
• Simplifying TypeFullyQualifiedName in globalVariables.json (e.g., System.String)
Still, the error persists.
Questions:
1. Why are global variables visible in Data Manager but inaccessible in all workflows?
2. How can I refresh or regenerate GlobalVariables so they compile properly?
3. Is there a known fix if global variable metadata got corrupted after a merge?
You can try clearing the .local and .settings folders then reopen the project to force regeneration of global variables, ensure all workflows are under the same project namespace, and re-save global variables from Data Manager to trigger proper compilation.
Thanks for the suggestion! I tried deleting the .local and .settings folders as you recommended, but in my case, the issue persisted.
Ultimately, I resolved it by performing a hard reset of my branch to a previous commit, which restored the project to a clean state before the merge. After that, the global variables started working correctly.
Appreciate your guidance — this approach worked for my scenario!
Entirely clearing the local folder can actually make things like this worse sometimes.
Whilst there are some things that can be fixed be removing some of the stuff in it, you can also remove different settings and configurations.
I’d suggest being more targetted, and only removing stuff you know what it does, rather than nuking the entire folders.