-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Cypress works on Microsoft Hosted Agent but not on self-hosted #6135
Replies: 6 comments · 27 replies
-
@aleqsss we also apply some memory configuration though not sure it is related. Could you share the complete log as the screenshot doesn't show much data. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello @miketimofeev, Thanks alot for your assistance, truly appreciated. I'll provide you with the complete logs from working and non-working runs (I'll add them in separate comments to avoid cluttering in this reply). We're using the exact same pipeline, when testing on our self-hosted and Microsoft Hosted agents. I also want to point out that Cypress works on our self-hosted setup, until version 8.6.0 of Cypress. When changing to Cypress version 8.6.0 and above, these crashes start to appear. However, Cypress version 8.6.0 and above works on the Microsoft Hosted agents, this is what I find really strange. So for example, this version (and below) works on our self-hosted and Microsoft Hosted agents: Cypress package version: 8.5.0 And this version (and above) works on the Microsoft Hosted agents but not our self-hosted ones: Cypress package version: 8.6.0 |
Beta Was this translation helpful? Give feedback.
All reactions
-
Log from a self-hosted agent where Cypress runs unsuccessfully and the error appears (version 8.6.0):
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Log from a self-hosted agent where Cypress runs successfully (version 8.5.0):
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Log from a Microsoft Hosted agent where Cypress runs successfully (version 8.7.0);
|
Beta Was this translation helpful? Give feedback.
All reactions
-
@aleqsss could you provide a log from hosted and Cypress 8.6.0? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Sorry, got caught up in work. I'll run the pipeline right away, and I'll attach the log here as soon as it's done! 🙂 |
Beta Was this translation helpful? Give feedback.
All reactions
-
Here you are, sorry for the delay! Log from a Microsoft Hosted agent where Cypress runs successfully (version 8.6.0):
|
Beta Was this translation helpful? Give feedback.
All reactions
-
@aleqsss could you try building a new image from the latest main? I see that you are on the previous Linux kernel version |
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Now it outputs Linux 5.15.0-1017-azure so it must have been because of an older run and the image is now up to date:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
@aleqsss thanks. Two more suggestions:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Yes, I've tried it directly on the self-hosted VM (without the pipeline and the VSTS agent). Unfortunately I get the same error while doing so. |
Beta Was this translation helpful? Give feedback.
All reactions
-
@aleqsss looks the same as in hosted VMs. Another shot. Could you try applying post-gen scripts to the self-hosted VM? https://github.com/actions/runner-images/tree/main/images/linux/post-generation |
Beta Was this translation helpful? Give feedback.
All reactions
-
@aleqsss it looks like I found the root cause! |
Beta Was this translation helpful? Give feedback.
All reactions
-
Splendid, this is indeed a great finding! 😃 I can see that the following documentation, running the agent as a systemd service, brings up the install and start procedure you're suggesting. However, we're using Azure virtual machine scale set agents, documented here: So I'm not sure how I should go on about installing and starting the agent in your suggested way, since it's all taken care of in the background as an unattended config. Perhaps we could use Customizing Pipeline Agent Configuration, however, not sure which value (environment variable) I should set, if even possible from here? Or perhaps something could be done with: Do you have any nice suggestions/input here? Perhaps there's a completely different approach to get it to work from run.sh, which can be applied for our use case? It's quite interesting that it works from run.sh up until version 8.6.0, but still works when being run as a systemd service after. What is the difference here? Thanks a bunch so far, it's as mentioned before - greatly appreciated! |
Beta Was this translation helpful? Give feedback.
All reactions
-
It looks like when running as a service the job is running in non-interactive mode and that can make a difference. I noticed that by missing |
Beta Was this translation helpful? Give feedback.
All reactions
-
Alright! One thing I find strange though, is that when I run it manually by logging in to the machine, I get the same error as when run from the pipeline, so by not running it from the agent I mean. But yes, that would mean that it's being run interactive I guess. Have you tried running it manually by logging in to the machine? If so, what was your result? Did that not work for you either? Does the Microsoft Hosted Agents run the assigned jobs as a systemd non-interactive service, like with |
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
We're locking this discussion because it has not had recent activity and/or other members have asked for more information to assist you but received no response. Thank you for helping us maintain a productive and tidy community for all our members. |
Beta Was this translation helpful? Give feedback.
-
Hi,
We have a set of Cypress tests, running fine in the ubuntu-latest Microsoft Hosted Agent pool.
Using the create-image-and-azure-resources.md guide, provided in this repository, we're generating the Ubuntu 20.04 image.
The issue is, that when running Cypress on our generated image, Cypress crashes, which it doesn't on the Microsoft Hosted one, on which everything works just fine.
For our self-hosted agent we're even using the same SKU of the Virtual Machine, which the documentation says that the Microsoft Hosted Agent pools does; Standard_DS2_v2.
How come that Cypress is working on the Microsoft Hosted Agent pools, but not on our self-hosted one, when we're generating our image from the same source?
On our self-hosted agent we get the following error (Chromium Renderer process is crashing):

On the Microsoft Hosted one, we don't get this error and our tests runs just fine.
How is this possible?
Input is appreciated. 🙂
Beta Was this translation helpful? Give feedback.
All reactions