2

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....

Rubén
  • 34,714
  • 9
  • 70
  • 166
Jazzy Yang
  • 87
  • 1
  • 5
  • see duplicate question (with no answer) https://stackoverflow.com/questions/62148427/appscript-webapp-hyperlink-not-working-the-frame-attempting-navigation-of-the – Kos Sep 10 '21 at 10:24
  • Probably related to [this](https://stackoverflow.com/q/68492434). In any case, can you provide a sample code to reproduce this? Also, are you using Chrome? If yes, have you tried it in other browsers? – Iamblichus Sep 10 '21 at 10:27
  • Yup. I am seeing this too. Looks like they added the `allow-top-navigation-by-user-activation` flag. :/ – IMTheNachoMan Sep 13 '21 at 18:56

1 Answers1

2

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.