tag:help.appveyor.com,2012-11-13:/discussions/problems/15040-defunct-deployment-state-after-env-variables-missingAppVeyor: Discussion 2018-09-09T21:00:34Ztag:help.appveyor.com,2012-11-13:Comment/456524662018-07-09T19:06:27Z2018-07-09T23:05:11ZDefunct Deployment State after Env. Variables missing<div><p>Currently have a deployment that is ultimately failing after the deployment error was conveyed after completing Deploy.ps1:</p>
<p>Remove-Item : Cannot find path 'Env:\APPLICATION_NAME' because it does not exist.</p>
<p>Now every deployment to this environment cannot execute Deploy.ps1 because all environment variables are missing.<br>
Have a similar but separate environment that deploys to the same machine and uses the an identical copy of the Deploy.ps1 without issue, completing its deployment successfully every time.</p>
<p>Is there some way to cleanup the failing environment to restore to the previous good state?</p></div>Matthew Smithtag:help.appveyor.com,2012-11-13:Comment/456524662018-07-09T22:42:02Z2018-07-09T22:42:04ZDefunct Deployment State after Env. Variables missing<div><p>Restarting the machine (an EC2 instance) has resolved the issue. Assuming that restarting the AppVeyor Agent would also have a similar effect in refreshing the environment that Its running under. This at least rules out a left over artifact causing issues but would like to know what might have corrupted the agents environment in the first place.</p></div>Matthew Smithtag:help.appveyor.com,2012-11-13:Comment/456524662018-07-09T23:41:27Z2018-07-09T23:41:48ZDefunct Deployment State after Env. Variables missing<div><p>I wonder if this can be <a href="https://github.com/appveyor/ci/issues/2016">this</a> issue, and if yes, it may re-occur. It might happen that environment variables from different environments corrupt one another. If you are not using using <a href="https://www.appveyor.com/downloads/deployment-agent/latest/AppveyorDeploymentAgent.msi">latest</a> deployment agent, please update and let us see how it goes.</p></div>Ilya Finkelshteyn