Fitbit-for-Google-App-Script icon indicating copy to clipboard operation
Fitbit-for-Google-App-Script copied to clipboard

TypeError: Cannot find function setProjectKey in object [object Object].

Open staryga opened this issue 8 years ago • 7 comments

any ideas? i followed the setup manual. thanks

staryga avatar Aug 11 '16 20:08 staryga

I'm getting this error as well.

csu avatar Sep 17 '16 09:09 csu

I'm getting this error also.

seanflaherty avatar Dec 03 '16 14:12 seanflaherty

I'm getting this error, please help? thanks

hakanak avatar Dec 09 '16 09:12 hakanak

me 5

zmacks avatar Apr 10 '17 21:04 zmacks

And me as well!

phree avatar Nov 06 '17 01:11 phree

I had this problem, too. I solved it by reverting the OAuth library to v19. So, when you're in the Script Editor, go to Resources > Libraries, then toggle the version to whatever the current one is to 19.

There's stuff added to the newer OAuth libraries that seems to break the flow. For example, in version 20, they OAuth uses script key instead of project ID, which is a different value. (Not sure if that's what's actually breaking it in this case, since I didn't troubleshoot it closely enough, but it would cause problems nonetheless!)

Annnnnnnd.... once you clear that error, you're going to run into scope problems. To head that off, find the line that says:

.setScope('activity')

and change it to

.setScope('activity nutrition sleep weight profile settings')

The scope issue is referenced in https://github.com/loghound/Fitbit-for-Google-App-Script/issues/22 and https://github.com/loghound/Fitbit-for-Google-App-Script/issues/20 and never actually got fixed in the latter one despite being said it would be.

meredithkfwilliams avatar Dec 04 '17 07:12 meredithkfwilliams

Check out: https://github.com/meredithkfwilliams/GoogleSheetsFitBitData

meredithkfwilliams avatar Dec 04 '17 08:12 meredithkfwilliams