Apps-Script-GSApp-Library icon indicating copy to clipboard operation
Apps-Script-GSApp-Library copied to clipboard

App Script Runtime V8 causing new errors

Open tourBermuda opened this issue 4 years ago • 3 comments

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?

tourBermuda avatar Mar 25 '20 17:03 tourBermuda

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.

tourBermuda avatar Mar 25 '20 18:03 tourBermuda

Same here using https://github.com/Spencer-Easton/Apps-Script-Gmail-Push-Notifications-v2 Did you manage to fix it?

ElusiveByte avatar Jan 20 '21 23:01 ElusiveByte

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

ElusiveByte avatar Jan 21 '21 00:01 ElusiveByte