Closed myarycn closed 2 years ago
Hey @tonyanziano is this something you can take a look at, please?
@myarycn can you please try running Composer in debug mode from a terminal window and reproduce this issue?
C:\Users\<user>\AppData\Local\Programs\Bot Framework Composer
on my machine)set DEBUG=composer*
command in the windowYou should see a lot of output in the window. Once you have reproduced the issue please paste the logs here.
Thanks @munozemilio and @tonyanziano for looking into the issue. Really appreciate it. @tonyanziano, this is the log:
(base) C:\Users\yixinchen\AppData\Local\Programs\Bot Framework Composer> 2021-10-07T20:31:43.516Z composer:electron:one-auth Using genuine OneAuth. 2021-10-07T20:31:43.535Z composer:electron:env { ALLUSERSPROFILE: 'C:\ProgramData', APPDATA: 'C:\Users\yixinchen\AppData\Roaming', ChocolateyInstall: 'C:\ProgramData\chocolatey', ChocolateyLastPathUpdate: 'Fri Mar 19 10:32:03 2021', CommonProgramFiles: 'C:\Program Files\Common Files', 'CommonProgramFiles(x86)': 'C:\Program Files (x86)\Common Files', CommonProgramW6432: 'C:\Program Files\Common Files', COMPUTERNAME: 'YIXINCHEN-6TNB8', ComSpec: 'C:\WINDOWS\system32\cmd.exe', CONDA_DEFAULT_ENV: 'base', CONDA_EXE: 'C:\Users\yixinchen\Miniconda3\Scripts\conda.exe', CONDA_PREFIX: 'C:\Users\yixinchen\Miniconda3', CONDA_PROMPT_MODIFIER: '(base) ', CONDA_PYTHON_EXE: 'C:\Users\yixinchen\Miniconda3\python.exe', CONDA_SHLVL: '1', DEBUG: 'composer*', DriverData: 'C:\Windows\System32\Drivers\DriverData', FPS_BROWSER_APP_PROFILE_STRING: 'Internet Explorer', FPS_BROWSER_USER_PROFILE_STRING: 'Default', HOMEDRIVE: 'C:', HOMEPATH: '\Users\yixinchen', LOCALAPPDATA: 'C:\Users\yixinchen\AppData\Local', LOGONSERVER: '\\YIXINCHEN-6TNB8', NugetMachineInstallRoot: 'C:\CxCache', NUMBER_OF_PROCESSORS: '8', OneDrive: 'C:\Users\yixinchen\OneDrive - Microsoft', OneDriveCommercial: 'C:\Users\yixinchen\OneDrive - Microsoft', OneDriveConsumer: 'C:\Users\yixinchen\OneDrive', OS: 'Windows_NT', Path: 'C:\Users\yixinchen\Miniconda3;C:\Users\yixinchen\Miniconda3\Library\mingw-w64\bin;C:\Users\yixinchen\Miniconda3\Library\usr\bin;C:\Users\yixinchen\Miniconda3\Library\bin;C:\Users\yixinchen\Miniconda3\Scripts;C:\Users\yixinchen\Miniconda3\bin;C:\Users\yixinchen\Miniconda3\condabin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\nuget;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Azure Data Studio\bin;C:\Program Files (x86)\dotnet;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs;C:\Users\yixinchen\Miniconda3;C:\Users\yixinchen\Miniconda3\Library\mingw-w64\bin;C:\Users\yixinchen\Miniconda3\Library\usr\bin;C:\Users\yixinchen\Miniconda3\Library\bin;C:\Users\yixinchen\Miniconda3\Scripts;C:\Users\yixinchen\AppData\Local\Microsoft\WindowsApps;C:\Users\yixinchen\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\nuget;C:\Users\yixinchen\Downloads\genevaorchestrator\lib\Cli\Test;C:\Users\yixinchen\AppData\Roaming\npm', PATHEXT: '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', PROCESSOR_ARCHITECTURE: 'AMD64', PROCESSOR_IDENTIFIER: 'Intel64 Family 6 Model 126 Stepping 5, GenuineIntel', PROCESSOR_LEVEL: '6', PROCESSOR_REVISION: '7e05', ProgramData: 'C:\ProgramData', ProgramFiles: 'C:\Program Files', 'ProgramFiles(x86)': 'C:\Program Files (x86)', ProgramW6432: 'C:\Program Files', PROMPT: '(base) $P$G', PSModulePath: 'C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell', PUBLIC: 'C:\Users\Public', SESSIONNAME: 'Console', SystemDrive: 'C:', SystemRoot: 'C:\WINDOWS', TEMP: 'C:\Users\YIXINC~1\AppData\Local\Temp', TMP: 'C:\Users\YIXINC~1\AppData\Local\Temp', UATDATA: 'C:\windows\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77', USERDNSDOMAIN: 'redmond.corp.microsoft.com', USERDOMAIN: 'REDMOND', USERDOMAIN_ROAMINGPROFILE: 'REDMOND', USERNAME: 'yixinchen', USERPROFILE: 'C:\Users\yixinchen', windir: 'C:\WINDOWS' } 2021-10-07T20:31:43.548Z composer:electron production environment detected. 2021-10-07T20:31:43.552Z composer:electron Run completed 2021-10-07T20:31:43.601Z composer:electron App ready 2021-10-07T20:31:43.601Z composer:electron Loading latest known locale 2021-10-07T20:31:43.605Z composer:electron:electron-window Raw screen dimensions: 920 x 1707 2021-10-07T20:31:43.609Z composer:electron:electron-window Electron window dimensions: 828 x 1104 (electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check https://github.com/electron/electron/issues/18397 2021-10-07T20:31:43.643Z composer:electron:electron-window Rendered Electron window dimensions: [ 1105, 828 ] 2021-10-07T20:31:44.469Z composer:electron Creating app data directory... 2021-10-07T20:31:44.470Z composer:electron creating composer app data path at: C:\Users\yixinchen\AppData\Roaming\BotFrameworkComposer 2021-10-07T20:31:44.472Z composer:electron creating local bot runtime publish path: C:\Users\yixinchen\AppData\Roaming\BotFrameworkComposer\hostedBots 2021-10-07T20:31:44.475Z composer:electron Created app data directory. 2021-10-07T20:31:44.480Z composer:electron Starting server... 2021-10-07T20:31:45.169Z composer App Settings: { botAdminEndpoint: 'http://localhost:3979', botEndpoint: 'http://localhost:3979', botsFolder: 'C:\Users\yixinchen', runtimeFrameworkVersion: 'netcoreapp3.1', appDataPath: 'C:\Users\yixinchen\AppData\Roaming\BotFrameworkComposer\data.json', platform: 'win32', diskNames: [ 'C:/' ], extensions: { manifestPath: 'C:\Users\yixinchen\AppData\Roaming\BotFrameworkComposer\extensions.json', dataDir: 'C:\Users\yixinchen\AppData\Roaming\BotFrameworkComposer\extension-data', builtinDir: 'C:\Users\yixinchen\AppData\Local\Programs\Bot Framework Composer\resources\app.asar.unpacked\extensions', remoteDir: 'C:\Users\yixinchen\AppData\Roaming\BotFrameworkComposer\extensions', settingsPath: 'C:\Users\yixinchen\AppData\Roaming\BotFrameworkComposer\extension-settings.json' } } 2021-10-07T20:31:46.398Z composer:telemetry Setting up App Insights 2021-10-07T20:31:46.410Z composer:telemetry Starting Application Insights 2021-10-07T20:31:46.421Z composer:telemetry Started Application Insights 2021-10-07T20:31:46.634Z composer:electron-auth-provider Initialized. 2021-10-07T20:31:46.634Z composer:auth-service Initialized in Electron context. 2021-10-07T20:31:46.636Z composer:auth-service Production environment detected. Generating CSRF token. Thu, 07 Oct 2021 20:31:46 GMT express-session deprecated undefined resave option; provide resave option at resources\app.asar\node_modules\@bfc\server\build\server.js:56:17 Thu, 07 Oct 2021 20:31:46 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at resources\app.asar\node_modules\@bfc\server\build\server.js:56:17 Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not scale past a single process. 2021-10-07T20:31:46.784Z composer:extension-manager Loading extensions from C:\Users\yixinchen\AppData\Local\Programs\Bot Framework Composer\resources\app.asar.unpacked\extensions 2021-10-07T20:31:47.847Z composer:extensions registering publish method azurePublish 2021-10-07T20:31:49.073Z composer:extensions registering publish method azurePublishNew 2021-10-07T20:31:49.082Z composer:extensions:azure-publish-new Reading from store: { some: 'data' } 2021-10-07T20:31:49.084Z composer:extensions:azure-publish-new Reading from store: { some: 'data' } 2021-10-07T20:31:49.407Z composer:extensions registering publish method localpublish 2021-10-07T20:31:49.823Z composer:extensions registering publish method pva-publish-composer 2021-10-07T20:31:49.912Z composer:extension-manager Loading extensions from C:\Users\yixinchen\AppData\Roaming\BotFrameworkComposer\extensions
Composer now running at:
2021-10-07T20:31:49.936Z composer:electron Server started at port: 5000 2021-10-07T20:31:49.936Z composer:electron Rendering application... GET / 200 10.481 ms - 899 2021-10-07T20:31:50.929Z composer:electron Initializing app updater... 2021-10-07T20:31:50.963Z composer:electron Initialized 2021-10-07T20:31:50.963Z composer:electron:app-updater Updates set to be retrieved from stable repo. 2021-10-07T20:31:50.969Z composer:electron:app-updater Updating from stable to stable. Not allowing downgrade. Checking for update 2021-10-07T20:31:50.970Z composer:electron:app-updater Checking for updates... 2021-10-07T20:31:50.970Z composer:electron App updater initialized. Update for version 2.1.1 is not available (latest version: 2.1.1, downgrade is disallowed). 2021-10-07T20:31:51.934Z composer:electron:app-updater Update not available: { version: '2.1.1', releaseDate: '2021-09-08T15:28:26.086Z', githubArtifactName: 'BotFramework-Composer-2.1.1-windows-setup.exe', path: 'BotFramework-Composer-2.1.1-windows-setup.exe', sha512: 'cIvfGbCxlfCb1DV2PLcAik643fvxyVl4Kv5AYVn83YCkhyVYSKK1fkhkstjxNeDYDwOc2dsjMoVa2v/j2J2c5w==', releaseName: '2.1.1', releaseNotes: '
This is a STABLE release of Composer.
\n' + 'https://github.com/microsoft/BotFramework-Composer/blob/release/2.1.1/releases/2.1.1.md
' } 2021-10-07T20:31:51.938Z composer:electron:app-updater Resetting to idle... POST /api/settings 200 5.505 ms - 43 GET /api/extensions 304 1.461 ms - - 2021-10-07T20:31:52.060Z composer:extension-manager Including defaults in settings. GET /api/extensions/settings?_all 304 7.502 ms - - GET /api/featureFlags 304 2.629 ms - - GET /api/assets/locales/en-US.json 200 45.997 ms - - GET /api/utilities/checkNode 304 110.109 ms - - GET /api/storages 304 0.808 ms - - GET /api/assets/templateFeedUrl 304 1.154 ms - - GET /api/storages/default/blobs?path=C%253A%252FUsers%252Fyixinchen%252Fsource%252Frepos%252FLensOrcEchoBot%252FLensOrcEchoBot%252FBots 304 10.619 ms - - GET /api/projects/recent 200 9.201 ms - 363 2021-10-07T20:31:52.485Z composer:electron Rendered application. POST /api/assets/projectTemplates 200 447.804 ms - - GET /api/projects/feed 304 471.457 ms - - 2021-10-07T20:31:53.039Z composer:electron [Windows] Main window is now showing. Processing deep link if any.@myarycn and I hopped on a call and tried to debug the issue. We discovered that this is the line that is throwing which eventually ends up at the npm library execa
making a call to childProcess.spawnSync()
with the command above that fails with ENOENT
.
We tried to set a breakpoint at the call, but unfortunately since the template installation happens in a Node worker_thread
, we cannot debug it.
She has no issue executing the command outside of Composer, but Composer can't seem to get past that command, which just generates a path to the templates directory.
@benbrown feel free to add anything if you have any ideas.
===
For now, there is a workaround -- you just need to have someone else create a bot via Composer and then send the generated bot folder to you. Then you should be able to open the bot inside of Composer and start authoring without any issues.
Just dropping a comment here since I might've seen an issue similar to this before.
Yeoman stores its config file in .yo-rc.json
, the installLocalGenerators
searches the parent folders for this file, if it is found, it sets the root folder for the project in that location and you might get this bug (the bug being the inability to call chdir() from a node worker thread).
@myarycn , could you perhaps try looking for this file somewhere (likely in your %USERPROFILE% folder) and delete it (it's safe to remove unless you've configured it extensively), and try creating the bot again?
@myarycn , were you able to try the steps suggested above? Please let us know if this unblocks you. Thanks!
Hi, i have the same problem, i did the steps above but it didn´t work. This is my log:
ALLUSERSPROFILE: 'C:\ProgramData', APPDATA: 'C:\Users\usuario\AppData\Roaming', CommonProgramFiles: 'C:\Program Files\Common Files', 'CommonProgramFiles(x86)': 'C:\Program Files (x86)\Common Files', CommonProgramW6432: 'C:\Program Files\Common Files', ComSpec: 'C:\Windows\system32\cmd.exe', DEBUG: 'composer*', DEFLOGDIR: 'C:\ProgramData\McAfee\Endpoint Security\Logs', DriverData: 'C:\Windows\System32\Drivers\DriverData', FPS_BROWSER_APP_PROFILE_STRING: 'Internet Explorer', FPS_BROWSER_USER_PROFILE_STRING: 'Default', HOMEDRIVE: 'C:', HOMEPATH: '\Users\usuario', KeaAgent: '"C:\Program Files (x86)\Kaspersky Lab\Endpoint Agent\agent.exe"', LOCALAPPDATA: 'C:\Users\usuario\AppData\Local', NUMBER_OF_PROCESSORS: '12', OS: 'Windows_NT', Path: 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Users\usuario\AppData\Roaming\npm\node_modules\chromedriver\lib\chromedriver;C:\Program Files\nodejs;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Users\usuario\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\usuario\AppData\Local\Programs\Python\Python38\;C:\Users\usuario\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\Hostx86\x64;C:\Program Files\Azure Data Studio\bin;C:\Users\usuario\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\Program Files\Azure Data Studio\bin;C:\Users\usuario\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\usuario\AppData\Roaming\npm;C:\Windows\System32\WindowsPowerShell\v1.0;', PATHEXT: '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', PROCESSOR_ARCHITECTURE: 'AMD64', PROCESSOR_IDENTIFIER: 'Intel64 Family 6 Model 158 Stepping 13, GenuineIntel', PROCESSOR_LEVEL: '6', PROCESSOR_REVISION: '9e0d', ProgramData: 'C:\ProgramData', ProgramFiles: 'C:\Program Files', 'ProgramFiles(x86)': 'C:\Program Files (x86)', ProgramW6432: 'C:\Program Files', PROMPT: '$P$G', PSModulePath: 'C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules', PUBLIC: 'C:\Users\Public', SESSIONNAME: 'Console', SystemDrive: 'C:', SystemRoot: 'C:\Windows', TEMP: 'C:\Users\usuario\AppData\Local\Temp', TMP: 'C:\Users\usuario\AppData\Local\Temp', UATDATA: 'C:\Windows\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77', USERNAME: 'usuario', USERPROFILE: 'C:\Users\usuario', VBOX_MSI_INSTALL_PATH: 'C:\Program Files\Oracle\VirtualBox\', windir: 'C:\Windows', ZES_ENABLE_SYSMAN: '1' } 2022-06-28T21:14:07.223Z composer:electron production environment detected. 2022-06-28T21:14:07.225Z composer:electron Run completed 2022-06-28T21:14:07.257Z composer:electron App ready 2022-06-28T21:14:07.257Z composer:electron Loading latest known locale 2022-06-28T21:14:07.259Z composer:electron:electron-window Raw screen dimensions: 824 x 1536 2022-06-28T21:14:07.259Z composer:electron:electron-window Electron window dimensions: 741 x 988 (electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check https://github.com/electron/electron/issues/18397 2022-06-28T21:14:07.276Z composer:electron:electron-window Rendered Electron window dimensions: [ 989, 743 ] 2022-06-28T21:14:07.857Z composer:electron Creating app data directory... 2022-06-28T21:14:07.857Z composer:electron creating composer app data path at: C:\Users\usuario\AppData\Roaming\BotFrameworkComposer 2022-06-28T21:14:07.858Z composer:electron creating local bot runtime publish path: C:\Users\usuario\AppData\Roaming\BotFrameworkComposer\hostedBots 2022-06-28T21:14:07.861Z composer:electron Created app data directory. 2022-06-28T21:14:07.861Z composer:electron Starting server... 'wmic' is not recognized as an internal or external command, operable program or batch file. Error: Command failed: wmic volume get name 'wmic' is not recognized as an internal or external command, operable program or batch file.
at checkExecSyncError (child_process.js:634:11)
at Object.execSync (child_process.js:670:15)
at Object.execSync (electron/js2c/asar.js:696:23)
at Object.<anonymous> (C:\Users\usuario\AppData\Local\Programs\Bot Framework Composer\resources\app.asar\node_modules\@bfc\server\build\settings\env.js:28:48)
at Module._compile (internal/modules/cjs/loader.js:968:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:986:10)
at Module.load (internal/modules/cjs/loader.js:816:32)
at Module._load (internal/modules/cjs/loader.js:728:14)
at Module._load (electron/js2c/asar.js:717:26)
at Function.Module._load (electron/js2c/asar.js:717:26) {
status: 1, signal: null, output: [ null,
This is a STABLE release of Composer.
\n' + 'https://github.com/microsoft/BotFramework-Composer/blob/main/releases/2.1.2.md
' } 2022-06-28T21:14:14.042Z composer:electron:app-updater Resetting to idle... GET /api/assets/templateReadme?moduleName=%2540microsoft%252Fgenerator-bot-empty 304 1371.890 ms - - GET /api/assets/templateReadme?moduleName=QnASample 304 642.432 ms - - 2022-06-28T21:14:26.877Z composer Attempting to create project at /prueba POST /api/projects 202 0.585 ms - 48 2022-06-28T21:14:26.880Z composer About to create folder /prueba/CoreWithQnA 2022-06-28T21:14:27.475Z composer:worker:templateInstallation Getting Yeoman environment 2022-06-28T21:14:27.485Z composer Cleaning up failed project at /prueba/CoreWithQnA GET /api/status/d5f8f715-043d-4630-8fd5-78ea411f06e9 500 0.793 ms - -Any update on this ? I have exact same log while creating a bot in debug mode.
Yeah me too
It shows error no matter what type of bot I picked: Error calling npm to fetch template. Please ensure that node and npm are installed and available on your system. Full error message: Command failed with ENOENT: npm root -g --prefix C:\Users\yixinchen\AppData\Roaming\BotFrameworkComposer.yo-repository --loglevel error spawnSync cmd.exe ENOENT
I'm able to get npm and node version: node -v ==> v14.18.0 npm -v ==> 7.24.2 However this errors keeps pop up like always. I also uninstalled all and reinstall but still end up with no luck. Could you pls help??? Thank you!