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

Microsoft.VisualStudio.JavaScript.Sdk unable to authenticate to private DevOps NPM feed since 0.5.105-alpha #41017

Closed
DaleMckeown opened this issue May 20, 2024 · 2 comments
Assignees
Labels
Area-Infrastructure untriaged Request triage from a team member

Comments

@DaleMckeown
Copy link

We use Azure DevOps pipelines to deploy our code.

We have just upgraded a .esproj from VisualStudio.JavaScript.Sdk from 0.5.105-alpha to the latest version, 1.0.1013726.

<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.1013726">
  <PropertyGroup>
    <StartupCommand>npm run dev</StartupCommand>
    <ShouldRunBuildScript>false</ShouldRunBuildScript>
    <ProductionBuildCommand>npm run build</ProductionBuildCommand>
    <BuildOutputFolder>$(MSBuildProjectDirectory)\dist\pwa</BuildOutputFolder>
  </PropertyGroup>
  <ItemGroup>
    <None Include=".quasar\**\**" />
  </ItemGroup>
  <ItemGroup>
    <None Include="public\.well-known\assetlinks.json" />
  </ItemGroup>
</Project>

Our pipelines immediately fail with the following error:

  Determining projects to restore...
##[debug]Agent environment resources - Disk: / Available 20547.00 MB out of 74244.00 MB, Memory: Used 724.00 MB out of 6921.00 MB, CPU: Usage 24.77%
  Restored /home/vsts/work/1/s/GatewayApi/GatewayApi.csproj (in 515 ms).
  v18.20.2
  Restoring dependencies using 'npm'. This may take several minutes...
##[debug]Agent environment resources - Disk: / Available 20542.00 MB out of 74244.00 MB, Memory: Used 992.00 MB out of 6921.00 MB, CPU: Usage 21.92%
##[debug]Agent environment resources - Disk: / Available 20533.00 MB out of 74244.00 MB, Memory: Used 1166.00 MB out of 6921.00 MB, CPU: Usage 19.62%
  npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
##[debug]Agent environment resources - Disk: / Available 20316.00 MB out of 74244.00 MB, Memory: Used 1146.00 MB out of 6921.00 MB, CPU: Usage 17.78%
  npm ERR! code E401
  npm ERR! Unable to authenticate, your authentication token seems to be invalid.
  npm ERR! To correct this please try logging in again with:
  npm ERR!     npm login
  
  npm ERR! A complete log of this run can be found in: /home/vsts/.npm/_logs/2024-05-20T11_26_48_064Z-debug-0.log
##[debug]Processed: ##vso[task.logdetail id=79e5dc84-a774-4afd-8f3c-3d6c0a229fb7;parentid=;name=Sdk.targets;type=Build;starttime=2024-05-20T11:27:04.9650325Z;state=InProgress;]
##[error]/home/vsts/.nuget/packages/microsoft.visualstudio.javascript.sdk/1.0.586930/Sdk/Sdk.targets(246,5): Error MSB3073: The command "npm install" exited with code 1.
##[debug]Processed: ##vso[task.logissue type=Error;sourcepath=/home/vsts/.nuget/packages/microsoft.visualstudio.javascript.sdk/1.0.586930/Sdk/Sdk.targets;linenumber=246;columnnumber=5;code=MSB3073;]The command "npm install" exited with code 1.
##[debug]Processed: ##vso[task.logdetail id=79e5dc84-a774-4afd-8f3c-3d6c0a229fb7;parentid=;type=Build;result=Failed;finishtime=2024-05-20T11:27:04.9710510Z;progress=100;state=Completed;parentid=;name=;]
/home/vsts/.nuget/packages/microsoft.visualstudio.javascript.sdk/1.0.586930/Sdk/Sdk.targets(246,5): error MSB3073: The command "npm install" exited with code 1. [/home/vsts/work/1/s/GatewayUI/GatewayUI.esproj]

Build FAILED.

/home/vsts/.nuget/packages/microsoft.visualstudio.javascript.sdk/1.0.586930/Sdk/Sdk.targets(246,5): error MSB3073: The command "npm install" exited with code 1. [/home/vsts/work/1/s/GatewayUI/GatewayUI.esproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:19.66

We have a private Azure Artifatcs feed which is referenced in our project's .npmrc file.

On version 0.5.105-alpha We do not have this issue and are able to restore/build our projects properly. We rolled back to version 1.0.586930, the first 'non alpha' release and the same issue persists.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels May 20, 2024
@Forgind
Copy link
Member

Forgind commented May 28, 2024

@sheetalkamat,

This looks like an issue with the Microsoft.VisualStudio.JavaScript.Sdk, not the Microsoft.NET.Sdk, so I think it belongs here. I saw that you've committed to that repo a lot recently; is that the right place for it? Thanks!

@Forgind
Copy link
Member

Forgind commented Jun 7, 2024

@DaleMckeown, baronfel suggested filing a developer community ticket instead of posting here, as the esproj team doesn't have an OSS repo.

https://developercommunity.visualstudio.com/VisualStudio/report

@Forgind Forgind closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants