Done
N/A
N/A
Running npm authenticate finds the npmrc file but fails to run saying TypeError: Cannot read property 'retrieveSecret' of undefined
As a note, this worked without any changes on Friday.
2018-04-02T14:00:59.7935943Z ##[debug]Evaluating condition for step: 'npm Authenticate'
2018-04-02T14:00:59.7935943Z ##[debug]Evaluating: succeeded()
2018-04-02T14:00:59.7935943Z ##[debug]Evaluating succeeded:
2018-04-02T14:00:59.7935943Z ##[debug]=> (Boolean) True
2018-04-02T14:00:59.7935943Z ##[debug]Expanded: True
2018-04-02T14:00:59.7935943Z ##[debug]Result: True
2018-04-02T14:00:59.7935943Z ##[section]Starting: npm Authenticate
2018-04-02T14:00:59.7935943Z ==============================================================================
2018-04-02T14:00:59.7935943Z Task : npm Authenticate (for task runners)
2018-04-02T14:00:59.7935943Z Description : Don't use this task if you're also using the npm task. Provides npm credentials to an .npmrc file in your repository for the scope of the build. This enables npm task runners like Gulp and Grunt to authenticate with private registries.
2018-04-02T14:00:59.7935943Z Version : 0.0.1
2018-04-02T14:00:59.7935943Z Author : Microsoft Corporation
2018-04-02T14:00:59.7935943Z Help :
2018-04-02T14:00:59.7935943Z ==============================================================================
2018-04-02T14:01:00.0436262Z ##[debug]agent.workFolder=F:agent_work
2018-04-02T14:01:00.0436262Z ##[debug]loading inputs and endpoints
2018-04-02T14:01:00.0436262Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2018-04-02T14:01:00.0436262Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2018-04-02T14:01:00.0436262Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2018-04-02T14:01:00.0436262Z ##[debug]loading INPUT_WORKINGFILE
2018-04-02T14:01:00.0436262Z ##[debug]loading SECRET_TSBLOBKEY
2018-04-02T14:01:00.0436262Z ##[debug]loaded 5
2018-04-02T14:01:00.2623836Z ##[debug]check path : F:agent_work_tasksnpmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd27880.0.1task.json
2018-04-02T14:01:00.2623836Z ##[debug]set resource file to: F:agent_work_tasksnpmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd27880.0.1task.json
2018-04-02T14:01:00.2623836Z ##[debug]system.culture=en-US
2018-04-02T14:01:00.2623836Z ##[debug]workingFile=.npmrc
2018-04-02T14:01:00.2623836Z Adding authentication to the .npmrc file at F:agent_work40s.npmrc
2018-04-02T14:01:00.2623836Z ##[debug]SAVE_NPMRC_PATH=undefined
2018-04-02T14:01:00.2623836Z ##[debug]Agent.BuildDirectory=F:agent_work40
2018-04-02T14:01:00.2623836Z ##[debug]testing directory 'F:agent_work40npmAuthenticate'
2018-04-02T14:01:00.2623836Z ##[debug]set SAVE_NPMRC_PATH=F:agent_work40npmAuthenticatezI982M
2018-04-02T14:01:00.2623836Z ##[debug]Processed: ##vso[task.setvariable variable=SAVE_NPMRC_PATH;issecret=false;]F:agent_work40npmAuthenticatezI982M
2018-04-02T14:01:00.2623836Z ##[debug]set NPM_AUTHENTICATE_TEMP_DIRECTORY=F:agent_work40npmAuthenticate
2018-04-02T14:01:00.2623836Z ##[debug]Processed: ##vso[task.setvariable variable=NPM_AUTHENTICATE_TEMP_DIRECTORY;issecret=false;]F:agent_work40npmAuthenticate
2018-04-02T14:01:00.2779842Z ##[warning]Resource file haven't set, can't find loc string for key: SavingFile
2018-04-02T14:01:00.2779842Z ##[debug]Processed: ##vso[task.issue type=warning;]Resource file haven't set, can't find loc string for key: SavingFile
2018-04-02T14:01:00.2779842Z ##[debug]SavingFile F:agent_work40s.npmrc
2018-04-02T14:01:00.2779842Z ##[debug]customEndpoint=null
2018-04-02T14:01:00.2779842Z ##[debug]Npm.PackagingCollectionUrl=undefined
2018-04-02T14:01:00.2779842Z ##[debug]System.TeamFoundationCollectionUri=https://.visualstudio.com/
2018-04-02T14:01:00.2936119Z ##[warning]Resource file haven't set, can't find loc string for key: FoundLocalRegistries
2018-04-02T14:01:00.2936119Z ##[debug]Processed: ##vso[task.issue type=warning;]Resource file haven't set, can't find loc string for key: FoundLocalRegistries
2018-04-02T14:01:00.2936119Z ##[debug]FoundLocalRegistries 1
2018-04-02T14:01:00.2936119Z ##[debug]Agent.BuildDirectory=F:agent_work40
2018-04-02T14:01:00.2936119Z ##[debug]testing directory 'F:agent_work40npm'
2018-04-02T14:01:00.2936119Z ##[debug]testing directory 'F:agent_work40'
2018-04-02T14:01:00.2936119Z ##[debug]mkdir 'F:agent_work40npm'
2018-04-02T14:01:00.2936119Z ##[debug]rm -rf F:agent_work40npm
2018-04-02T14:01:00.2936119Z ##[debug]removing directory
2018-04-02T14:01:00.2936119Z ##[debug]task result: Failed
2018-04-02T14:01:00.2936119Z ##[error]TypeError: Cannot read property 'retrieveSecret' of undefined
2018-04-02T14:01:00.2936119Z ##[debug]Processed: ##vso[task.issue type=error;]TypeError: Cannot read property 'retrieveSecret' of undefined
2018-04-02T14:01:00.2936119Z ##[debug]Processed: ##vso[task.complete result=Failed;]TypeError: Cannot read property 'retrieveSecret' of undefined
2018-04-02T14:01:00.2936119Z ##[section]Finishing: npm Authenticate
Just an update, this is no longer repro this morning.
Feel free to close and take any action if investigation is worthwhile.
Another update, we're seeing this again. So disregard my previous message.
@bryanmacfarlane it looks from this log that the state of the task lib is getting cleared out somehow.
The variable with the undefined value is the task lib's secrets vault. The string retrieveSecret does not exist within the NpmAuthenticate task (or anywhere in the vsts-tasks repo except .d.ts files for that matter)
We're seeing this on another repo as well. Same error message.
I fought with this issue quite a bit today and i think i figured out the key to reproducing this issue @jmyersmsft and @justinmwarner
If you import the vsts-task-tool-lib/tool beforevsts-task-lib/task then this error is reproduced. If i switch the order to load vsts-task-lib/task first then the error goes away.
I noticed that the vsts-task-tool-lib/tool module takes a dependency on vsts-task-lib. Since there is some global state being kept within the vsts-task-lib module (global['_vsts_task_lib_loaded']) then i suspected this may be causing the state data to not get loaded properly if another dependency invoked the module. To test this, i flipped the import order and it resolved the issue. I also tried flipping the order back and i was able to recreate the issue again.
We have the same problem on all our pipelines
Seems to be a regression, was working few days ago. Noticed it happening this morning.
Yep also happened to me. Build succeeded on 4/2 and then today it failed with no change to the repo. I was also using pip authenticate, not npm
Same here. It has been working for us, and started receiving this error this afternoon. We get the same error using TwineAuthenticate for our Python feed as well.
In my case I'm using Twine authentication for python but the issue is the same.
I tried to:
As this issue is major, it would be appreciate a faster investigation or point-out the right place to raise that.
A workaround is required ASAP, because uploading artifact is broken!
Can one of you who started seeing this recently @steevegldev @jpenniman @grantal can you give a detailed log? We'll take a prompt look.
Actually I got a repro for the Python Twine Upload Authenticate. Let me know you are hitting this with any other task.
FYI to folks. We have a fix for the above task. Will be trying to hotfix that now. Also verifying which other tasks this might be affecting. Stay tuned.
The Azure Pipeline task "Package and deploy Helm charts" [1] is also affected. It fails in the pre-job phase with TypeError: Cannot read property 'retrieveSecret' of undefined.
[1] https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/helm-deploy?view=azure-devops
I'm seeing this with "Package and deploy Helm charts" as well.
fyi TwineAuthenticate task has been hotfixed and should be GTG. @AddonContributor @32technologies Artifacts folks don't own this the "Package and deploy Helm charts" task so the cause is likely different even though symptom might be the same. I also ran a query against that task and did not see it systemically failing across scale units. But I will still share this thread with some folks who own that task and ask them to take a look.
I confirm the issue has been fixed. Thanks @tkrick
I am also seeing the issue with Helm charts. It appears to be related to having TLS enabled for communication between Helm and Tiller. If this isn't the right place to post this, can someone please point me in the right direction? This is currently block deployments for us. Thanks!
Confirming, the problem with Twine Auth has been fixed.
Same as @michaelbpalmer , all our Helm based pipelines are not working, we have TLS enabled.
This is blocking our deployments.
Update on my previous comment: I guess it has been fixed? seems to be working now
Working for me now as well.
hi @rigerosa , @michaelbpalmer. i reached out to a contact internally that works on those helm tasks. He asked that you file a new issue and put the info there. it will be more easy to route if it says helm in the title/etc. so if one of you could do that that would be great. sorry for the delay.
thanks @tkrick but the problem seems to be solved now
Yes, fixed for me as well. Thanks!
Closing this as it looks resolved :)
Most helpful comment
FYI to folks. We have a fix for the above task. Will be trying to hotfix that now. Also verifying which other tasks this might be affecting. Stay tuned.