Issue Type: Performance Issue
Whenever i try to open terminal either via Ctrl+` or via Terminal option in the menu it gives the following error message and terminal won’t show up.
«C:WindowsSystem32WindowsPowerShellv1.0powershell.exe» terminated with exit code: 3221225781.
Few things to note:
- It was working fine till yesterday around 11:30 PM 20th May 2022 IST.
- Getting this issue from today morning around 8:00 AM 21st May 2022 IST.
- Happed after an update (but not sure).
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.67.2 (user setup)
- OS Version: Windows_NT x64 10.0.22000
VS Code version: Code 1.67.2 (c3511e6, 2022-05-17T18:15:52.058Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz (6 x 2904) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 15.94GB (10.68GB free) |
Process Argv | —crash-reporter-id 918b4482-ff12-441c-8c9b-f0a305735d24 |
Screen Reader | no |
VM | 0% |
Process Info
CPU % Mem MB PID Process
1 89 14600 code main
0 145 1056 shared-process
0 70 8304 ptyHost
0 75 13644 fileWatcher
0 243 1992 window (resolvers.js - skribool-server - Visual Studio Code)
2 181 2648 extensionHost
0 161 14052 "C:UsersYashAppDataLocalProgramsMicrosoft VS CodeCode.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:UsersYashAppDataLocalProgramsMicrosoft VS Coderesourcesappextensionsnode_modulestypescriptlibtsserver.js" --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:UsersYashAppDataLocalTempvscode-typescript9108ef99a316a149c614tscancellation-6e99064f9f043985a590.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin --pluginProbeLocations c:UsersYash.vscodeextensionsvisualstudioexptteam.vscodeintellicode-1.2.21 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc
0 94 408 "C:UsersYashAppDataLocalProgramsMicrosoft VS CodeCode.exe" --ms-enable-electron-run-as-node "c:/Users/Yash/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js" --globalTypingsCacheLocation C:/Users/Yash/AppData/Local/Microsoft/TypeScript/4.6 --enableTelemetry --typesMapLocation "c:/Users/Yash/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/node_modules/typescript/lib/typesMap.json" --validateDefaultNpmLocation
1 115 14992 "C:UsersYashAppDataLocalProgramsMicrosoft VS CodeCode.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:UsersYashAppDataLocalProgramsMicrosoft VS Coderesourcesappextensionsnode_modulestypescriptlibtsserver.js" --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName C:UsersYashAppDataLocalTempvscode-typescript9108ef99a316a149c614tscancellation-ff106fc9bd5ab3ae593f.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin --pluginProbeLocations c:UsersYash.vscodeextensionsvisualstudioexptteam.vscodeintellicode-1.2.21 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc
1 85 3436 issue-reporter
1 90 6888 gpu-process
0 39 8620 utility-network-service
0 26 9304 crashpad-handler
Workspace Info
| Window (resolvers.js - skribool-server - Visual Studio Code)
| Folder (skribool-server): 11 files
| File types: js(5) json(2) gitignore(1)
| Conf files: package.json(1);
Extensions (26)
Extension | Author (truncated) | Version |
---|---|---|
better-comments | aar | 3.0.0 |
dart-code | Dar | 3.40.0 |
flutter | Dar | 3.40.0 |
dart-data-class-generator | dot | 0.5.3 |
es7-react-js-snippets | dsz | 4.4.3 |
prettier-vscode | esb | 9.5.0 |
bloc | Fel | 6.6.0 |
code-runner | for | 0.11.7 |
json-to-dart | hir | 3.5.7 |
pubspec-assist | jer | 2.3.2 |
cmake-tools | ms- | 1.10.5 |
cpptools | ms- | 1.9.8 |
vsliveshare | ms- | 1.0.5561 |
vsliveshare-audio | ms- | 0.1.91 |
vsliveshare-pack | ms- | 0.4.0 |
awesome-flutter-snippets | Nas | 3.0.3 |
material-icon-theme | PKi | 4.17.0 |
java | red | 1.6.0 |
file-tree-generator | Shi | 1.1.1 |
cmake | twx | 0.0.17 |
vscodeintellicode | Vis | 1.2.21 |
vscode-java-debug | vsc | 0.40.1 |
vscode-java-dependency | vsc | 0.19.1 |
vscode-java-pack | vsc | 0.22.4 |
vscode-java-test | vsc | 0.35.0 |
vscode-maven | vsc | 0.35.1 |
(1 theme extensions excluded)
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550
i’m trying to run a docker container on Windows 10 which should execute a windows executable (myprogram.exe). Below you find my dockerfile:
FROM microsoft/windowsservercore
COPY mydir/myprogram.exe /mydir/
CMD ["/mydir/myprogram.exe","someparameter"]
So i build the image with:
docker image build --tag myimage .
and run the container with:
docker run myimage
Unfortunately if I check the status of the container with:
docker ps -a
I can see that the container has exited with
exit code 3221225781
, which seems to point to a missing dll.
To debug the problem I run the command:
docker run -it --name debug microsoft/windowsservercore cmd
, stopped the container and copied the windows executable in the container file system :
docker cp myprogram.exe debug:c:/myprogram.exe
Now I start the container again using docker start -i debug
and enter myprogram.exe myparameter
. Unfortunately the program exits immediately (usually it runs about 30 sec) without any output, error code …
My only explanation for this behavior is that if some cmd program is missing some dll’s the corresponding error message is not included in the STDERR but rather in a message dialog. Apparently docker doesn’t support this feature???
So what is the best was to solve this problem. Using dependency walker to go through all dll’s needed is possible but would take some time and I’m looking for some more elegant solution.
asked Mar 21, 2018 at 17:53
airborneairborne
3,4143 gold badges15 silver badges26 bronze badges
2
You need to install Visual C++ redistributable.
- Download the appropriate version of vc_redist.x64.exe and place it in the folder containing your Dockerfile
-
Edit your Dockerfile so you preinstall VC++ redistributables when you build your image by adding:
FROM mcr.microsoft.com/windows/sservercore
WORKDIR c:mydir
COPY «vc_redist.x64.exe» .
RUN vc_redist.x64.exe /install /passive /norestart /log out.txt
COPY mydir/myprogram.exe c:mydir
CMD [«c:mydirmyprogram.exe»,»someparameter»]
Your application should run now.
Note: you need 64-bit build of VC++ redistributable and the appropriate version. You can find some download urls here
answered Oct 17, 2019 at 20:55
Cosmin SontuCosmin Sontu
1,00411 silver badges16 bronze badges
This is quite an open-ended question, so it is not possible to give precise answer. Here are a few thoughts:
- This is your program that is missing a dependency. Presumably, you as the program author should be aware of what dependencies are required. You need to make sure to include them in your docker image, when you build it.
- You are creating your image based on Windows Core, which does not have the whole slew of UI components. This looks like the most obvious thing that could go wrong, given the symptoms. So what I would do is try and make sure that your program can run on Windows Core in principle. Which brings me to the next point.
- The most practical way to troubleshoot, in my opinion, is to remove Docker from the equation. You want to run your program on Windows Core. So setup a machine (physical or VM) with Windows Core inside and try to run your program there. There is a good chance that it won’t run with the same symptoms. If that’s the case, you now have reduced complexity, because you know that your problem has nothing to do with docker (or not).
- Finally, when you have your Windows Core machine up and running, you might be able to see a message box pop up with the error immediately (even on Core you can run some programs with UI can run, and message boxes are not an uncommon site), and failing that you can run sysinternals procmon/procexp even on Windows Core, so using those to locate missing dependencies could help. There is also Dependencies.
Note: by «Windows Core» in this answer I mean Core option of Windows Server
answered Aug 19, 2019 at 0:13
Andrew SavinykhAndrew Savinykh
24.9k16 gold badges103 silver badges157 bronze badges
Запуск npm start, npm run или npm run-script завершается ошибкой с npm ERR! errno 3221225781
На моем узле чисто установленная стабильная версия 10.16.3 LTS
с npm 6.9.0
в Windows 10. Все установлено по пути по умолчанию на C :.
Мой пример — это минимальная настройка с текущей файловой структурой:
node_modules/ <empty>
index.js
package.json
Папка node_modules пуста.
Index.js:
console.log("Hello world..");
Пакет package.json:
{
"name": "testnpm",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "node index.js"
}
}
Запуск npm start
H:devjavascripttestnpm>npm start
> testnpm@1.0.0 start H:devjavascripttestnpm
> node index.js
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225781
npm ERR! testnpm@1.0.0 start: `node index.js`
npm ERR! Exit status 3221225781
npm ERR!
npm ERR! Failed at the testnpm@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! <Path to logs>_logs2019-10-19T13_24_15_158Z-debug.log
Ожидаемый результат будет «Hello World ..», но не работает, как показано выше.
Выполнение той же команды напрямую дает ожидаемый результат:
H:devjavascripttestnpm>node index.js
Hello world..
Вот журнал после сбоя:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle testnpm@1.0.0~prestart: testnpm@1.0.0
6 info lifecycle testnpm@1.0.0~start: testnpm@1.0.0
7 verbose lifecycle testnpm@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle testnpm@1.0.0~start: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;H:devjavascripttestnpmnode_modules.bin;...
9 verbose lifecycle testnpm@1.0.0~start: CWD: H:devjavascripttestnpm
10 silly lifecycle testnpm@1.0.0~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle testnpm@1.0.0~start: Returned: code: 3221225781 signal: null
12 info lifecycle testnpm@1.0.0~start: Failed to exec start script
13 verbose stack Error: testnpm@1.0.0 start: `node index.js`
13 verbose stack Exit status 3221225781
13 verbose stack at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid testnpm@1.0.0
15 verbose cwd H:devjavascripttestnpm
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v10.16.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 3221225781
22 error testnpm@1.0.0 start: `node index.js`
22 error Exit status 3221225781
23 error Failed at the testnpm@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225781, true ]
Чтобы было ясно, npm install
и тому подобное работает. Запуск сценария с node
тоже работает нормально. Единственное, что не работает, — это запуск любого из определенных сценариев в package.json
с npm
.
====================================
РЕДАКТИРОВАТЬ:
- Та же ошибка после обновления npm с помощью
npm i -g npm
- Подсказка: код ошибки 3221225781 просто является кодом отсутствующей dll в .NET.
- Я удалил все библиотеки разработки, IDE, распространяемые файлы и переустановил только необходимое в соответствии с описанием установки из npm на github. Все еще та же ошибка.
- Это работает в Git Bash! Но все равно такая же ошибка в CMD и PowerShell. Это заставило меня заподозрить PATH, добавить все пути Git Bash в CMD вручную, чтобы попробовать, и это все та же ошибка.
- Выполнил ПОЛНУЮ переустановку Windows, запустил установку узла, которая теперь устанавливает
chocolatey
и, в свою очередь, устанавливает следующие зависимости:
- chocolatey-dotnetfx.extension v1.0.1
- python2 v2.7.17
- kb3033929 v1.0.5
- visualstudio2017buildtools v15.9.17.0
- chocolatey-windowsupdate.extension v1.0.4
- vcredist140 v14.23.27820
- kb2999226 v1.0.20181019
- visualstudio-installer v2.0.1
- kb2919355 v1.0.20160915
- chocolatey-core.extension v1.3.3
- kb2919442 v1.0.20160915
- visualstudio2017-workload-vctools v1.3.2
- chocolatey-visualstudio.extension v1.8.1
- dotnetfx v4.8.0.20190930
- kb3035131 v1.0.3
- Теперь это работает, и в чем была настоящая проблема, вероятно, останется загадкой.
2 ответа
Попробуйте npm cache clean
, и я знаю, что каталог node_modules
пуст, но просто удалите его на всякий случай. Вам также следует удалить файл package-lock.json
. Затем запустите npm install
.
0
Matt Croak
19 Окт 2019 в 17:42
- Version: 8.6.0
- Target: win/nsis
I’m able to build my application for all platforms on a mac, but attempting a Win build on a Windows machine is throwing error 3221225781
. More specifically, this is happening within a cygwin environment on Windows Server 2008 R2, so I suspect a dll/package could be missing from the cygwin install, but I’m not sure.
I believe error 3221225781
== 0xC0000135
. So STATUS_DLL_NOT_FOUND
?
If this is indeed the issue, I’ve tried tracking down what’s missing from makensis.exe
with Dependency Walker but didn’t get any meaningful results.
The following is output with the DEBUG
flag. Sorry if this isn’t the best place for this issue; I’ve already tried getting help in the Slack channel. Could someone help me track this down please?
c:jenkinsworkspacedesktop-shell-dev>call npm install && npm run lint && npm run dist_win
> desktop@0.0.1 postinstall c:jenkinsworkspacedesktop-shell-dev
> install-app-deps
Installing app dependencies for arch x64 to c:jenkinsworkspacedesktop-shell-devapp
Sun, 08 Jan 2017 19:03:21 GMT electron-builder Spawning C:Program Filesnodejsnode.exe C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js install --production --cache-min 999999999 --build-from-source
Sun, 08 Jan 2017 19:03:24 GMT electron-builder C:Program Filesnodejsnode.exe (1188) exited with code 0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-linux@^1.0.3 (node_modules7zip-binnode_modules7zip-bin-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-linux@1.0.3: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1 (node_modules7zip-binnode_modules7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
> desktop@0.0.1 lint c:jenkinsworkspacedesktop-shell-dev
> eslint .
> desktop@0.0.1 dist_win c:jenkinsworkspacedesktop-shell-dev
> npm run less && build -w
> desktop@0.0.1 less c:jenkinsworkspacedesktop-shell-dev
> lessc --clean-css less/main.less app/styles.min.css
Packaging for win32 x64 using electron 1.4.13 to distwin-unpacked
Sun, 08 Jan 2017 19:03:43 GMT electron-builder Found existing nsis C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachensisnsis-3.0.2
Sun, 08 Jan 2017 19:03:44 GMT electron-builder Spawning c:jenkinsworkspacedesktop-shell-devnode_modules7zip-bin-winx647za.exe x -bd C:Windowssystem32configsystemprofile.electronelectron-v1.4.13-win32-x64.zip -oc:jenkinsworkspacedesktop-shell-devdistwin-unpacked
7-Zip (a) [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
Scanning the drive for archives:
1 file, 54339658 bytes (52 MiB)
Extracting archive: C:Windowssystem32configsystemprofile.electronelectron-v1.4.13-win32-x64.zip
--
Path = C:Windowssystem32configsystemprofile.electronelectron-v1.4.13-win32-x64.zip
Type = zip
Physical Size = 54339658
Everything is Ok
Files: 74
Size: 137832472
Compressed: 54339658
Sun, 08 Jan 2017 19:03:46 GMT electron-builder c:jenkinsworkspacedesktop-shell-devnode_modules7zip-bin-winx647za.exe (5360) exited with code 0
Sun, 08 Jan 2017 19:03:46 GMT electron-builder Pruned dev or extraneous dependencies:
Sun, 08 Jan 2017 19:03:47 GMT electron-builder Found existing winCodeSign C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachewinCodeSignwinCodeSign-1.4.2
Sun, 08 Jan 2017 19:03:47 GMT electron-builder Executing C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachewinCodeSignwinCodeSign-1.4.2rcedit.exe c:jenkinsworkspacedesktop-shell-devdistwin-unpackedApplication.exe --set-version-string CompanyName Application Development --set-version-string FileDescription Application desktop application --set-version-string ProductName Application --set-version-string InternalName Application --set-version-string LegalCopyright Copyright 2016 company Corporation. All rights reserved. --set-version-string OriginalFilename --set-file-version 0.0.1.71 --set-product-version 0.0.1 --set-icon c:jenkinsworkspacedesktop-shell-devbuildicon.ico
Packaging NSIS installer for arch x64
Building NSIS installer
Sun, 08 Jan 2017 19:03:47 GMT electron-builder Spawning c:jenkinsworkspacedesktop-shell-devnode_modules7zip-bin-winx647za.exe a -bd -mx=9 -mfb=64 -md=64m -ms=on c:jenkinsworkspacedesktop-shell-devdistdesktop-0.0.1-x64.nsis.7z .
7-Zip (a) [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
Scanning the drive:
2 folders, 73 files, 138061471 bytes (132 MiB)
Creating archive: c:jenkinsworkspacedesktop-shell-devdistdesktop-0.0.1-x64.nsis.7z
Items to compress: 75
Files read from disk: 73
Archive size: 33304280 bytes (32 MiB)
Everything is Ok
Sun, 08 Jan 2017 19:05:23 GMT electron-builder c:jenkinsworkspacedesktop-shell-devnode_modules7zip-bin-winx647za.exe (1908) exited with code 0
Sun, 08 Jan 2017 19:05:23 GMT electron-builder { APP_ID: 'com.company.app.bundle58128',
APP_GUID: 'f7def604-4244-547a-9074-469b594dc85a',
PRODUCT_NAME: 'Application',
PRODUCT_FILENAME: 'Application',
APP_DESCRIPTION: 'Application desktop application',
VERSION: '0.0.1',
COMPANY_NAME: 'Application Development',
PROJECT_DIR: 'c:\jenkins\workspace\desktop-shell-dev',
BUILD_RESOURCES_DIR: 'c:\jenkins\workspace\desktop-shell-dev\build',
MUI_ICON: 'c:\jenkins\workspace\desktop-shell-dev\build\icon.ico',
MUI_UNICON: 'c:\jenkins\workspace\desktop-shell-dev\build\icon.ico',
APP_64: 'c:\jenkins\workspace\desktop-shell-dev\dist\desktop-0.0.1-x64.nsis.7z',
INSTALL_MODE_PER_ALL_USERS: null,
INSTALL_MODE_PER_ALL_USERS_REQUIRED: null,
RUN_AFTER_FINISH: null,
COMPRESS: 'auto',
ONE_CLICK: null }
Sun, 08 Jan 2017 19:05:23 GMT electron-builder { OutFile: '"c:\jenkins\workspace\desktop-shell-dev\dist\Application Setup 0.0.1.exe"',
VIProductVersion: '0.0.1.71',
VIAddVersionKey:
[ '/LANG=1033 ProductName "Application"',
'/LANG=1033 ProductVersion "0.0.1"',
'/LANG=1033 CompanyName "Application Development"',
'/LANG=1033 LegalCopyright "Copyright 2016 company Corporation. All rights reserved."',
'/LANG=1033 FileDescription "Application desktop application"',
'/LANG=1033 FileVersion "0.0.1.71"' ],
Unicode: true,
SetCompressor: 'lzma',
SetCompressorDictSize: '64' }
NSIS script:
!include "common.nsh"
!include "MUI2.nsh"
!include "multiUser.nsh"
!include "allowOnlyOneInstallerInstance.nsh"
!ifdef INSTALL_MODE_PER_ALL_USERS
!ifdef BUILD_UNINSTALLER
RequestExecutionLevel user
!else
RequestExecutionLevel admin
!endif
!else
RequestExecutionLevel user
!endif
!ifdef ONE_CLICK
!include "oneClick.nsh"
!else
!include "boringInstaller.nsh"
!endif
!ifmacrodef customHeader
!insertmacro customHeader
!endif
Var startMenuLink
Var desktopLink
!ifdef BUILD_UNINSTALLER
SilentInstall silent
!else
Var appExe
!endif
Function .onInit
!ifdef BUILD_UNINSTALLER
WriteUninstaller "${UNINSTALLER_OUT_FILE}"
!insertmacro quitSuccess
!else
!insertmacro check64BitAndSetRegView
!ifdef ONE_CLICK
!insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
!else
${IfNot} ${UAC_IsInnerInstance}
!insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
${EndIf}
!endif
!insertmacro initMultiUser
!ifmacrodef customInit
!insertmacro customInit
!endif
!endif
FunctionEnd
Section "install"
!ifndef BUILD_UNINSTALLER
!include "installSection.nsh"
!endif
SectionEnd
!ifdef BUILD_UNINSTALLER
!include "uninstaller.nsh"
!endif
---
End of NSIS script.
Sun, 08 Jan 2017 19:05:23 GMT electron-builder Spawning C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachensisnsis-3.0.2Binmakensis.exe -WX -DAPP_ID=com.company.app.bundle58128 -DAPP_GUID=f7def604-4244-547a-9074-469b594dc85a -DPRODUCT_NAME=Application -DPRODUCT_FILENAME=Application -DAPP_DESCRIPTION=Application desktop application -DVERSION=0.0.1 -DCOMPANY_NAME=Application Development -DPROJECT_DIR=c:jenkinsworkspacedesktop-shell-dev -DBUILD_RESOURCES_DIR=c:jenkinsworkspacedesktop-shell-devbuild -DMUI_ICON=c:jenkinsworkspacedesktop-shell-devbuildicon.ico -DMUI_UNICON=c:jenkinsworkspacedesktop-shell-devbuildicon.ico -DAPP_64=c:jenkinsworkspacedesktop-shell-devdistdesktop-0.0.1-x64.nsis.7z -DINSTALL_MODE_PER_ALL_USERS -DINSTALL_MODE_PER_ALL_USERS_REQUIRED -DRUN_AFTER_FINISH -DCOMPRESS=auto -DONE_CLICK -DBUILD_UNINSTALLER -DUNINSTALLER_OUT_FILE=c:tempelectron-builder-n8hQkZt-16fc-0-uninstaller.exe -XOutFile "c:jenkinsworkspacedesktop-shell-devdistApplication Setup 0.0.1.exe" -XVIProductVersion 0.0.1.71 -XVIAddVersionKey /LANG=1033 ProductName "Application" -XVIAddVersionKey /LANG=1033 ProductVersion "0.0.1" -XVIAddVersionKey /LANG=1033 CompanyName "Application Development" -XVIAddVersionKey /LANG=1033 LegalCopyright "Copyright 2016 company Corporation. All rights reserved." -XVIAddVersionKey /LANG=1033 FileDescription "Application desktop application" -XVIAddVersionKey /LANG=1033 FileVersion "0.0.1.71" -XUnicode true -XSetCompressor lzma -XSetCompressorDictSize 64 -
Error: C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachensisnsis-3.0.2Binmakensis.exe exited with code 3221225781
at ChildProcess.childProcess.once.code (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrcutilutil.ts:125:14)
at ChildProcess.g (events.js:291:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
From previous event:
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrctargetsnsis.ts:325:5
at next (native)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
From previous event:
at NsisTarget.executeMakensis (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderouttargetsnsis.js:371:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrctargetsnsis.ts:198:62
From previous event:
at NsisTarget.buildInstaller (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderouttargetsnsis.js:292:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrctargetsnsis.ts:71:18
at next (native)
From previous event:
at NsisTarget.finishBuild (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderouttargetsnsis.js:147:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrcpackager.ts:136:31
From previous event:
at Packager.doBuild (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderoutpackager.js:256:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrcpackager.ts:100:38
at next (native)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
From previous event:
at Packager.build (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderoutpackager.js:208:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrcbuilder.ts:240:40
at next (native)
From previous event:
at build (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderoutbuilder.js:89:21)
at Object.<anonymous> (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderoutbuild-cli.js:62:41)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dist_win"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! desktop@0.0.1 dist_win: `npm run less && build -w`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the desktop@0.0.1 dist_win script 'npm run less && build -w'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the desktop package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run less && build -w
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs desktop
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls desktop
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! c:jenkinsworkspacedesktop-shell-devnpm-debug.log
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
Build and devDependencies sections of package.json
:
"build": {
"appId": "com.company.application",
"copyright": "Copyright 2016 Corporation. All rights reserved.",
"productName": "Application",
"mac": {
"category": "public.app-category.business"
},
"win": {
"target": "nsis"
},
"nsis": {
"perMachine": true
}
},
"devDependencies": {
"electron": "^1.4.7",
"electron-builder": "^8.6.0",
"electron-packager": "^8.3.0",
"esdoc": "^0.4.8",
"esdoc-node": "^1.0.0",
"eslint": "^3.10.2",
"husky": "^0.12.0",
"less": "^2.7.1",
"less-plugin-clean-css": "^1.5.1"
}
- Version: 8.6.0
- Target: win/nsis
I’m able to build my application for all platforms on a mac, but attempting a Win build on a Windows machine is throwing error 3221225781
. More specifically, this is happening within a cygwin environment on Windows Server 2008 R2, so I suspect a dll/package could be missing from the cygwin install, but I’m not sure.
I believe error 3221225781
== 0xC0000135
. So STATUS_DLL_NOT_FOUND
?
If this is indeed the issue, I’ve tried tracking down what’s missing from makensis.exe
with Dependency Walker but didn’t get any meaningful results.
The following is output with the DEBUG
flag. Sorry if this isn’t the best place for this issue; I’ve already tried getting help in the Slack channel. Could someone help me track this down please?
c:jenkinsworkspacedesktop-shell-dev>call npm install && npm run lint && npm run dist_win
> desktop@0.0.1 postinstall c:jenkinsworkspacedesktop-shell-dev
> install-app-deps
Installing app dependencies for arch x64 to c:jenkinsworkspacedesktop-shell-devapp
Sun, 08 Jan 2017 19:03:21 GMT electron-builder Spawning C:Program Filesnodejsnode.exe C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js install --production --cache-min 999999999 --build-from-source
Sun, 08 Jan 2017 19:03:24 GMT electron-builder C:Program Filesnodejsnode.exe (1188) exited with code 0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-linux@^1.0.3 (node_modules7zip-binnode_modules7zip-bin-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-linux@1.0.3: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1 (node_modules7zip-binnode_modules7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
> desktop@0.0.1 lint c:jenkinsworkspacedesktop-shell-dev
> eslint .
> desktop@0.0.1 dist_win c:jenkinsworkspacedesktop-shell-dev
> npm run less && build -w
> desktop@0.0.1 less c:jenkinsworkspacedesktop-shell-dev
> lessc --clean-css less/main.less app/styles.min.css
Packaging for win32 x64 using electron 1.4.13 to distwin-unpacked
Sun, 08 Jan 2017 19:03:43 GMT electron-builder Found existing nsis C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachensisnsis-3.0.2
Sun, 08 Jan 2017 19:03:44 GMT electron-builder Spawning c:jenkinsworkspacedesktop-shell-devnode_modules7zip-bin-winx647za.exe x -bd C:Windowssystem32configsystemprofile.electronelectron-v1.4.13-win32-x64.zip -oc:jenkinsworkspacedesktop-shell-devdistwin-unpacked
7-Zip (a) [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
Scanning the drive for archives:
1 file, 54339658 bytes (52 MiB)
Extracting archive: C:Windowssystem32configsystemprofile.electronelectron-v1.4.13-win32-x64.zip
--
Path = C:Windowssystem32configsystemprofile.electronelectron-v1.4.13-win32-x64.zip
Type = zip
Physical Size = 54339658
Everything is Ok
Files: 74
Size: 137832472
Compressed: 54339658
Sun, 08 Jan 2017 19:03:46 GMT electron-builder c:jenkinsworkspacedesktop-shell-devnode_modules7zip-bin-winx647za.exe (5360) exited with code 0
Sun, 08 Jan 2017 19:03:46 GMT electron-builder Pruned dev or extraneous dependencies:
Sun, 08 Jan 2017 19:03:47 GMT electron-builder Found existing winCodeSign C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachewinCodeSignwinCodeSign-1.4.2
Sun, 08 Jan 2017 19:03:47 GMT electron-builder Executing C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachewinCodeSignwinCodeSign-1.4.2rcedit.exe c:jenkinsworkspacedesktop-shell-devdistwin-unpackedApplication.exe --set-version-string CompanyName Application Development --set-version-string FileDescription Application desktop application --set-version-string ProductName Application --set-version-string InternalName Application --set-version-string LegalCopyright Copyright 2016 company Corporation. All rights reserved. --set-version-string OriginalFilename --set-file-version 0.0.1.71 --set-product-version 0.0.1 --set-icon c:jenkinsworkspacedesktop-shell-devbuildicon.ico
Packaging NSIS installer for arch x64
Building NSIS installer
Sun, 08 Jan 2017 19:03:47 GMT electron-builder Spawning c:jenkinsworkspacedesktop-shell-devnode_modules7zip-bin-winx647za.exe a -bd -mx=9 -mfb=64 -md=64m -ms=on c:jenkinsworkspacedesktop-shell-devdistdesktop-0.0.1-x64.nsis.7z .
7-Zip (a) [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
Scanning the drive:
2 folders, 73 files, 138061471 bytes (132 MiB)
Creating archive: c:jenkinsworkspacedesktop-shell-devdistdesktop-0.0.1-x64.nsis.7z
Items to compress: 75
Files read from disk: 73
Archive size: 33304280 bytes (32 MiB)
Everything is Ok
Sun, 08 Jan 2017 19:05:23 GMT electron-builder c:jenkinsworkspacedesktop-shell-devnode_modules7zip-bin-winx647za.exe (1908) exited with code 0
Sun, 08 Jan 2017 19:05:23 GMT electron-builder { APP_ID: 'com.company.app.bundle58128',
APP_GUID: 'f7def604-4244-547a-9074-469b594dc85a',
PRODUCT_NAME: 'Application',
PRODUCT_FILENAME: 'Application',
APP_DESCRIPTION: 'Application desktop application',
VERSION: '0.0.1',
COMPANY_NAME: 'Application Development',
PROJECT_DIR: 'c:\jenkins\workspace\desktop-shell-dev',
BUILD_RESOURCES_DIR: 'c:\jenkins\workspace\desktop-shell-dev\build',
MUI_ICON: 'c:\jenkins\workspace\desktop-shell-dev\build\icon.ico',
MUI_UNICON: 'c:\jenkins\workspace\desktop-shell-dev\build\icon.ico',
APP_64: 'c:\jenkins\workspace\desktop-shell-dev\dist\desktop-0.0.1-x64.nsis.7z',
INSTALL_MODE_PER_ALL_USERS: null,
INSTALL_MODE_PER_ALL_USERS_REQUIRED: null,
RUN_AFTER_FINISH: null,
COMPRESS: 'auto',
ONE_CLICK: null }
Sun, 08 Jan 2017 19:05:23 GMT electron-builder { OutFile: '"c:\jenkins\workspace\desktop-shell-dev\dist\Application Setup 0.0.1.exe"',
VIProductVersion: '0.0.1.71',
VIAddVersionKey:
[ '/LANG=1033 ProductName "Application"',
'/LANG=1033 ProductVersion "0.0.1"',
'/LANG=1033 CompanyName "Application Development"',
'/LANG=1033 LegalCopyright "Copyright 2016 company Corporation. All rights reserved."',
'/LANG=1033 FileDescription "Application desktop application"',
'/LANG=1033 FileVersion "0.0.1.71"' ],
Unicode: true,
SetCompressor: 'lzma',
SetCompressorDictSize: '64' }
NSIS script:
!include "common.nsh"
!include "MUI2.nsh"
!include "multiUser.nsh"
!include "allowOnlyOneInstallerInstance.nsh"
!ifdef INSTALL_MODE_PER_ALL_USERS
!ifdef BUILD_UNINSTALLER
RequestExecutionLevel user
!else
RequestExecutionLevel admin
!endif
!else
RequestExecutionLevel user
!endif
!ifdef ONE_CLICK
!include "oneClick.nsh"
!else
!include "boringInstaller.nsh"
!endif
!ifmacrodef customHeader
!insertmacro customHeader
!endif
Var startMenuLink
Var desktopLink
!ifdef BUILD_UNINSTALLER
SilentInstall silent
!else
Var appExe
!endif
Function .onInit
!ifdef BUILD_UNINSTALLER
WriteUninstaller "${UNINSTALLER_OUT_FILE}"
!insertmacro quitSuccess
!else
!insertmacro check64BitAndSetRegView
!ifdef ONE_CLICK
!insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
!else
${IfNot} ${UAC_IsInnerInstance}
!insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
${EndIf}
!endif
!insertmacro initMultiUser
!ifmacrodef customInit
!insertmacro customInit
!endif
!endif
FunctionEnd
Section "install"
!ifndef BUILD_UNINSTALLER
!include "installSection.nsh"
!endif
SectionEnd
!ifdef BUILD_UNINSTALLER
!include "uninstaller.nsh"
!endif
---
End of NSIS script.
Sun, 08 Jan 2017 19:05:23 GMT electron-builder Spawning C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachensisnsis-3.0.2Binmakensis.exe -WX -DAPP_ID=com.company.app.bundle58128 -DAPP_GUID=f7def604-4244-547a-9074-469b594dc85a -DPRODUCT_NAME=Application -DPRODUCT_FILENAME=Application -DAPP_DESCRIPTION=Application desktop application -DVERSION=0.0.1 -DCOMPANY_NAME=Application Development -DPROJECT_DIR=c:jenkinsworkspacedesktop-shell-dev -DBUILD_RESOURCES_DIR=c:jenkinsworkspacedesktop-shell-devbuild -DMUI_ICON=c:jenkinsworkspacedesktop-shell-devbuildicon.ico -DMUI_UNICON=c:jenkinsworkspacedesktop-shell-devbuildicon.ico -DAPP_64=c:jenkinsworkspacedesktop-shell-devdistdesktop-0.0.1-x64.nsis.7z -DINSTALL_MODE_PER_ALL_USERS -DINSTALL_MODE_PER_ALL_USERS_REQUIRED -DRUN_AFTER_FINISH -DCOMPRESS=auto -DONE_CLICK -DBUILD_UNINSTALLER -DUNINSTALLER_OUT_FILE=c:tempelectron-builder-n8hQkZt-16fc-0-uninstaller.exe -XOutFile "c:jenkinsworkspacedesktop-shell-devdistApplication Setup 0.0.1.exe" -XVIProductVersion 0.0.1.71 -XVIAddVersionKey /LANG=1033 ProductName "Application" -XVIAddVersionKey /LANG=1033 ProductVersion "0.0.1" -XVIAddVersionKey /LANG=1033 CompanyName "Application Development" -XVIAddVersionKey /LANG=1033 LegalCopyright "Copyright 2016 company Corporation. All rights reserved." -XVIAddVersionKey /LANG=1033 FileDescription "Application desktop application" -XVIAddVersionKey /LANG=1033 FileVersion "0.0.1.71" -XUnicode true -XSetCompressor lzma -XSetCompressorDictSize 64 -
Error: C:Windowssystem32configsystemprofileAppDataLocalelectron-buildercachensisnsis-3.0.2Binmakensis.exe exited with code 3221225781
at ChildProcess.childProcess.once.code (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrcutilutil.ts:125:14)
at ChildProcess.g (events.js:291:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
From previous event:
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrctargetsnsis.ts:325:5
at next (native)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
From previous event:
at NsisTarget.executeMakensis (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderouttargetsnsis.js:371:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrctargetsnsis.ts:198:62
From previous event:
at NsisTarget.buildInstaller (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderouttargetsnsis.js:292:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrctargetsnsis.ts:71:18
at next (native)
From previous event:
at NsisTarget.finishBuild (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderouttargetsnsis.js:147:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrcpackager.ts:136:31
From previous event:
at Packager.doBuild (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderoutpackager.js:256:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrcpackager.ts:100:38
at next (native)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
From previous event:
at Packager.build (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderoutpackager.js:208:11)
at c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-buildersrcbuilder.ts:240:40
at next (native)
From previous event:
at build (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderoutbuilder.js:89:21)
at Object.<anonymous> (c:jenkinsworkspacedesktop-shell-devnode_moduleselectron-builderoutbuild-cli.js:62:41)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dist_win"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! desktop@0.0.1 dist_win: `npm run less && build -w`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the desktop@0.0.1 dist_win script 'npm run less && build -w'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the desktop package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run less && build -w
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs desktop
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls desktop
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! c:jenkinsworkspacedesktop-shell-devnpm-debug.log
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
Build and devDependencies sections of package.json
:
"build": {
"appId": "com.company.application",
"copyright": "Copyright 2016 Corporation. All rights reserved.",
"productName": "Application",
"mac": {
"category": "public.app-category.business"
},
"win": {
"target": "nsis"
},
"nsis": {
"perMachine": true
}
},
"devDependencies": {
"electron": "^1.4.7",
"electron-builder": "^8.6.0",
"electron-packager": "^8.3.0",
"esdoc": "^0.4.8",
"esdoc-node": "^1.0.0",
"eslint": "^3.10.2",
"husky": "^0.12.0",
"less": "^2.7.1",
"less-plugin-clean-css": "^1.5.1"
}
Я пытаюсь запустить контейнер докеров в Windows 10, который должен выполнять исполняемый файл Windows (myprogram.exe). Ниже вы найдете мой файл докеров:
FROM microsoft/windowsservercore
COPY mydir/myprogram.exe /mydir/
CMD ["/mydir/myprogram.exe","someparameter"]
Итак, я создаю образ с помощью:
docker image build —tag myimage .
и запустите контейнер с помощью:
docker run myimage
К сожалению, если я проверю состояние контейнера с помощью:
docker ps -a Я вижу, что контейнер вышел с
exit code 3221225781
, что, кажется, указывает на отсутствующую dll.
Чтобы отладить проблему, я запускаю команду:
docker run -it —name debug microsoft/windowsservercore cmd, остановил контейнер и скопировал исполняемый файл Windows в файловую систему контейнера:
docker cp myprogram.exe debug:c:/myprogram.exe
Теперь я снова запускаю контейнер с помощью docker start -i debug и ввожу myprogram.exe myparameter. К сожалению, программа немедленно завершает работу (обычно это занимает около 30 секунд) без каких-либо выходных данных, кода ошибки …
Мое единственное объяснение этого поведения заключается в том, что если в какой-либо программе cmd отсутствует какая-то dll, соответствующее сообщение об ошибке не включается в STDERR, а скорее в диалоговое окно сообщения. Видимо докер не поддерживает эту функцию ???
Так что лучше всего было решить эту проблему. Использование dependency walker для просмотра всех необходимых dll возможно, но это займет некоторое время, и я ищу более элегантное решение.
Перейти к ответу
Данный вопрос помечен как решенный
Ответы
2
Это достаточно открытый вопрос, поэтому дать точный ответ невозможно. Вот несколько мыслей:
- Это программа ваш, в которой отсутствует зависимость. Предположительно, вы, как автор программы, должны знать, какие зависимости требуются. Вы должны обязательно включить их в образ докера при его создании.
- Вы создаете свой образ на основе Windows Core, в котором нет всего набора компонентов пользовательского интерфейса. Это кажется наиболее очевидным, что может пойти не так, учитывая симптомы. Поэтому я бы попробовал и убедился, что ваша программа в принципе может работать в Windows Core. Это подводит меня к следующему пункту.
- На мой взгляд, наиболее практичный способ устранения неполадок — удалить Docker из уравнения. Вы хотите запустить свою программу в Windows Core. Поэтому настройте машину (физическую или виртуальную) с Windows Core внутри и попробуйте запустить там свою программу. Есть большая вероятность, что он не будет работать с такими же симптомами. Если это так, то теперь у вас уменьшилась сложность, потому что вы знаете, что ваша проблема не имеет ничего общего с докером (или нет).
- Наконец, когда ваш компьютер с Windows Core запущен и работает, вы можете сразу увидеть всплывающее окно с сообщением об ошибке (даже в Core вы можете запускать некоторые программы с возможностью запуска пользовательского интерфейса, а окна сообщений — не редкость. ), а в противном случае вы можете запустить sysinternals procmon / procxp даже в Windows Core, поэтому их использование для поиска недостающих зависимостей может помочь. Также есть Зависимости.
Примечание: под «Windows Core» в этом ответе я имею в виду Основной вариант Windows Server
Вам необходимо установить распространяемый пакет Visual C++.
- Загрузите соответствующую версию vc_redist.x64.exe и поместите ее в папку, содержащую ваш Dockerfile.
-
Отредактируйте файл Dockerfile так, чтобы вы предварительно устанавливали распространяемые компоненты VC++ при создании образа, добавив:
ОТ mcr.microsoft.com/windows/sservercore
РАБОЧИЙ КАТАЛОГ c: mydir
Скопируйте «vc_redist.x64.exe».
ЗАПУСТИТЬ vc_redist.x64.exe / install / passive / norestart / log out.txt
КОПИРОВАТЬ mydir / myprogram.exe c: mydir
CMD [«c: mydir myprogram.exe», «какой-то параметр»]
Ваше приложение должно запуститься сейчас.
Примечание: вам потребуется 64-битная сборка распространяемого пакета VC++ и соответствующая версия. Вы можете найти несколько URL-адресов для скачивания здесь