jmspring / chaos-dingo

Monkey and Lemur are taken, so Chaos Dingo it is. A tool to mess with Azure services leveraging the Azure NodeJS sdks.
MIT License
11 stars 5 forks source link

acquireTokenWithClientCredentials is not a function #11

Open SorraTheOrc opened 8 years ago

SorraTheOrc commented 8 years ago
node ./dingo.js -t 72f988bf-86f1...d7cd011db47 -s 325e7c34-...-aa87-1df746c67705 -c 80adb42d-...f6be27b6cf8f -p Pa$$w0rd -g rgacsswarmdemo -r swarm-agent-40A8c9BA-0
  -v vm -o restart
Test defined:
    Tenant Id:      72f988bf-...-2d7cd011db47
    Subcription Id: 325e7c34-...-aa87-1df746c67705
    Client Id:      80adb42d-...-f6be27b6cf8f
    Client Secret:  supersecret

Global properties:
    Test duration:  60
    Test delay:     60
    Random Order:   false

Jobs:
    Job:
        Type:           vm
        Operation:      restart
        Resource Group: rgacsswarmdemo
        Resource:       swarm-agent-40A8c9BA-0
        Extra args:
            duration: 60
Authenticating user.
/home/rgardler/projects/chaos-dingo/dingo_job_pipeline.js:37
    context.acquireTokenWithClientCredentials(azureConstants.ARM_RESOURCE_ENDPOINT,
            ^

TypeError: context.acquireTokenWithClientCredentials is not a function
    at DingoJobPipeline.authenticate_user (/home/rgardler/projects/chaos-dingo/dingo_job_pipeline.js:37:13)
    at /home/rgardler/projects/chaos-dingo/dingo_job_pipeline.js:155:18
    at /home/rgardler/projects/chaos-dingo/node_modules/async/lib/async.js:718:13
    at iterate (/home/rgardler/projects/chaos-dingo/node_modules/async/lib/async.js:262:13)
    at async.forEachOfSeries.async.eachOfSeries (/home/rgardler/projects/chaos-dingo/node_modules/async/lib/async.js:281:9)
    at _parallel (/home/rgardler/projects/chaos-dingo/node_modules/async/lib/async.js:717:9)
    at Object.async.series (/home/rgardler/projects/chaos-dingo/node_modules/async/lib/async.js:739:9)
    at DingoJobPipeline.go (/home/rgardler/projects/chaos-dingo/dingo_job_pipeline.js:177:11)
    at Function.DingoTest.processJob (/home/rgardler/projects/chaos-dingo/dingo_test.js:191:14)
    at DingoTest.go (/home/rgardler/projects/chaos-dingo/dingo_test.js:241:15)
jmspring commented 8 years ago

context comes from AuthenticationContext in the 'adel-node' module. And context.acquireTokenWithClientCredentials is a function there in.

What version of node are you using? And if you look the top of node_modules/adal-node/package.json, you should see something like this:

"_args": [ [ "adal-node@>= 0.1.17", "/home/jims/src/github/chaos-dingo" ] ],

I'm curios what version of adal-node got grabbed.

SorraTheOrc commented 8 years ago
$ node --version
v4.2.4

I don't see anything like the text above in node_modules/adal-node/package.json. I do see "version": "2.0.0-pre",

jmspring commented 8 years ago

Interesting, ok. I should probably tighten down versions. Thanks.

jmspring commented 8 years ago

Ok, I don't see 2.0.0-pre in anything. Can you tar your directory up and send it to me?