v8 and ScriptApp.getService().getUrl();

275 views
Skip to first unread message

JohnL

unread,
Feb 16, 2020, 6:49:57 AM2/16/20
to Google Apps Script Community
Hi All,

I have tried out the v8 runtime and the issue I have come up with is generating my page URLs

Under Rhino, i simply used  var url = ScriptApp.getService().getUrl(); and it always worked.

However, when using v8 it has an issue with resolving which account is being used.

I have multiple google accounts and they are being used at the same time in my browser - I have done this for years without issue.

However, the v8 runtime  ScriptApp.getService().getUrl(); now generates a URL which has a different account in the output.

I load a page which has this:

I then use ScriptApp.getService().getUrl(); to generate a link to another page in my webapp

Upon clicking the link, it tries to go to this page:


(xyz being the long string of letters)

And this of course does not exist as my project is not part of this other domain.....

Any ideas of how to resolve this?!

Cheers

John

Alan Wells

unread,
Feb 16, 2020, 8:40:00 AM2/16/20
to Google Apps Script Community
My guess is that this is a bug that you aren't going to resolve or find a "work around" for.  Unless you want to tell users to never log into multiple accounts when using your web app.  I'd probably revert back to Rhino.
You can create a new issue on the Issue Tracker.

JohnL

unread,
Feb 16, 2020, 7:44:15 PM2/16/20
to Google Apps Script Community
I would agree!  I have submitted a bug so thanks for that

HADDAD Mohamed

unread,
Mar 6, 2020, 1:29:17 PM3/6/20
to Google Apps Script Community
I have this problem too and I did not find a solution,
the only way I found i using the Method: projects.deployments.list, and I did not know how impliment it into my javascript code.
Does any body know how to?

Reply all
Reply to author
Forward
0 new messages