Build failure "Command exited with code 259"
I'm looking for some help interpreting an error in our project's CI build. The process completes unit tests (with all tests passing) and the very next line is the error, "Command exited with code 259" (screenshot attached). There is no exception information displayed on the console or anywhere else I can find. We are using a SQL Server instance for our testing environment. Any help would be gratefully appreciated.
Best,
Vinney
- appveyor-error.PNG 19.4 KB
Comments are currently closed for this discussion. You can start a new one.
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
Support Staff 1 Posted by Feodor Fitsner on 01 Sep, 2014 06:00 PM
Is it NUnit?
-Feodor
2 Posted by Vinney Kelly on 01 Sep, 2014 07:11 PM
Yes. We're using nunit and SpecFlow.
Sent from my Windows Phone
________________________________
Support Staff 3 Posted by Feodor Fitsner on 01 Sep, 2014 07:57 PM
This is something within nunit runner. NUnit returns either one of standard negative exit codes or the number of failed tests: http://stackoverflow.com/questions/3889577/does-anyone-know-where-t... The footer in your build log shows there are no failed tests.
To make sure it's not AV console runner try running your tests using vanilla NUnit runner which can be installed from NuGet:
and then ...
4 Posted by Vinney Kelly on 01 Sep, 2014 09:43 PM
Thanks for the suggestion, Feodor. I have a test running now which uses the Script Test option rather than Auto. I've added both lines of script to the PowerShell script textbox. Based on the console output, I'm not expecting this will make any difference as both are very similar (screenshots attached). Additionally, I'm not finding this error code in any NUnit documentation which leads me to think the error is in the cleanup process and actually an NUnit response. I did find this bit of information regarding error code 259:
Is there any way you can check the error logs? If there's an exception being thrown, it's being swallowed before bubbling to the console.
Support Staff 5 Posted by Feodor Fitsner on 01 Sep, 2014 09:57 PM
Right, most probably there is a problem with
[TearDown]
method in some of the tests.AppVeyor shouldn't swallow anything, both StdOut and StdErr are being collected, specially in PowerShell mode where output is collected by PowerShell.
In that post they mention some permissions. How do you create the database? Is it MDF file attached or
CREATE DATABASE
and then filling it with schema/data?6 Posted by Vinney Kelly on 01 Sep, 2014 10:02 PM
We're using EF Migrations to create the database. Tests build up their own data and subsequently clear all data. We don't have any code making any attempts to teardown the database.
Support Staff 7 Posted by Feodor Fitsner on 01 Sep, 2014 10:06 PM
So, you don't have an error when calling runner from NuGet package?
8 Posted by Vinney Kelly on 01 Sep, 2014 10:12 PM
Test is still running. Still has about 30 minutes left. I'll report back with the result of the test.
9 Posted by Vinney Kelly on 01 Sep, 2014 11:45 PM
I had my doubts but it seems you were right! Executing the Nunit runner from the script worked finished without errors. Of course, this takes a dependency on the Nunit runner version number which will break on the next version release if left as is...
Support Staff 10 Posted by Feodor Fitsner on 03 Sep, 2014 03:17 AM
Well, that's interesting. Might be something with AppVeyor add-in pushing test results in a real-time.
Could you help me with a proof-of-concept please? Enable tests "Auto" back to use NUnit runner provided by AppVeyor and add this in before build or install section to delete add-ins folder with AppVeyor reporter:
Btw, you can specify version number while installing NUnit with Nuget:
11 Posted by Vinney Kelly on 03 Sep, 2014 02:57 PM
I'm attempting to initiate this test for you. However, I'm getting a new error regarding failure to resolve remote name 'www.nuget.org'. I can't imagine that adding the
rd
command in the pre-build script would have caused this. Furthermore, I've reverted the settings changes and the issue persists. I have no problems browsing nuget packages from within VS. Screenshot from console attached.Support Staff 12 Posted by Feodor Fitsner on 03 Sep, 2014 03:36 PM
It's not related. Might be a sporadic Azure DNS issue or maybe something was updated on nuget side.
Give it another try.
-Feodor
13 Posted by Vinney Kelly on 03 Sep, 2014 05:34 PM
Yeah, whatever that hiccup was, it's cleared up now. One thing which might shed some light on the situation, we're not explicitly installing Nunit.Runners. Perhaps I need to include that command in the environment script.
Test is running with the
rd
command as suggested. I'll report back with the results when it's completed.BTW, you rock the support line, Feodor :)
14 Posted by Vinney Kelly on 03 Sep, 2014 05:37 PM
15 Posted by Vinney Kelly on 03 Sep, 2014 05:40 PM
rd /s /q C:\Tools\NUnit\bin\addins
Is that supposed to be PS or CMD script? It's currently residing in the PS script block. If it needs to be CMD, can we have both script types side-by-side? We have some necessary PS script without which tests will not run.
Support Staff 16 Posted by Feodor Fitsner on 03 Sep, 2014 05:42 PM
It's CMD. For PS you can use:
It's possible to have CMD and PS side-by-side in
appveyor.yml
.17 Posted by Vinney Kelly on 03 Sep, 2014 05:57 PM
Fixed and re-running tests. Would you like to see the results of this test with the addition of the
nuget install NUnit.Runners
command?Support Staff 18 Posted by Feodor Fitsner on 03 Sep, 2014 06:01 PM
Sure, and also post the result of running with our runner but with add-ins deleted.
19 Posted by Vinney Kelly on 03 Sep, 2014 10:25 PM
Well, deleting the add-ins without installing the NUnit.Runners yields the same 259 error code. Deleting the add-ins AND installing NUnit.Runners results in 259 as well... Any other ideas?
-Vinney
Support Staff 20 Posted by Feodor Fitsner on 03 Sep, 2014 10:26 PM
So, when running with NUnit-console installed from nuget it works without 259 error?
-Feodor
21 Posted by Vinney Kelly on 03 Sep, 2014 10:37 PM
The only way I've been able to get it working w/o error is to use the script you prescribed (not Auto):
22 Posted by Vinney Kelly on 03 Sep, 2014 10:41 PM
Attached is a screenshot of NUnit running from the
Auto
configuration with theNUnit.Runners
package installed and therd C:\Tools\NUnit\bin\addins -Recurse -Force
command executing pre-build.23 Posted by Vinney Kelly on 03 Sep, 2014 11:57 PM
Maybe you already know this, but when I run tests using the above mentioned script, we don't get any test logs. That's no fun and essentially makes that a non-acceptable fix.
Support Staff 24 Posted by Feodor Fitsner on 04 Sep, 2014 12:10 AM
You can generate XML test results and then upload them to AppVeyor: http://www.appveyor.com/docs/running-tests#test-results
25 Posted by Vinney Kelly on 04 Sep, 2014 04:18 PM
Hm. Well, that's certainly less than ideal. Automation is the goal after all. Are you saying that our project is just not going to work with the
Auto
test functionality? If so, do you know what might be causing this issue?Support Staff 26 Posted by Feodor Fitsner on 04 Sep, 2014 04:28 PM
Is there any way to reproduce the issue with a simpler/smaller tests (ideally, one test)? We'd like to work on the issue.
27 Posted by Vinney Kelly on 08 Sep, 2014 08:38 PM
We'll try to get that test set up for you this week.
Support Staff 28 Posted by Feodor Fitsner on 08 Sep, 2014 09:01 PM
Cool! In the meantime, I'm in the process of re-working communication layer between build agent and nunit/xunit. Will be interesting to see if it makes a difference.
Support Staff 29 Posted by Feodor Fitsner on 12 Sep, 2014 04:25 AM
Hi Vinney,
We've deployed an update to AppVeyor with slightly different communication layer between NUnit and AV agent. I'm wondering if you are still able to reproduce "259" issue with an update?
30 Posted by Vinney Kelly on 12 Sep, 2014 09:15 PM
Feodor, we've introduced a bug in our latest build. I'll let you know how your update affects the 259 issue Monday after we have our bug fixed.