1

I have a google apps script bounded to a spreadsheet, and I created a html form to upload csv and excel files to process them and load the data to the spreadsheet. Everything worked fine in the last 2 years, but since March 2020 the file uploading fails.

When I submit the upload form, I got the following message:

We're sorry, a server error occurred. Please wait a bit and try again.

I checked and the the server-side function is not even called. If I remove the file input field from the form, then everything works fine. I mean the server-side function is called, but of course it hasn't got the file blob...

I didn't modified the script in the last half year, so I thought something changed in the google.script.run function, but I haven't found anything about that.

I also thought that maybe the file has problems, so I tried other files, which I already uploaded, but I got the same error.

Here is my form:

 <form id="uploadForm" onsubmit="uploadCsvClient(this)">
     <input name="fileToUpload" type="file"/>
     <input type="submit" value="Upload"/>
 </form>

The client side script:

function uploadCsvClient(formObject) {        
           google.script.run.withSuccessHandler(uploadSuccess)
                    .withFailureHandler(onFailure)
                    .uploadCsv(formObject);
      }

Do you know about that something is changed in GAS? What could be the problem? I'm totally lost, so I would really appreciate any help...

1 Answer 1

1

Meanwhile I found that this is a bug related to the new V8 runtime (https://issuetracker.google.com/issues/149980602)

Maybe I accidentally enabled the new V8 runtime.. (or they automatically enabled it)

So the solution is (until they fix the bug) to disable the V8 runtime or here is a workaround in Tanaike's answer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.