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

[BUG] Windows Docker Container failed with ffmpeg missing libs #4427

Closed
peterzhuamazon opened this issue Feb 6, 2024 · 7 comments · Fixed by #4458 or opensearch-project/opensearch-dashboards-functional-test#1142
Assignees

Comments

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Feb 6, 2024

[BUG] Windows Docker Container failed with ffmpeg missing libs


  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        9.5.4                                                                          │
  │ Browser:        Custom Chrome 119 (headless)                                                   │
  │ Node Version:   v18.16.0 (C:\Users\ContainerAdministrator\scoop\apps\volta\1.0.8\appdata\tools │
  │                 \image\node\18.16.0\node.exe)                                                  │
  │ Specs:          4 found (plugins/custom-import-map-dashboards/1_import_vector_map_tab.spec.js, │
  │                  plugins/custom-import-map-dashboards/2_opensearchMapLayer.spec.js, plugins/cu │
  │                 stom-import-map-dashboards/3_add_saved_object.spec.js, plugins/custom-import-m │
  │                 ap-dashboards/4_docume...)                                                     │
  │ Searched:       cypress\integration\plugins\custom-import-map-dashboards\1_import_vector_map_t │
  │                 ab.spec.js, cypress\integration\plugins\custom-import-map-dashboards\2_opensea │
  │                 rchMapLayer.spec.js, cypress\integration\plugins\custom-import-map-dashboards\ │
  │                 3_add_saved_object.spec.js, cypress\integration\plugins\custom-import-map-dash │
  │                 boards\4_documentsLayer.spec.js                                                │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────

  Running:  plugins/custom-import-map-dashboards/1_import_vector_map_tab.spec.js            (1 of 4)
Warning: We failed to record the video.

This error will not alter the exit code.

Error: ffmpeg exited with code 3221225781
    at ChildProcess.<anonymous> (C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\9.5.4\Cypress\resources\app\node_modules\fluent-ffmpeg\lib\processor.js:182:22)
    at ChildProcess.emit (node:events:394:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

Error: ffmpeg exited with code 3221225781
    at ChildProcess.<anonymous> (C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\9.5.4\Cypress\resources\app\node_modules\fluent-ffmpeg\lib\processor.js:182:22)
    at ChildProcess.emit (node:events:394:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

Error: ffmpeg exited with code 3221225781
    at ChildProcess.<anonymous> (C:\Users\ContainerAdministrator\AppData\Local\Cypress\Cache\9.5.4\Cypress\resources\app\node_modules\fluent-ffmpeg\lib\processor.js:182:22)
    at ChildProcess.emit (node:events:394:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This only happens on Windows Docker Container, not happening on Windows VM from EC2.
As of now we will disable the video recording for Windows specifically.

Thanks.

@github-actions github-actions bot added the untriaged Issues that have not yet been triaged label Feb 6, 2024
@peterzhuamazon peterzhuamazon added bug Something isn't working and removed untriaged Issues that have not yet been triaged labels Feb 6, 2024
@peterzhuamazon peterzhuamazon self-assigned this Feb 6, 2024
@peterzhuamazon peterzhuamazon transferred this issue from opensearch-project/opensearch-dashboards-functional-test Feb 7, 2024
@github-actions github-actions bot added the untriaged Issues that have not yet been triaged label Feb 7, 2024
@peterzhuamazon peterzhuamazon added integtest test cicd docker windows ci-test-automation jenkins Jenkins related issue and removed untriaged Issues that have not yet been triaged labels Feb 7, 2024
@peterzhuamazon
Copy link
Member Author

More information on a full package version of ffmpeg:


ContainerAdministrator@c32d500009bd MINGW64 ~/ffmpeg/ffmpeg-2024-02-04-git-7375a6ca7b-full_build/bin
$ ./ffmpeg.exe --version
C:/Users/ContainerAdministrator/ffmpeg/ffmpeg-2024-02-04-git-7375a6ca7b-full_build/bin/ffmpeg.exe: error while loading shared libraries: AVICAP32.dll: cannot open shared object file: No such file or directory

ContainerAdministrator@c32d500009bd MINGW64 ~/ffmpeg/ffmpeg-2024-02-04-git-7375a6ca7b-full_build/bin
$ ldd ffmpeg.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffa54c70000)
        KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffa275e0000)
        KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffa27340000)
        ADVAPI32.dll => /c/Windows/System32/ADVAPI32.dll (0x7ffa33140000)
        msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffa30520000)
        sechost.dll => /c/Windows/System32/sechost.dll (0x7ffa2a3c0000)
        RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ffa28440000)
        bcrypt.dll => /c/Windows/System32/bcrypt.dll (0x7ffa3e140000)
        CFGMGR32.dll => /c/Windows/System32/CFGMGR32.dll (0x7ffa30170000)
        ucrtbase.dll => /c/Windows/System32/ucrtbase.dll (0x7ffa2f950000)
        CRYPT32.dll => /c/Windows/System32/CRYPT32.dll (0x7ffa26f90000)
        MSASN1.dll => /c/Windows/System32/MSASN1.dll (0x7ffa2e320000)
        GDI32.dll => /c/Windows/System32/GDI32.dll (0x7ffa3e2b0000)
        gdi32full.dll => /c/Windows/System32/gdi32full.dll (0x7ffa27190000)
        msvcp_win.dll => /c/Windows/System32/msvcp_win.dll (0x7ffa2f770000)
        DWrite.dll => /c/Windows/SYSTEM32/DWrite.dll (0x7ffa3cbb0000)
        d2d1.dll => /c/Windows/SYSTEM32/d2d1.dll (0x7ffa31b90000)
        USER32.dll => /c/Windows/System32/USER32.dll (0x7ffa29f00000)
        win32u.dll => /c/Windows/System32/win32u.dll (0x7ffa51e20000)
        IMM32.dll => /c/Windows/System32/IMM32.dll (0x7ffa2f8a0000)
        ole32.dll => /c/Windows/System32/ole32.dll (0x7ffa2a0a0000)
        combase.dll => /c/Windows/System32/combase.dll (0x7ffa276a0000)
        IPHLPAPI.DLL => /c/Windows/SYSTEM32/IPHLPAPI.DLL (0x7ffa3e410000)
        ncrypt.dll => /c/Windows/SYSTEM32/ncrypt.dll (0x7ffa3e390000)
        bcryptPrimitives.dll => /c/Windows/System32/bcryptPrimitives.dll (0x7ffa2f810000)
        OLEAUT32.dll => /c/Windows/System32/OLEAUT32.dll (0x7ffa28200000)
        SETUPAPI.dll => /c/Windows/System32/SETUPAPI.dll (0x7ffa2eeb0000)
        SHELL32.dll => /c/Windows/System32/SHELL32.dll (0x7ffa235d0000)
        shcore.dll => /c/Windows/System32/shcore.dll (0x7ffa30470000)
        windows.storage.dll => /c/Windows/System32/windows.storage.dll (0x7ffa22e80000)
        profapi.dll => /c/Windows/System32/profapi.dll (0x7ffa2e260000)
        powrprof.dll => /c/Windows/System32/powrprof.dll (0x7ffa2e2b0000)
        shlwapi.dll => /c/Windows/System32/shlwapi.dll (0x7ffa321f0000)
        kernel.appcore.dll => /c/Windows/System32/kernel.appcore.dll (0x7ffa2e290000)
        cryptsp.dll => /c/Windows/System32/cryptsp.dll (0x7ffa3e120000)
        WS2_32.dll => /c/Windows/System32/WS2_32.dll (0x7ffa2fc00000)
        VERSION.dll => /c/Windows/SYSTEM32/VERSION.dll (0x7ffa3e380000)
        WINMM.dll => /c/Windows/SYSTEM32/WINMM.dll (0x7ffa3e350000)
        winmmbase.dll => /c/Windows/System32/winmmbase.dll (0x24ed7910000)
        winmmbase.dll => /c/Windows/SYSTEM32/winmmbase.dll (0x7ffa3e260000)
        winmmbase.dll => /c/Windows/System32/winmmbase.dll (0x24ed7a50000)
        AVICAP32.dll => not found

@peterzhuamazon
Copy link
Member Author

The file AVICAP32.dll is missing on the windows docker image specifically.
We are using servercore version of the docker image.
This lib is presented in the VM version of EC2 instance of the same Windows 2019.

@peterzhuamazon
Copy link
Member Author

Even have the file present and all linking fine, still error:



ContainerAdministrator@c32d500009bd MINGW64 ~/ffmpeg/ffmpeg-2024-02-04-git-7375a6ca7b-full_build/bin
$ ldd ffmpeg.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffa54c70000)
        KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffa275e0000)
        KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffa27340000)
        ADVAPI32.dll => /c/Windows/System32/ADVAPI32.dll (0x7ffa33140000)
        msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffa30520000)
        sechost.dll => /c/Windows/System32/sechost.dll (0x7ffa2a3c0000)
        RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ffa28440000)
        bcrypt.dll => /c/Windows/System32/bcrypt.dll (0x7ffa3e140000)
        CFGMGR32.dll => /c/Windows/System32/CFGMGR32.dll (0x7ffa30170000)
        ucrtbase.dll => /c/Windows/System32/ucrtbase.dll (0x7ffa2f950000)
        CRYPT32.dll => /c/Windows/System32/CRYPT32.dll (0x7ffa26f90000)
        MSASN1.dll => /c/Windows/System32/MSASN1.dll (0x7ffa2e320000)
        GDI32.dll => /c/Windows/System32/GDI32.dll (0x7ffa3e2b0000)
        gdi32full.dll => /c/Windows/System32/gdi32full.dll (0x7ffa27190000)
        msvcp_win.dll => /c/Windows/System32/msvcp_win.dll (0x7ffa2f770000)
        DWrite.dll => /c/Windows/SYSTEM32/DWrite.dll (0x7ffa3cbb0000)
        d2d1.dll => /c/Windows/SYSTEM32/d2d1.dll (0x7ffa31b90000)
        USER32.dll => /c/Windows/System32/USER32.dll (0x7ffa29f00000)
        win32u.dll => /c/Windows/System32/win32u.dll (0x7ffa51e20000)
        IMM32.dll => /c/Windows/System32/IMM32.dll (0x7ffa2f8a0000)
        ole32.dll => /c/Windows/System32/ole32.dll (0x7ffa2a0a0000)
        combase.dll => /c/Windows/System32/combase.dll (0x7ffa276a0000)
        IPHLPAPI.DLL => /c/Windows/SYSTEM32/IPHLPAPI.DLL (0x7ffa3e410000)
        ncrypt.dll => /c/Windows/SYSTEM32/ncrypt.dll (0x7ffa3e260000)
        bcryptPrimitives.dll => /c/Windows/System32/bcryptPrimitives.dll (0x7ffa2f810000)
        OLEAUT32.dll => /c/Windows/System32/OLEAUT32.dll (0x7ffa28200000)
        SETUPAPI.dll => /c/Windows/System32/SETUPAPI.dll (0x7ffa2eeb0000)
        SHELL32.dll => /c/Windows/System32/SHELL32.dll (0x7ffa235d0000)
        shcore.dll => /c/Windows/System32/shcore.dll (0x7ffa30470000)
        windows.storage.dll => /c/Windows/System32/windows.storage.dll (0x7ffa22e80000)
        profapi.dll => /c/Windows/System32/profapi.dll (0x7ffa2e260000)
        powrprof.dll => /c/Windows/System32/powrprof.dll (0x7ffa2e2b0000)
        shlwapi.dll => /c/Windows/System32/shlwapi.dll (0x7ffa321f0000)
        kernel.appcore.dll => /c/Windows/System32/kernel.appcore.dll (0x7ffa2e290000)
        cryptsp.dll => /c/Windows/System32/cryptsp.dll (0x7ffa3e120000)
        WS2_32.dll => /c/Windows/System32/WS2_32.dll (0x7ffa2fc00000)
        VERSION.dll => /c/Windows/SYSTEM32/VERSION.dll (0x7ffa3e2e0000)
        AVICAP32.dll => /c/Windows/SYSTEM32/AVICAP32.dll (0x7ffa3e240000)
        WINMM.dll => /c/Windows/SYSTEM32/WINMM.dll (0x7ffa3d820000)
        CRYPTBASE.DLL => /c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ffa47150000)
        WINMMBASE.dll => /c/Windows/SYSTEM32/WINMMBASE.dll (0x7ffa3d7f0000)
        winmmbase.dll => /c/Windows/System32/winmmbase.dll (0x1e8b4c20000)

ContainerAdministrator@c32d500009bd MINGW64 ~/ffmpeg/ffmpeg-2024-02-04-git-7375a6ca7b-full_build/bin
$ ./ffmpeg.exe --version
C:/Users/ContainerAdministrator/ffmpeg/ffmpeg-2024-02-04-git-7375a6ca7b-full_build/bin/ffmpeg.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Feb 15, 2024

The solution confirms to change docker base image from windows/servercore to windows, also no need to install fonts like here:

@github-actions github-actions bot added the untriaged Issues that have not yet been triaged label Mar 12, 2024
@peterzhuamazon
Copy link
Member Author

Re-open due to need changes on ftrepo to revert the blocking on windows.

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