title: Google App Script delete rows not working while sheet is protected
body: <p>I am having a google apps script to clear the googlesheet empty rows, it was working previously but recently encountered issue as mentioned.</p>
  <p>error message</p>
  <blockquote>
  <p>Exception: Service Spreadsheets failed while accessing document with id XXXX.</p>
  </blockquote>