13

I have a Google Apps Script custom function, very simple:

function sharesBurned(sharesToSell) {     
  return "tree"
}

Obviously, this works when I test it in Apps Script. In my sheet, when I call it in a cell, sharesBurned(2), for instance, it sometimes returns "Loading", and in the upper right hand corner of the cell, a red triangular sign appears that, when hovered over, reads: "Error - Loading data...".

I know there have been several threads on this, but they are pretty old, and I've tried all the suggestions already to no avail, namely:

  • Changing the function name
  • Refreshing the spreadsheet
  • Toggling Parameter Cell
  • Duplicating the spreadsheet
  • Clearing Browser cache / cookies

To be clear, the function loads in the cell seamlessly half the time and the other half is stuck like this. I highly doubt it's an issue with the script itself so this is likely some weird bug (caching? no clue) with Google Sheets.

3
  • why do u pass a parameter in your function, but you're not calling it inside? Commented Mar 3, 2022 at 16:40
  • 3
    There is already an active report about Google sheets custom functions stuck in loading. You may want to click the star icon on the top left of the issue report to indicate that you are also being affected by the issue. Commented Mar 3, 2022 at 16:49
  • @DavidSalomon The function is meaningless; I had a more complex function at first but changed to a super simple one to see if the issue persisted (and to confirm it wasn't an issue with my function. Commented Mar 3, 2022 at 18:30

1 Answer 1

15

This seems to be a issue on Google's server. There is already an active report about Google sheets custom functions stuck in loading. You may want to click the star icon on the top left of the issue report to indicate that you are also being affected by the issue.

Other related issues:

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

6 Comments

Credit me, if I've answered or added important data. I don't think credit is necessary for "a suggestion to add a answer"
Besides following the listed issues it might be worthy to visit Google Apps Script Outage log (no recent entries yet)
Great to know that I'm not alone on this one. Hope Google address this issue soon. Our workflow is quite severely affected by this. Hope more people star this issue!
This bug fix has just been rolled out. In my case, the problem is gone now.
@show The fix is for built-in functions (i.e. IMPORTXML, IMPORTHTML, ...) Do you have the Loading problem with custom functions or with built-in functions?
|

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.