Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
staryga opened this issue Aug 11, 2016 · 7 comments
Open

Comments

@staryga
Copy link

staryga commented Aug 11, 2016

any ideas? i followed the setup manual. thanks

@csu
Copy link

csu commented Sep 17, 2016

I'm getting this error as well.

@seanflaherty
Copy link

I'm getting this error also.

@hakanak
Copy link

hakanak commented Dec 9, 2016

I'm getting this error, please help?
thanks

@zmacks
Copy link

zmacks commented Apr 10, 2017

me 5

@phree
Copy link

phree commented Nov 6, 2017

And me as well!

@meredithkfwilliams
Copy link

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 #22 and #20 and never actually got fixed in the latter one despite being said it would be.

@meredithkfwilliams
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants