title: Can not run trivial app script bound to new blank document - get "This app is blocked"
body: <p>I am unable to run any app script in my google account - even one created by me bound to a new document created by me. When I do, I get an &quot;This App is Blocked&quot; error. Note that this is different from the the &quot;Sign in temporarily disabled for this app&quot; failure mode mentioned <a href="https://stackoverflow.com/questions/59070450/sign-in-with-google-temporarily-disabled-for-this-app-error-when-trying-to-aut">elsewhere</a>, and the solution for that problem has no effect on this one.</p>
  <p>To test, I created a new spreadsheet while logged into my personal google account and put the value <code>ONE</code> in cell <code>A1</code>...</p>
  <p><a href="https://i.stack.imgur.com/vEtSW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vEtSW.png" alt="enter image description here" /></a></p>
  <p>I then opened the <code>Tools-&gt;Script</code> editor from the menu bar of this spreadsheet and entered the following trivial script...</p>
  <p><a href="https://i.stack.imgur.com/Q4h4a.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Q4h4a.png" alt="enter image description here" /></a></p>
  <p>I then click on the run icon from the script editor menu bar with the function &quot;myFunction&quot; selected from the pulldown.</p>
  <p>I get an &quot;authorization required&quot; popup and so I click &quot;Review Permissions&quot;...</p>
  <p><a href="https://i.stack.imgur.com/VESFR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VESFR.png" alt="enter image description here" /></a></p>
  <p>I then get a &quot;Choose an account&quot; popup and click on my account (the only logged in account, and the same account I was logged into when I created the sheet and the script)...</p>
  <p><a href="https://i.stack.imgur.com/qW7z0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qW7z0.png" alt="enter image description here" /></a></p>
  <p>I then get an &quot;App Blocked&quot; popup. Checking the execution log shows that the script did not run.</p>
  <p><a href="https://i.stack.imgur.com/wejKI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wejKI.png" alt="enter image description here" /></a></p>
  <p>What is causing this popup and how can I prevent this so I can run app scripts?</p>
  <p>NOTE: I see many other questions describing more complicated versions of this issue but none have useful answers. I am hoping this ultra simple version of the issue will help narrow it down and get a resolution.</p>
  <p><strong>More unexpected behavior:</strong></p>
  <p>If I put the code into the <code>onLoad()</code> function it works fine and never even asks me for authorization.</p>
  <p>If I enter this code:
  <a href="https://i.stack.imgur.com/AREm2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/AREm2.png" alt="enter image description here" /></a></p>
  <p>...and then quit out and reload the sheet, then I get this in the execution logs...
  <a href="https://i.stack.imgur.com/hMCLL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hMCLL.png" alt="enter image description here" /></a></p>
  <p>Again, this is with no authorization popups at all. The sheet loads without interruption and then the entry is in the execution logs. So this would seem to not be a case of not having the right permissions somewhere since code clearly <em>can</em> access the sheet.</p>
  <h3>Legacy editor</h3>
  <p>Identical behavior under the legacy editor...</p>
  <p><a href="https://i.stack.imgur.com/NrZAK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NrZAK.png" alt="enter image description here" /></a></p>
  <h3>Other accounts</h3>
  <p>I can repeat these exact same steps on a different google account and it works fine, so this problem appears to be linked to my account. Many others on the internet have noted the same finding. Seems like there might be some hidden (probably unintional) setting attached to the account that gets switched somehow and then thereafter the account is not able to manually authorize scripts to run.</p>
  <h3>Changing Project</h3>
  <p>I check and this script is in the &quot;Default&quot; project as expected...</p>
  <p><a href="https://i.stack.imgur.com/YmWoS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YmWoS.png" alt="enter image description here" /></a></p>
  <p>According to this <a href="https://developers.google.com/apps-script/guides/cloud-platform-projects#default_cloud_platform_projects:%7E:text=For%20most%20applications%20and%20scripts%2C%20you%20never%20need%20to%20see%20or%20adjust%20this%20default%20GCP%20project" rel="noreferrer">page</a>,</p>
  <blockquote>
  <p>For most applications and scripts, you never need to see or adjust this default GCP project—Apps Script handles all the necessary interactions with the Google Cloud Platform automatically.</p>
  </blockquote>
  <p>Since I have nothing to lose, tried creating a new project in the Google Cloud Platform console, and then tried assigning this script to that new project. Unfortunately when I tried, I got the normal &quot;Authorization needed&quot; popup which lead to this opdd page...</p>
  <p><a href="https://i.stack.imgur.com/MQJNo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MQJNo.png" alt="enter image description here" /></a></p>
  <p>Clicking on the &quot;Troubleshoot this problem&quot; link takes me to this page...</p>
  <p><a href="https://i.stack.imgur.com/gEk9g.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gEk9g.png" alt="enter image description here" /></a></p>
  <p>...which seems to say that I do not have the permissions to troubleshoot problems on my own account.</p>
  <p>This again seems to suggest there is something misconfigured about my account on google servers. :/</p>