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

Composer crashes on MacOS Catalina when run as a Docker container #1566

Closed
1 of 3 tasks
nathanlindorff opened this issue Nov 12, 2019 · 4 comments
Closed
1 of 3 tasks
Labels
customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. Type: Bug Something isn't working

Comments

@nathanlindorff
Copy link

nathanlindorff commented Nov 12, 2019

Describe the bug

After building and running using docker-compose, the composer app crashes and exits on startup.

Version

Running the stable branch as at commit ed080a2

OS

What operating system are you using?

  • macOS
  • Windows
  • Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Run docker-compose build from terminal. Output:
Building composer
Step 1/26 : FROM node:10-alpine as build
 ---> 0aa7bb41deca
Step 2/26 : WORKDIR /src/Composer
 ---> Running in 9539223eef87
Removing intermediate container 9539223eef87
 ---> b8bf40184de8
Step 3/26 : COPY yarn.lock .
 ---> 74617f6cc7ba
Step 4/26 : COPY .npmrc .
 ---> 5179bab1d85f
Step 5/26 : COPY package.json .
 ---> 6ee0f0393869
Step 6/26 : COPY packages/client/package.json ./packages/client/
 ---> 2a5ada466890
Step 7/26 : COPY yarn.lock ./packages/server/
 ---> 464aad40d42c
Step 8/26 : COPY packages/server/package.json ./packages/server/
 ---> fba0f278fa0c
Step 9/26 : COPY packages/lib/package.json ./packages/lib/
 ---> dfd5c5df9aa3
Step 10/26 : COPY packages/lib/code-editor/package.json ./packages/lib/code-editor/
 ---> 7030afc0b9af
Step 11/26 : COPY packages/lib/shared/package.json ./packages/lib/shared/
 ---> bc90ff685b8e
Step 12/26 : COPY packages/lib/indexers/package.json ./packages/lib/indexers/
 ---> cda231c9591c
Step 13/26 : COPY packages/extensions/package.json ./packages/extensions/
 ---> 59fd92dc9115
Step 14/26 : COPY packages/extensions/obiformeditor/package.json ./packages/extensions/obiformeditor/
 ---> 03677cda09de
Step 15/26 : COPY packages/extensions/visual-designer/package.json ./packages/extensions/visual-designer/
 ---> 4cd160c723c9
Step 16/26 : RUN yarn install
 ---> Running in d27ae9c9580d
yarn install v1.19.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.7: The platform "linux" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "jest > jest-cli > @jest/core > jest-resolve-dependencies@24.5.0" has unmet peer dependency "jest-resolve@^24.1.0".
warning "jest > jest-cli > jest-config > jest-resolve@24.5.0" has unmet peer dependency "jest-haste-map@^24.0.0".
warning " > react-testing-library@6.1.2" has unmet peer dependency "react@*".
warning " > react-testing-library@6.1.2" has unmet peer dependency "react-dom@*".
warning " > @bfc/obiformeditor@1.0.0" has unmet peer dependency "react@16.9.0".
warning " > @bfc/obiformeditor@1.0.0" has unmet peer dependency "react-dom@16.9.0".
warning " > @bfc/visual-designer@1.0.0" has unmet peer dependency "react@16.x".
warning " > @bfc/code-editor@0.0.0" has unmet peer dependency "react@16.9.0".
warning " > @bfc/code-editor@0.0.0" has unmet peer dependency "react-dom@16.9.0".
warning " > @bfc/shared@0.0.0" has unmet peer dependency "format-message@^6.2.1".
warning " > @bfc/shared@0.0.0" has unmet peer dependency "react@16.9.0".
warning " > @bfc/shared@0.0.0" has unmet peer dependency "react-dom@16.9.0".
warning "workspace-aggregator-e268b7d8-4a99-46a3-96da-4625b8ebca00 > @bfc/client > eslint-config-react-app@3.0.8" has unmet peer dependency "eslint-plugin-flowtype@2.x".
warning "workspace-aggregator-e268b7d8-4a99-46a3-96da-4625b8ebca00 > @bfc/server > clean-webpack-plugin@2.0.1" has unmet peer dependency "webpack@*".
warning "workspace-aggregator-e268b7d8-4a99-46a3-96da-4625b8ebca00 > @bfc/server > copy-webpack-plugin@5.0.2" has unmet peer dependency "webpack@^4.0.0".
[4/4] Building fresh packages...
Done in 287.05s.
Removing intermediate container d27ae9c9580d
 ---> 5d4642836bff
Step 17/26 : COPY . .
 ---> e07dfca8f108
Step 18/26 : RUN yarn build:prod
 ---> Running in adb8cf157a00
yarn run v1.19.1
$ yarn build:lib && yarn build:extensions && yarn build:server && yarn build:client
$ yarn workspace @bfc/libs build:all
$ concurrently --kill-others-on-fail "yarn:build:code-editor" "yarn:build:shared" "yarn:build:indexers"
[build:code-editor] $ cd code-editor && yarn build
[build:indexers] $ cd indexers && yarn build
[build:shared] $ cd shared && yarn build
[build:code-editor] $ yarn clean && yarn build:css && yarn build:ts
[build:indexers] $ yarn clean && yarn build:css && yarn build:ts
[build:shared] $ yarn clean && yarn build:css && yarn build:ts
[build:code-editor] $ rimraf lib demo/dist
[build:shared] $ rimraf lib demo/dist
[build:indexers] $ rimraf lib demo/dist
[build:indexers] $ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
[build:shared] $ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
[build:code-editor] $ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
[build:indexers] $ tsc --build tsconfig.build.json
[build:shared] $ tsc --build tsconfig.build.json
[build:code-editor] $ tsc --build tsconfig.build.json
[build:indexers] yarn run build:indexers exited with code 0
[build:code-editor] yarn run build:code-editor exited with code 0
[build:shared] yarn run build:shared exited with code 0
$ yarn workspace @bfc/extensions build:all
$ concurrently --kill-others-on-fail "yarn:build:obiformeditor" "yarn:build:visual-designer"
[build:obiformeditor] $ cd obiformeditor && yarn build
[build:visual-designer] $ cd visual-designer && yarn build
[build:obiformeditor] $ yarn clean && yarn build:css && yarn build:ts
[build:visual-designer] $ yarn clean && yarn build:css && yarn build:ts
[build:visual-designer] $ rimraf lib demo/dist
[build:obiformeditor] $ rimraf lib demo/dist
[build:obiformeditor] $ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
[build:visual-designer] $ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
[build:obiformeditor] $ tsc --build tsconfig.build.json
[build:visual-designer] $ tsc --build tsconfig.build.json
[build:visual-designer] yarn run build:visual-designer exited with code 0
[build:obiformeditor] yarn run build:obiformeditor exited with code 0
$ yarn workspace @bfc/server build
$ tsc -p tsconfig.build.json
$ yarn workspace @bfc/client build
$ node scripts/build.js
/bin/sh: git: not found
Creating an optimized production build. This may take a few minutes..
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
Compiled successfully! Run "yarn startall" to start the web application & test runtime.

Done in 311.41s.
Removing intermediate container adb8cf157a00
 ---> 972051889e52
Step 19/26 : FROM node:10-alpine
 ---> 0aa7bb41deca
Step 20/26 : WORKDIR /app/Composer/server
 ---> Running in 85819c4bf630
Removing intermediate container 85819c4bf630
 ---> 73546b9ac293
Step 21/26 : COPY --from=build /src/Composer/.npmrc .
 ---> 314577f8d3fd
Step 22/26 : COPY --from=build /src/Composer/packages/lib ./lib
 ---> 36ae9538408d
Step 23/26 : COPY --from=build /src/Composer/packages/server .
 ---> 960fce055ee5
Step 24/26 : RUN node ./prepare-prod.js
 ---> Running in b511c922bace
Removing intermediate container b511c922bace
 ---> fadba6df3528
Step 25/26 : RUN yarn --production && yarn cache clean
 ---> Running in 1d35cd2b5eb3
yarn install v1.19.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.7: The platform "linux" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @bfc/shared@0.0.0" has unmet peer dependency "react@16.9.0".
warning " > @bfc/shared@0.0.0" has unmet peer dependency "react-dom@16.9.0".
warning " > clean-webpack-plugin@2.0.1" has unmet peer dependency "webpack@*".
warning " > copy-webpack-plugin@5.0.2" has unmet peer dependency "webpack@^4.0.0".
warning " > ts-node@8.4.1" has unmet peer dependency "typescript@>=2.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 26.16s.
yarn cache v1.19.1
success Cleared cache.
Done in 1.97s.
Removing intermediate container 1d35cd2b5eb3
 ---> 76e56d93549d
Step 26/26 : CMD ["node", "build/server.js"]
 ---> Running in 961c77708a69
Removing intermediate container 961c77708a69
 ---> 0cb78676a217
Successfully built 0cb78676a217
Successfully tagged botframework-composer_composer:latest
Building botruntime
Step 1/13 : FROM mcr.microsoft.com/dotnet/core/sdk:2.1-alpine AS build
 ---> 7cc7c840641c
Step 2/13 : WORKDIR /app/botproject/csharp
 ---> Running in e24721ef6351
Removing intermediate container e24721ef6351
 ---> 90f429d727f6
Step 3/13 : COPY *.sln .
 ---> 3041f2664713
Step 4/13 : COPY *.csproj .
 ---> a7d441d2e623
Step 5/13 : COPY Tests/*.csproj Tests/
 ---> da3f2f3d96f7
Step 6/13 : COPY NuGet.Config .
 ---> 7c45c3bb86d5
Step 7/13 : RUN dotnet restore
 ---> Running in 689e693579d8
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.signalr.common/index.json'.
  Resource temporarily unavailable
  Restore completed in 18.05 sec for /app/botproject/csharp/BotProject.csproj.
  Restore completed in 18.05 sec for /app/botproject/csharp/Tests/Tests.csproj.
Removing intermediate container 689e693579d8
 ---> 690a0a79c870
Step 8/13 : COPY . .
 ---> 6d297662513b
Step 9/13 : RUN dotnet publish -o out
 ---> Running in 73dec63b7502
Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 99.23 ms for /app/botproject/csharp/BotProject.csproj.
  Restore completed in 99.22 ms for /app/botproject/csharp/Tests/Tests.csproj.
ComposerBot.cs(15,7): warning CS0105: The using directive for 'Microsoft.Bot.Builder.Dialogs.Debugging' appeared previously in this namespace [/app/botproject/csharp/BotProject.csproj]
  BotProject -> /app/botproject/csharp/bin/Debug/netcoreapp2.1/BotProject.dll
  BotProject -> /app/botproject/csharp/out/
  Tests -> /app/botproject/csharp/Tests/bin/Debug/netcoreapp2.1/Tests.dll
  Tests -> /app/botproject/csharp/Tests/out/
Removing intermediate container 73dec63b7502
 ---> 1dc9ce48837e
Step 10/13 : FROM mcr.microsoft.com/dotnet/core/aspnet:2.1-alpine AS runtime
 ---> 96b6d3d03592
Step 11/13 : WORKDIR /app/botproject/csharp
 ---> Running in 6bd4df6eaec7
Removing intermediate container 6bd4df6eaec7
 ---> 3e2e8ef77fbc
Step 12/13 : COPY --from=build /app/botproject/csharp/out .
 ---> 17829b958cc9
Step 13/13 : CMD ["dotnet", "BotProject.dll"]
 ---> Running in 208e5b2ef629
Removing intermediate container 208e5b2ef629
 ---> c45991c88301
Successfully built c45991c88301
Successfully tagged botframework-composer_botruntime:latest
  1. Run docker-compose up from terminal.
Creating network "botframework-composer_default" with the default driver
Creating botframework-composer_botruntime_1 ... done
Creating botframework-composer_composer_1   ... done
Attaching to botframework-composer_botruntime_1, botframework-composer_composer_1
botruntime_1  | info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
botruntime_1  |       User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
botruntime_1  | info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[58]
botruntime_1  |       Creating key {936c0ced-d92c-4890-81c9-45ded26d783a} with creation date 2019-11-12 23:07:48Z, activation date 2019-11-12 23:07:48Z, and expiration date 2020-02-10 23:07:48Z.
botruntime_1  | warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
botruntime_1  |       No XML encryptor configured. Key {936c0ced-d92c-4890-81c9-45ded26d783a} may be persisted to storage in unencrypted form.
botruntime_1  | info: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[39]
botruntime_1  |       Writing data to file '/root/.aspnet/DataProtection-Keys/key-936c0ced-d92c-4890-81c9-45ded26d783a.xml'.
botruntime_1  | Hosting environment: Production
botruntime_1  | Content root path: /app/botproject/csharp
botruntime_1  | Now listening on: http://[::]:80
botruntime_1  | Application started. Press Ctrl+C to shut down.
composer_1    | internal/modules/cjs/loader.js:638
composer_1    |     throw err;
composer_1    |     ^
composer_1    | 
composer_1    | Error: Cannot find module 'nanoid/generate'
composer_1    |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
composer_1    |     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
composer_1    |     at Module.require (internal/modules/cjs/loader.js:692:17)
composer_1    |     at require (internal/modules/cjs/helpers.js:25:18)
composer_1    |     at Object.<anonymous> (/app/Composer/server/node_modules/@bfc/shared/lib/dialogFactory.js:55:34)
composer_1    |     at Module._compile (internal/modules/cjs/loader.js:778:30)
composer_1    |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
composer_1    |     at Module.load (internal/modules/cjs/loader.js:653:32)
composer_1    |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
composer_1    |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
botframework-composer_composer_1 exited with code 1

Expected behavior

Composer to run and be accessible in the browser

Additional context

Running Docker desktop community version 2.1.0.4 (39773) (I believe this is the latest, i updated before I ran)

@nathanlindorff nathanlindorff added the Needs-triage A new issue that require triage label Nov 12, 2019
@cwhitten
Copy link
Member

@nathanlindorff thanks for the issue. we're working on changing the way we package the app that could be causing some of these errors in a docker environment. in a couple days i expect we'll have a better response for you. in the meantime are you able to run Composer on your host machine?

@cwhitten cwhitten added Type: Bug Something isn't working and removed Needs-triage A new issue that require triage labels Nov 13, 2019
@a-b-r-o-w-n
Copy link
Contributor

Thanks for the report @nathanlindorff. I have found the issue and have a PR (#1574) that addresses it.

In the meantime, we suggest using yarn to run Composer on your machine.

@a-b-r-o-w-n a-b-r-o-w-n added customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. labels Nov 13, 2019
@cwhitten
Copy link
Member

addressed in #1574

@nathanlindorff
Copy link
Author

I'll give running it locally a go when I get a chance. I did do that initially before moving on to docker but found it crashed and wouldn't restart. I didn't spend much time debugging that before trying to run via docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants