LibraryManager
LibraryManager copied to clipboard
Seeminlgly random LIB003
Describe the bug
I got seemingly random libman.json : error LIB003: XXXXX could not be written to disk. Make sure the file name is correct
XXX is different files, and sometimes it works.
It could be related with https://github.com/aspnet/LibraryManager/issues/489, but I don't pass runtime option and just use dotnet build -c Release --no-restore
Additional context
https://github.com/joinrpg/joinrpg-net/runs/7111112857?check_suite_focus=true
I try to read code and I don't like how FileSystemHelper and HostIteraction consuming errors without logging. May be we should expand logging here? Will you welcome contribution?
We get that error sporadically as well, finding out the root cause would be helpful.
We are experiencing this in our CI/CD pipeline as well. Sometimes it works, sometimes half the files get written before we receive the LIB003 error. This is really problematic for us as our CI/CD build/test stages sporadically fail now that we have introduced libman into our project.
It might be helpful to know that in our environment, the sporadic failures are happening when we utilize the "Enable Restore Client-Side Libraries on Build" feature and the build server performs either a dotnet build
or dotnet test
.
To temporarily work around this issue while we wait for a fix, we disabled the "Restore Client-Side Libraries on Build" feature and are now manually performing a libman restore
in each project folder. This seems to be working for us, so that would suggest to me that the problem is somehow stemming from the Microsoft.Web.LibraryManager.Build package.
@jimmylewis what do you think is correct path forward? Can I help?
@jimmylewis ?
This started happening for me when the project which was failing was updated to target multiple frameworks:
<TargetFrameworks>netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
As a work-around, I had to run libman restore
before a build.
Another work-around could be to disable parallel builds either on the project level or the solution level.
Same issue here, using enable package restore on build. No parallel jobs running. Get intermittent failures on local windows and on Ubuntu via the github workflow build, for various JS files. Seems to be a lingering issue going back some time according to posts on stack overflow.
I am looking to remove the source code from the repo and allow users to use LibMan to install the packages upon build to cleanup the repository.
+1 here, randomly happens during a restore in the azure devops pipeline on a self hosted VM.