mitchcapper / CefSharpDockerfiles

Automated chrome cef building and cefsharp building with docker and build scripts
33 stars 10 forks source link

hcsshim::ImportLayer - failed failed in Win32: The system cannot find the path specified. (0x3) #8

Closed babaibabai closed 4 years ago

babaibabai commented 4 years ago

First of all, thank you for your effort. I can see that amazing work has been done here. Unfortunately, I'm not lucky to successfully build any version neither in Win 10 pro nor via Azure service. I'm totally new to docker though. Below I tried to follow the Azure auto deployment scripts as described to build CefSharp with h264 support.

How to reproduce:

  1. versions.ps1 changed rows:

    $VAR_CHROME_BRANCH="4044";
    $VAR_CEFSHARP_VERSION="81.0.90";
    $VAR_CEFSHARP_BRANCH="cefsharp/81";
    $VAR_BASE_DOCKER_FILE="mcr.microsoft.com/windows/servercore:1903-amd64";
  2. daemon.json changed rows: "data-root": "C:/docker_data"

  3. az_create.ps1 changed rows: [String] $MACHINE_SIZE="Standard_F8s_v2",

Error: hcsshim::ImportLayer - failed failed in Win32: The system cannot find the path specified. (0x3) see PowerShellConsoleOutput

mitchcapper commented 4 years ago

Sorry about the missing patch, it will be required for building unless you install vs2017 as well in setup. The patch is up now.

Lets try to get your windows running first, even though the azure is fully automated the error you are getting is odd.

Did you change your daemon.json to use process isolation mode:

"exec-opts": [
    "isolation=process"
  ],

the hyperv isolation is super slow and may throw sporatic errors like that.

babaibabai commented 4 years ago

The only thing that I changed in daemon.json is "C:/docker_data" instead of "d:/docker_data". I figured that i might not have disk d in the image on Azure isolation mode stayed intact just like in your repo. You can see it in daemon.json attached. I don't have access to Win 10 pro machine right now. The error that I have described is from Azure flow

babaibabai commented 4 years ago

I have managed to proceed with the build in Azure via automated scripts. My mistake was "data-root": "C:/docker_data" in daemon.json as disk c: is just 30G. So this specific issue can be closed But I have further crash in Dockerfile_cefsharp:

...
Step 9/20 : RUN git checkout $env:CEFSHARP_BRANCH;
 ---> Running in e578e7175e6b
error: pathspec 'cefsharp/81' did not match any file(s) known to git.

The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; git checkout $env:CEFSHARP_BRANCH;' returned a non-zero code: 1
Caught an exception: Process docker build --memory=30g --build-arg CEFSHARP_BRANCH="cefsharp/81" --build-arg CEFSHARP_VERSION="81.0.90" --build-arg CEF_VERSION_STR="auto" --build-arg CHROME_BRANCH="4044" -f Dockerfile_cefsharp -t cefsharp . exited with non zero code: 1 aborting!
        Exception Type: System.Management.Automation.RuntimeException
        Stack Trace: at RunProc, C:\CefSharpDockerfiles\functions.ps1: line 82
        at <ScriptBlock>, C:\CefSharpDockerfiles\build.ps1: line 94

I'd be happy to get your advice how to tackle it. Also there were some red lines in Dockerfile_cef but the build continued on them I have marked error lines in ##error##:

04/23/2020 16:13:57 VSBuild took 476.1 secs
Running: docker build --memory=30g --build-arg CEF_SAVE_SOURCES="0" --build-arg BINARY_EXT="zip" --build-arg GN_ARGUMENTS="--ide=vs2019 --sln=cef --filters=//cef/*" --build-arg DUAL_BUILD="0" --build-arg GN_DEFINES="is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome" --build-arg GYP_DEFINES="" --build-arg CHROME_BRANCH="4044" -f Dockerfile_cef -t cef_build_env . in C:\CefSharpDockerfiles
...
Step 16/20 : RUN setX /M DEPOT_TOOLS_WIN_TOOLCHAIN 0;setX /M GYP_MSVS_VERSION "$env:GN_DEFINES";setx /M GN_DEFINES "$env:GN_DEFINES";setx /M GN_ARGUMENTS "$env:GN_ARGUMENTS";setx /M GYP_DEFINES "$env:GYP_DEFINES";setx /M DUAL_BUILD "$env:DUAL_BUILD";setx /M BINARY_EXT "$env:BINARY_EXT";setx /M CEF_SAVE_SOURCES "$env:CEF_SAVE_SOURCES";setx /M CHROME_BRANCH "$env:CHROME_BRANCH";
 ---> Running in b8eb059245e2
SUCCESS: Specified value was saved.
SUCCESS: Specified value was saved.
SUCCESS: Specified value was saved.
SUCCESS: Specified value was saved.
##ERROR: Invalid syntax.
Type "SETX /?" for usage.##

SUCCESS: Specified value was saved.
SUCCESS: Specified value was saved.
SUCCESS: Specified value was saved.
SUCCESS: Specified value was saved.
Removing intermediate container b8eb059245e2
 ---> 06aa33871def
....
Step 18/20 : RUN cd c:/code/depot_tools/;update_depot_tools.bat;git checkout .\cipd.ps1;update_depot_tools.bat;
 ---> Running in 53f2c62f6289
Downloading CIPD client for windows-amd64 from https://chrome-infra-packages.appspot.com/client?platform=windows-amd64&version=git_revision:9f9afb5ef6ef9d4887e8aa2bb617dfdd798f8005...
##error: pathspec '.\cipd.ps1' did not match any file(s) known to git##
Removing intermediate container 53f2c62f6289
 ---> 1400cf301a3f
babaibabai commented 4 years ago

There is no such a cefsharp branch "cefsharp/81" indeed. The latest is 79. So I had to compile the cefsharp "master" branch and it succeeded. I hope I'll be able to recompile everything to line up to version 79. @mitchcapper Thanks for your hard work and help!

mitchcapper commented 4 years ago

Correct if you are building not-yet released versions of cefsharp you want to set $VAR_CEFSHARP_BRANCH to the branch (aka master) to build off of. I actually use some trickery so you can often build the latest CefSharp master branch against older CEF versions (as long as the API itself didn't change).