Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Google-Fit connector object not defined #289

Open
thompsonson opened this issue Jan 18, 2020 · 2 comments · May be fixed by #294
Open

Google-Fit connector object not defined #289

thompsonson opened this issue Jan 18, 2020 · 2 comments · May be fixed by #294

Comments

@thompsonson
Copy link

I have followed the instruction here: https://github.com/googledatastudio/community-connectors/blob/master/deploy.md

When I connect\run the App Script I get an error. This is what the StackDriver logs are saying.

Jan 18, 2020, 10:40:22 AM Error ReferenceError: "connector" is not defined.
at getAuthType(main.js:27)

I'm OKish with JavaScript and it looks like the connector object is not defined..... :-p

Running through the code here https://github.com/googledatastudio/community-connectors/tree/master/google-fit/src I don't actually see it being declared anywhere. Should be be creating the object from the name of the file or something else occurring?

Thanks in advance,
Matt

@skimdankish
Copy link

I actually had to roll it back to the previous commit:
https://github.com/googledatastudio/community-connectors/tree/c33387edd5e1ce262bfdef413ab2c5ec5646b1af/google-fit/src

I used these files and worked like a charm, I was even able to add others such as calories, heart & active minutes to my script.

It looks like the most recent commit either broke it, or requires more finesse that provided in the README.

@falcaopetri
Copy link

I got the same error, but looking through the diffs I realized that the connector's functions have been factored out to the global scope. This means that we do not need main.js' functions anymore.

For example, check out the getSchema definition here: 460965a#diff-c78a44a34e314eeb97ef993b080f3935L379.

Actually, it seems we do not need main.js anymore.

Nonetheless, after succesfully connecting, I got stuck on issue #266 .

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

Successfully merging a pull request may close this issue.

3 participants