Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The "AreNuGetPackagesSafe" task failed unexpectedly": warn instead of fail #14

Open
EliezerBee opened this issue Mar 31, 2015 · 8 comments

Comments

@EliezerBee
Copy link

We use SafeNuGet with Jenkins. Last night, as happens occasionally, the builds failed with these errors:

18:46:35 C:........\packages\SafeNuGet.1.0.10\build\SafeNuGet.targets(4,5): error MSB4018: The "AreNuGetPackagesSafe" task failed unexpectedly.
18:46:35 C:........\packages\SafeNuGet.1.0.10\build\SafeNuGet.targets(4,5): error MSB4018: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

It would seem to me that if the updated SafeNuGet list just isn’t reachable for download that the build should succeed and the download can be retried afterwards. (Of course, if there were actually unsafe packages, it should certainly fail.) Might that be an option?

Thanks,
Eliezer

@eoftedal
Copy link

eoftedal commented Apr 8, 2015

That would be a silent failure... Which may give a false sense of security...
Allthough I see your point, I'm not sure I agree.

@EliezerBee
Copy link
Author

I think of it more as a graceful failure.
When this happens currently, we often need to manually retry builds several times in order to get it to succeed. Due to this issue, the opinion that it's not worth to continue using SafeNuGet has been gaining popularity in our group of developers.
What about making it a warning instead of a failure?

@truk
Copy link

truk commented Apr 8, 2015

+1 Our team has the same issue. A warning option would be great

@borota
Copy link

borota commented Apr 8, 2015

Yes please change this to be a warning instead.

@Luke-McRedmond
Copy link

i had this issue, i got the project from source control and when i tried to build it, it kept giving me this error.
Over over the error and i got the full exception,

Error The "AreNuGetPackagesSafe" task failed unexpectedly.
System.Net.WebException: An exception occurred during a WebClient request. ---> System.UnauthorizedAccessException: Access to the path 'projectpath\packages\SafeNuGet.1.0.10\build\cache\unsafepackages.xml.new' is denied.

removed the readonly access on the SafeNuGet.1.0.10 and all worked again

@mattbrooks2010
Copy link

The "AreNuGetPackagesSafe" task failed unexpectedly.
System.Net.WebException: An exception occurred during a WebClient request. ---> System.IO.IOException: The process cannot access the file 'C:\Builds_work\195\s\Source\packages\SafeNuGet.1.0.10\build\cache\unsafepackages.xml.new' because it is being used by another process.

image

This issue seems to occur most regularly when the build is attempted on a machine for the first time. Subsequent builds are successful, presumably because the unsafepackages.xml.new file cache is not being written to.

@eoftedal
Copy link

eoftedal commented Apr 7, 2017

This last bit seems to be related to: #11

@eoftedal
Copy link

eoftedal commented Apr 7, 2017

Feel free to submit a pull request to fix the issue in question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants