Messagebox is not popping up any more in TeamCity build agent after upgrade to 9.1.5

Our teamcity build agent has been running on not user interactive mode. However some of our unit tests need to test that error messages were actually popping up. So the MessageBoxOption.ServiceNotification was added to the Messagebox.Show call. We created a method called KillMessagebox which uses Win32 Api to detect the Messagebox and kill the Messagebox. Everything worked fine until recently upgrade to version 9.1.5. Now the messagebox is either not popping up or silent goes away. Our KillMessagebox can't detect the messagebox any more. I have been trying to figure this problem out for a week now. If somebody can give me some help, I would really appreciate.

 

11 comments
Comment actions Permalink

Did you run TeamCity agent via console, not as service?

0
Comment actions Permalink

We run TeamCity agent as service. Thanks!

0
Comment actions Permalink

Are the tests executed successfully if you run agent via console?

0
Comment actions Permalink

Do you mean to start the teamcity agent by doing following?

 

<installation path>\bin\agent.bat start

 

We did not try that. but I can give it try if that is what you meant.

0
Comment actions Permalink

Yes, please try to start the agent using the command: 

<installation path>\bin\agent.bat start
0
Comment actions Permalink

Hi Alina:

I tried running the test using the command you provided and the test executed successfully.

Thanks for all your help!

Xiali

0
Comment actions Permalink

Hi Alian:

Was the information I provided above useful? Do you have some ideas what could be the problem? Your help is very much appreciated!

 

Thanks

 

Xiali

0
Comment actions Permalink

Hi Xiali,

There is a known limitation to start application with GUI if agent is running as service. For more details please see this section in the documentation.

0
Comment actions Permalink

Hi Alina:

Is this a new limitation on 9.1.5 or an old one? It has been working fine for us until we upgraded  the TeamCity to 9.1.5.

Thanks

Xiali 

0
Comment actions Permalink

No, there were no related changes in TeamCity 9.1.5. This limitation is caused be the agent started as service and was present in previous TeamCity versions. Are you sure that the agent was running as service before? 

0
Comment actions Permalink

Yes, we have been running the agent as a service. this is the first time for us to run the agent as a console application.

0

Please sign in to leave a comment.