Getting "Unable to create a new user process" error during build

Aleksandr's Avatar

Aleksandr

15 Nov, 2018 04:46 PM

Hi.
I have a deploy job which throws this error on one only environment when it tries to run before-deploy.ps1 script:

Appveyor.DeploymentAgent.Service.exe Information: 0 : Looking for before-deploy.ps1 at C:\Users\aartemov\AppData\Local\Temp\sjw1p3u0\before-deploy.ps1
Appveyor.DeploymentAgent.Service.exe Information: 0 : Deployment job l6i95kimgb0nfp2p error: Unable to create a new user process.
Appveyor.DeploymentAgent.Service.exe Information: 0 : Deployment job finished: l6i95kimgb0nfp2p
I appears even if *.ps1 file is empty.

Execution policy for powershell is set to "Unrestricted". Agent running under administrator.
It runs smoothly on other machine (environment). Machines are almost identical (i mean both running same OS, have almost same apps installed and belongs to one domain and share same policies)
What could i possibly do wrong there?

Thanks in advance.
Regards,
Alex.

  1. Support Staff 1 Posted by Ilya Finkelshte... on 15 Nov, 2018 11:51 PM

    Ilya Finkelshteyn's Avatar

    Hi Aleksandr,

    Can you please try those steps:

    • Login under user administrator and run Get-ExecutionPolicy -Scope CurrentUser just to ensure that it is not overwritten for specific user. I understand that with AD group policies chances are very slim, just to double-check.

    • Try to make it run under Local System. However I believe you have a reason to make it work as administrator because it probably needs network access or something like that.

    • Try this pre-release version of agent: https://appveyor.com/downloads/deployment-agent/6.1.0/AppveyorDeplo.... it contains some changes related to the way script is executed which might help.

    Let us know what you found.

    Ilya.

  2. 2 Posted by Aleksandr on 16 Nov, 2018 07:59 AM

    Aleksandr's Avatar

    Thanks for your responce, Ilya.
    * I installed 6.1.0, bot ther result is same * Execution policy for CurrentUser is "Unrestricted" * Deployment passed when i used service running as LOCAL SYSTEM acc. This is already something new (struggled all the day to get other response yesterday!) But the reason why i can't use this option - i'm running UI tests (for windows desktop application) after deployment. And i can't see anything on the screen. Even if i enabled service to interact with the desktop.

    It looks there is something with the permissions...

    Anyway, thanks a lot.
    Regards,
    Alex

  3. 3 Posted by Aleksandr on 16 Nov, 2018 01:55 PM

    Aleksandr's Avatar

    Ok.
    It looks like something wrong with the account on a particular machine.
    I added another (cloud) machine to environments list and it successfully deployed. So there is nothing to resolve (hopefully windows reinstall will cure this machine :) )

    Anyway, thanks for the responses!

  4. Support Staff 4 Posted by Ilya Finkelshte... on 16 Nov, 2018 04:06 PM

    Ilya Finkelshteyn's Avatar

    Welcome :) Sorry could not help more. I would also try to create another admin user and try it. Or delete the profile of the current admin (being logged as a different user).

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac