Azure-sdk-for-js: @azure/[email protected]

Created on 18 Sep 2020  路  11Comments  路  Source: Azure/azure-sdk-for-js

  • Package Name: @azure/identity
  • Package Version: 1.1.0
  • Operating system: Github Actions ubuntu-latest
  • [x] nodejs

    • version: 12.18.2

  • [ ] browser

    • name/version:

  • [ ] typescript

    • version:

  • Is the bug related to documentation in

Describe the bug
When attempting to deploy Azure Static Web App (specifically the embedded Api) within the Github Action ecosystem the following build step error is thrown

prebuild-install WARN install libsecret-1.so.0: cannot open shared object file: No such file or directory
Package libsecret-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsecret-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsecret-1' found
gyp: Call to 'pkg-config --libs-only-l libsecret-1' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/tmp/oryx/platforms/nodejs/12.18.3/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.0-1025-azure
gyp ERR! command "/tmp/oryx/platforms/nodejs/12.18.3/bin/node" "/tmp/oryx/platforms/nodejs/12.18.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /github/workspace/whitewaterfinder.pwa/waterfinder.api/.oryx_prod_node_modules/node_modules/keytar
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN embedded-api-paddle-fin@ No description
npm WARN embedded-api-paddle-fin@ No repository field.
added 51 packages from 142 contributors and audited 175 packages in 4.786s
npm WARN embedded-api-paddle-fin@ No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/keytar):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `prebuild-install || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

To Reproduce
Steps to reproduce the behavior:

  1. Create an Azure Single Page Application
  2. Add @azure/keyvault-secrets and @azure/identity to your package.json
  3. Deploy

Expected behavior
The build to succeed

Screenshots

Additional context
repository is badgerowluke/whitewaterfinder
Azure SWA in question is ./whitewaterfinder.pwa
Github Actions currently is .github/workflows/azure-static-web-apps-calm-glacier0c95f3710.yml
specific package.json in question is ./whitewaterfinder.pwa/waterfinder.api

Azure.Identity Client customer-reported needs-team-attention question

Most helpful comment

yeah. go ahead and close it. I'm good with keeping eyes on with #11374

All 11 comments

@badgerowluke hello, Mr Badgerow

I'm Daniel. I'll be doing my best to help you.

Do you mind installing the package pkg-config? I believe this could be the solution.

I believe it should be possible to add this step to your workflow. In one of the jobs, something like sudo apt install -y pkg-config.

Please report back when you can.
Thank you for submitting this issue!

Something to point out is that NPM is only showing warnings at the end. Are you able to reproduce this locally?

I'll throw the pkg-config on as soon as I can get a few minutes @sadasant, I was expecting that was going to be part of the solution but didn't get to my workstation over the weekend. I haven't been able to repro the same conditions locally as I'm building directly on a mac and haven't done the bootcamp/dockerizing/other steps necessary to produce a clean linux environment to build through.

The only other question I've got here, which is probably a question for the SWA team is that the specifics of the Actions content is derived by spinning up a new SWA from the Azure portal. I've reversed to get myself an ARM template for that, but from "cold-start" (nothing in my resource group) I do not have the contents of the Action under my control -- The Portal gets authority to make that commit, because of the naming conventions of the SWA -- So when I burn down the RG I'm always going to have a failed deployment when I rebuild.

@badgerowluke While we're studying this, even though we've experienced similar issues, we haven't been able to conclude that the error you're seeing is the source of the build failure. Even though it does produce an error, at the end NPM just skips the dependency entirely, see these lines:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/keytar):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `prebuild-install || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

We have made an issue to make this clearer: https://github.com/Azure/azure-sdk-for-js/issues/11374 (if you decide to read it, please read the comments too).

This is an unsatisfactory response, but at this point we need a clearer set of steps to reproduce this.

If it helps, it could be that there's something else breaking the build. I really can't say with the information I have so far.

@badgerowluke I'm also taking a note on Azure actions. That's a scenario we haven't explored in depth. I'll try to budget some time to write a sample project similar to what you're describing.

I'd love to help out with that, time budgeting permitting.

It might take me about a month to start this, so keep that in mind. If I happen to be able to schedule it, I will write you back for sure!

sounds great. The specifics here aren't blocking.

@badgerowluke In the mean time, is the problem that the build is currently broken or breaking for this specific issue? or is it that the warnings make it look like it's breaking for that reason?

@badgerowluke since we're improving this through this issue: https://github.com/Azure/azure-sdk-for-js/issues/11374

How are you feeling regarding this specific issue (11333)? Should we close it for now? Is there anything else we could do to help?

yeah. go ahead and close it. I'm good with keeping eyes on with #11374

Was this page helpful?
0 / 5 - 0 ratings