axemclion / grunt-saucelabs

Grunt task for running all your browser tests using Sauce Labs
MIT License
182 stars 98 forks source link

[ERROR] this.key is not a function #215

Open jnrepo opened 8 years ago

jnrepo commented 8 years ago
>> TypeError: this.key is not a function
>>     at Job.start (/Users/joonheo/projects/studio/node_modules/grunt-saucelabs/src/Job.js:69:43)
>>     at getResult (/Users/joonheo/projects/studio/node_modules/grunt-saucelabs/src/TestRunner.js:113:10)
>>     at _combinedTickCallback (internal/process/next_tick.js:67:7)
>>     at process._tickCallback (internal/process/next_tick.js:98:9)
>> From previous event:
>>     at TestRunner.runTest (/Users/joonheo/projects/studio/node_modules/grunt-saucelabs/src/TestRunner.js:170:8)
>>     at runJob (/Users/joonheo/projects/studio/node_modules/grunt-saucelabs/src/utils.js:51:31)
>> From previous event:
>>     at /Users/joonheo/projects/studio/node_modules/grunt-saucelabs/src/utils.js:55:10
>>     at /Users/joonheo/projects/studio/node_modules/grunt-saucelabs/src/TestRunner.js:76:18
>>     at Array.map (native)
>>     at .<anonymous> (/Users/joonheo/projects/studio/node_modules/grunt-saucelabs/src/TestRunner.js:75:30)
>>     at Array.map (native)
>>     at TestRunner.runTests (/Users/joonheo/projects/studio/node_modules/grunt-saucelabs/src/TestRunner.js:74:8)
>>     at /Users/joonheo/projects/studio/node_modules/grunt-saucelabs/tasks/saucelabs.js:131:27

so I started to get an error that looks like this. I found out that if you change these two lines, it'll fix the issue. However, I'm not sure if this is the correct way to do this

line 1 https://github.com/axemclion/grunt-saucelabs/blob/master/src/Job.js#L68

line 2 https://github.com/axemclion/grunt-saucelabs/blob/master/src/Job.js#L144

emmettbutler commented 8 years ago

I ran into this as well, looks like it originates from the fix to #203.

unindented commented 8 years ago

Encountered this same thing. I solved it by turning my key option from a string to a function that returns that same string.

lotrgollum commented 8 years ago

I turned my key option into a function as well. Hopefully this gets fixed soon or they update the documentation.

evilaliv3 commented 6 years ago

This is still an issue in 9.0.0.

Is there any plan to fix this @axemclion?

axemclion commented 6 years ago

@evilaliv3 I am not maintaining the project anymore - @Jonahss was. If you have a PR that works, I would be glad to merge that in !!