Apps-Script-GSApp-Library
Apps-Script-GSApp-Library copied to clipboard
App Script Runtime V8 causing new errors
Hi I've been using GSApp to connect to google firebase from Google App Script. I recently started getting error: The Scopes must be in a valid array (line 29, file "Code")
I have been using this for the last three years: serverToken = new GSApp.init(key, ['https://www.googleapis.com/auth/firebase.database', 'https://www.googleapis.com/auth/userinfo.email'], clientEmail);
Could the error; "The Scopes must be in a valid array (line 29, file "Code")" be coming from the way I have written it or could it be that the GSApp is no longer compatitle with the new App Script update?
So when I switch back to the old runtime, I seem to be still getting this error: The Scopes must be in a valid array at saService_(Code:29:5) at init(Code:9:10)
It's strange because I have not changed the code for several months.
Same here using https://github.com/Spencer-Easton/Apps-Script-Gmail-Push-Notifications-v2 Did you manage to fix it?
Actually, nevermind. I just found a workaround.
-
Create a new file in the App Script editor and paste the original content from the repo
-
Fix any "GSApp.init(...)" references (just call it ---> "init(...)")
-
And continue developing whatever you need