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

First run on fresh machine fails #1721

Closed
pierceboggan opened this issue Jul 23, 2021 · 4 comments · Fixed by #1732
Closed

First run on fresh machine fails #1721

pierceboggan opened this issue Jul 23, 2021 · 4 comments · Fixed by #1732
Assignees
Labels
TA:Infra Team Area: Infra

Comments

@pierceboggan
Copy link
Collaborator

Describe the bug
The first run experience failed due to an issue installing required .NET dependencies.

To Reproduce
Steps to reproduce the behavior:

  1. Start from a fresh machine without Visual Studio Code, Teams Toolkit, or Node.js installed.
  2. Install Visual Studio Code.
  3. Install Teams Toolkit extension.
  4. Follow quickstart page. Install Node.js. Login to M365 and Azure accounts and select to create a new project.
  5. Scaffold new bot with default settings.
  6. Hit F5.

Expected behavior
Application builds and deploys successfully without requiring user intervention.

** Actual behavior**
Failed to install .NET Core SDK error.

image

Screenshots
If applicable, add screenshots to help explain your problem.

VS Code Extension Information (please complete the following information):

  • OS: macOS
  • Version 2.2.0

Additional context
Teams Toolkit extension output:

[2021-07-23T20:52:00.709Z] [Info] - Teams Toolkit extension is now active!
[2021-07-23T20:52:02.697Z] [Info] - [core] start task:getProjectConfig, inputs:{"projectPath":"/Users/pierce/Desktop/HelloBots","platform":"vsc","vscodeEnv":"local","function-dotnet-checker-enabled":true,"correlationId":"7f6fcbdd-fec6-4f87-82b6-0226ca749332"}
[2021-07-23T20:52:02.702Z] [Info] - [core] finish task:getProjectConfig
[2021-07-23T20:52:02.703Z] [Info] - [core] start task:getProjectConfig, inputs:{"projectPath":"/Users/pierce/Desktop/HelloBots","platform":"vsc","vscodeEnv":"local","function-dotnet-checker-enabled":true,"correlationId":"cda3b75f-b6f9-4cce-816e-8fffaec9a37f"}
[2021-07-23T20:52:02.704Z] [Info] - [core] finish task:getProjectConfig
[2021-07-23T20:52:08.052Z] [Info] - [core] start task:executeUserTask, inputs:{"projectPath":"/Users/pierce/Desktop/HelloBots","platform":"vsc","vscodeEnv":"local","function-dotnet-checker-enabled":true,"correlationId":"7fcfa191-76e2-435e-a4b7-0367574124ca","ignoreLock":true,"ignoreConfigPersist":true}
[2021-07-23T20:52:08.056Z] [Debug] - [core] success to get questions for executeUserTask
[2021-07-23T20:52:08.057Z] [Info] - [core] finish task:executeUserTask
[2021-07-23T20:52:08.093Z] [Info] - [core] start task:executeUserTask, inputs:{"projectPath":"/Users/pierce/Desktop/HelloBots","platform":"vsc","vscodeEnv":"local","function-dotnet-checker-enabled":true,"correlationId":"77927888-26c7-4e24-9124-c6f88e12eb00","ignoreLock":true,"ignoreConfigPersist":true}
[2021-07-23T20:52:08.094Z] [Debug] - [core] success to get questions for executeUserTask
[2021-07-23T20:52:08.094Z] [Info] - [core] finish task:executeUserTask
[2021-07-23T20:52:08.148Z] [Info] - Cannot find .NET Core SDK (v3.1). For the details why .NET SDK is needed, refer to https://aka.ms/teamsfx-envchecker-help#overall
[2021-07-23T20:52:08.148Z] [Info] - Downloading and installing the portable version of .NET Core SDK (v3.1), which will be installed to /Users/pierce/.fx/bin/dotnet and will not affect your environment.
...[2021-07-23T20:52:11.685Z] [Error] - Failed to install .NET Core SDK (v3.1). Install .NET Core SDK (v3.1) manually and restart Visual Studio Code. dotnet-install command failed., command = '/Users/pierce/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-2.2.0/out/src/resource/dotnet-install.sh -InstallDir /Users/pierce/.fx/bin/dotnet -Channel 3.1', options = '{"cwd":"/Users/pierce/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-2.2.0/out/src/resource","maxBuffer":512000,"timeout":300000,"killSignal":"SIGKILL","shell":false}', error = 'Error: Command failed: /Users/pierce/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-2.2.0/out/src/resource/dotnet-install.sh -InstallDir /Users/pierce/.fx/bin/dotnet -Channel 3.1
dotnet_install: Error: Could not find `.NET Core SDK` with version = 3.1.411
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
', stdout = 'dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Downloading primary link https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.411/dotnet-sdk-3.1.411-osx-arm64.tar.gz
curl: (22) The requested URL returned error: 404 
dotnet-install: The resource at https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.411/dotnet-sdk-3.1.411-osx-arm64.tar.gz is not available.
dotnet-install: Downloading legacy link https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.411/dotnet-dev-osx-arm64.3.1.411.tar.gz
curl: (22) The requested URL returned error: 404 
dotnet-install: The resource at https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.411/dotnet-dev-osx-arm64.3.1.411.tar.gz is not available.
', stderr = 'dotnet_install: Error: Could not find `.NET Core SDK` with version = 3.1.411
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
', timecost = '3.53s'

[2021-07-23T20:52:11.687Z] [Info] - Successfully installed .NET Core SDK (v3.1).
[2021-07-23T20:52:11.692Z] [Error] - Debug 2021-07-23T20:52:08.103Z: NodeChecker checking for supported versions: '["10","12","14"]'
Debug 2021-07-23T20:52:08.142Z: [start] read dotnet path from '/Users/pierce/.fx/dotnet.json'
Debug 2021-07-23T20:52:08.142Z: get dotnet path failed, error: 'Error: ENOENT: no such file or directory, open '/Users/pierce/.fx/dotnet.json''
Debug 2021-07-23T20:52:08.142Z: [end] read dotnet path from '/Users/pierce/.fx/dotnet.json', dotnetPath = 'null'
Debug 2021-07-23T20:52:08.142Z: [start] check dotnet version
Debug 2021-07-23T20:52:08.142Z: [end] check dotnet version
Debug 2021-07-23T20:52:08.142Z: Running command: "dotnet --list-sdks", options = '{"cwd":"/var/folders/1c/jnqk7w1j2_bf0dfxfl5z0qkh0000gn/T","shell":false}'
Debug 2021-07-23T20:52:08.143Z: Failed to run command 'dotnet --list-sdks': cmdOutputIncludingStderr: '', error: Error: spawn dotnet ENOENT
Debug 2021-07-23T20:52:08.143Z: Failed to search dotnet sdk by dotnetPath = 'dotnet', error = 'Error: spawn dotnet ENOENT'
Debug 2021-07-23T20:52:08.143Z: [start] cleanup bin/dotnet and config
Debug 2021-07-23T20:52:08.144Z: Command finished with outputs, cmdOutputIncludingStderr: ''
Debug 2021-07-23T20:52:08.148Z: [end] cleanup bin/dotnet and config
Debug 2021-07-23T20:52:08.148Z: [start] install dotnet 3.1
Info 2021-07-23T20:52:08.148Z: Cannot find .NET Core SDK (v3.1). For the details why .NET SDK is needed, refer to https://aka.ms/teamsfx-envchecker-help#overall
Info 2021-07-23T20:52:08.148Z: Downloading and installing the portable version of .NET Core SDK (v3.1), which will be installed to /Users/pierce/.fx/bin/dotnet and will not affect your environment.
Error 2021-07-23T20:52:11.685Z: Failed to install .NET Core SDK (v3.1). Install .NET Core SDK (v3.1) manually and restart Visual Studio Code. dotnet-install command failed., command = '/Users/pierce/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-2.2.0/out/src/resource/dotnet-install.sh -InstallDir /Users/pierce/.fx/bin/dotnet -Channel 3.1', options = '{"cwd":"/Users/pierce/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-2.2.0/out/src/resource","maxBuffer":512000,"timeout":300000,"killSignal":"SIGKILL","shell":false}', error = 'Error: Command failed: /Users/pierce/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-2.2.0/out/src/resource/dotnet-install.sh -InstallDir /Users/pierce/.fx/bin/dotnet -Channel 3.1
dotnet_install: Error: Could not find `.NET Core SDK` with version = 3.1.411
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
', stdout = 'dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Downloading primary link https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.411/dotnet-sdk-3.1.411-osx-arm64.tar.gz
curl: (22) The requested URL returned error: 404 
dotnet-install: The resource at https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.411/dotnet-sdk-3.1.411-osx-arm64.tar.gz is not available.
dotnet-install: Downloading legacy link https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.411/dotnet-dev-osx-arm64.3.1.411.tar.gz
curl: (22) The requested URL returned error: 404 
dotnet-install: The resource at https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.411/dotnet-dev-osx-arm64.3.1.411.tar.gz is not available.
', stderr = 'dotnet_install: Error: Could not find `.NET Core SDK` with version = 3.1.411
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
', timecost = '3.53s'
Debug 2021-07-23T20:52:11.685Z: [start] write dotnet path to config
Debug 2021-07-23T20:52:11.687Z: [end] write dotnet path to config
Info 2021-07-23T20:52:11.687Z: Successfully installed .NET Core SDK (v3.1).
Debug 2021-07-23T20:52:11.687Z: [end] install dotnet 3.1
Debug 2021-07-23T20:52:11.687Z: [start] validate dotnet version
Debug 2021-07-23T20:52:11.689Z: Running command: "/Users/pierce/.fx/bin/dotnet/dotnet --list-sdks", options = '{"cwd":"/var/folders/1c/jnqk7w1j2_bf0dfxfl5z0qkh0000gn/T","shell":false}'
Debug 2021-07-23T20:52:11.689Z: Failed to run command '/Users/pierce/.fx/bin/dotnet/dotnet --list-sdks': cmdOutputIncludingStderr: '', error: Error: spawn /Users/pierce/.fx/bin/dotnet/dotnet ENOENT
Debug 2021-07-23T20:52:11.689Z: Failed to search dotnet sdk by dotnetPath = '/Users/pierce/.fx/bin/dotnet/dotnet', error = 'Error: spawn /Users/pierce/.fx/bin/dotnet/dotnet ENOENT'
Debug 2021-07-23T20:52:11.691Z: Command finished with outputs, cmdOutputIncludingStderr: ''
[2021-07-23T20:52:11.692Z] [Error] - Failed to install 'DotnetChecker', error = 'Error: Failed to install .NET Core SDK (v3.1). Install .NET Core SDK (v3.1) manually and restart Visual Studio Code.'
@teamsfx-triage-bot
Copy link
Collaborator

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

@pierceboggan
Copy link
Collaborator Author

Note: Restarting Visual Studio Code and trying again did not resolve the issue.

@adashen adashen added the TA:Infra Team Area: Infra label Jul 26, 2021
@a1exwang
Copy link
Contributor

a1exwang commented Jul 26, 2021

Thanks @pierceboggan for the feedback!

From your attached log (the dotnet-sdk-3.1.411-osx-arm64.tar.gz part), we are guessing that your are using an Mac with M1 chip.
Could you please confirm that?

Our toolkit depends on .NET 5 or .NET SDK 3.1. However neither .NET 5 nor .NET SDK 3.1 supports M1 Mac yet (see this github issue).

Our current design is the users will follow the "learn more" link to install .NET manually in case they work on M1, so this is the expected behavior. But we think your feedback is great and we will update our document to clarify the issue of .NET SDK on M1 Mac explicitly.

If you have any other questions, please let us know.

@viperfx
Copy link

viperfx commented Oct 18, 2021

I am blocked on this too with my m1 MacBook. Is there a way to install .NET 6.1 which has support for m1 chips and use with the msteams vscode extension?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TA:Infra Team Area: Infra
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants