11

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.

doodeecheng5
  • 141
  • 5
  • why do u pass a parameter in your function, but you're not calling it inside? – David Salomon Mar 03 '22 at 16:40
  • 3
    There is already an active report about [Google sheets custom functions stuck in loading](https://issuetracker.google.com/issues/222342097). 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. – SputnikDrunk2 Mar 03 '22 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. – doodeecheng5 Mar 03 '22 at 18:30

1 Answers1

12

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:

TheMaster
  • 45,448
  • 6
  • 62
  • 85
SputnikDrunk2
  • 3,398
  • 1
  • 5
  • 17
  • 2
    Credit me, if I've answered or added important data. I don't think credit is necessary for "a suggestion to add a answer" – TheMaster Mar 03 '22 at 20:09
  • 1
    Besides following the listed issues it might be worthy to visit [Google Apps Script Outage log](https://developers.google.com/apps-script/guides/support/outage-log) (no recent entries yet) – Rubén Mar 03 '22 at 20:10
  • 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! – taiyodayo Mar 07 '22 at 11:19
  • This bug fix has just been [rolled out](https://issuetracker.google.com/issues/222342097). In my case, the problem is gone now. – show Mar 07 '22 at 18:04
  • @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? – Rubén Mar 08 '22 at 00:08
  • @Rubén I am using custom functions, and the problem went away around the same time the fix was rolling out. – show Mar 13 '22 at 13:56