Forum Discussion

latencytr's avatar
latencytr
New Contributor
8 months ago
Solved

Session Creator : Failed to create the user session.

I'm using SessionCreator to run my tests via Gitlab CI/CD Pipeline on our corporate computer.

I have configured all the related requirements from here [Session Creator Official Documentation].

Here is my problem:

 

When I tried to trigger my test via SessionCreator from Gitlab CI/CD pipeline, I got below message:

SessionCreator : Failed to create the user session.
The user 'MY_DOMAIN_NAME\MY_USER_NAME' failed to log in to this host using Remote Desktop. Failed to establish an RDP connection with a remote computer.

When I was connected to test machine from my computer via RDP and I was triggering CI/CD pipeline, my tests worked fine. I use /UseActiveSession option. However, it didn't work unless I connected to the test machine via RDP.

When I searched the internet, I found out some similar errors and I tried them all. Nevertheless, I couldn't find a solution.

I check out this solution [Session-Creator-New-User-Session-Windows-Settings ], but in our Company's Group Policy, NLA is enabled by default. And I can't disable it.

 

Any suggestion will help.

  • See Disconnecting From Remote Desktop While Running Automated Tests.

     

    There needs to be an active session on your remote machine. You log into your remote machine using User1. Call tscon to disconnect your session (it will remain active). Then call SessionCreator with parameters e.g. /UserName:User1 /password:'Password1' /UseActiveSession.

     

    SessionCreator can not log into your remote machine, but it can connect to an active session.

3 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    See Disconnecting From Remote Desktop While Running Automated Tests.

     

    There needs to be an active session on your remote machine. You log into your remote machine using User1. Call tscon to disconnect your session (it will remain active). Then call SessionCreator with parameters e.g. /UserName:User1 /password:'Password1' /UseActiveSession.

     

    SessionCreator can not log into your remote machine, but it can connect to an active session.

    • latencytr's avatar
      latencytr
      New Contributor

      It solves the SessionCreator issue, but all of my tests start to fail. I guess, it is related to screen resolution. I actually specify screen resolution as 1920x1080 with /ScreenResolution:'1920*1080' parameter. Do I need to fix all my tests?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Ah yes, I forgot /ScreenResolution:"1920*1080" parameter as well. When you don't specify the screen resolution parameter it defaults to something like 1024*768. Also your VM needs to have enough video memory to support 1920*1080 too.

     

    If your tests are using OCR, then you need to use the exact resolution.