Jazzy Yang
Jazzy Yang

Reputation: 77

Google Script about redirect not working and appears peculiar error, what happened

The same code, never modified. However, since September, the javascript

top.location.href='https://....'

and

window.open("https://....", "_top")

all of above are stopped working and the error

"The frame attempting navigation of the top-level window is sandboxed with the 'allow-top-navigation-by-user-activation' flag, but has no user activation (aka gesture)"

occured, what happened??

by the way, why the library of Google App Script being modified recently?? it causes me many harassment....

Upvotes: 1

Views: 2213

Answers (1)

Arthur Noort
Arthur Noort

Reputation: 175

I've been experiencing the exact same issue since a little while. I think I found a solution although it's not pretty. I now evaluate an html page where I put the redirect url I want to go to in a simple <a> tag. Then I use client side js to click that link like so document.getElementById('yourid').click();

Hope that's an agreeable workaround for you.

Upvotes: 2

Related Questions