"Cannot read property "getNumChildren" from null." when formatting citations


I get the following error when trying to format the citations in one of my Google Docs. I haven’t broken any citation link, this problem literally appeared from one day to the next. Just to make sure, I removed and added all citations again - no change.
Has anyone encountered this problem before ?

A Google Apps Script error occurred with message “Cannot read property “getNumChildren” from null.”. Contact Paperpile support to resolve this issue.

One or more of these errors caused processing to not be completed."""

Thanks for the details, @Valentin_Simon. Even though you haven’t broken any citation links, this rare error is usually caused by an in-text citation which must be located and removed from the text.

If you remember which citation or section of the document started giving the error, you can start there. Otherwise, you can locate it by removing most of your paper and formatting. If formatting succeeds, re-add sections gradually until you get the error again. Once the citation has been located, remove it from the document and then click the top menu option Paperpile > View all references to also remove the reference from the page that opens. In most cases, you can re-insert the citation as normal. If it breaks again upon re-inserting it, please let us know.

We suggest using our optional sidebar add-on for the formatting attempts as Google can sometimes block formatting through our extension if it is repeatedly run within a short span of time. You can get the sidebar here.

Hello Vicente, thank you very much for the quick support. You must be right on the cause of the problem. As mentioned above, I removed and re-inserted all citations in my document yesterday, to no avail. However, after simply making a copy of the document and restarting the Paperpile add-on, I was able to format the citations without error. Maybe something had been corrupted in the original document ?
In any case, problem solved, thank you ! I will keep the solution you propose in mind.
By the way, I am using the sidebar add-on.

Have a good day

OK, here is the source of the problem: I added a citation as suggested text, and that does not work. Apologies for not remarking this before.

Thank you for the follow up and details, @Valentin_Simon. Glad you were able to sort it out on your end. Indeed, inserting citation as suggested text has caused this and other unexpected issues in the past.

I’m also encountering this issue. Is there a way to troubleshoot this issue without going through each citation? I’m working on a project that will have 100s of citations, so as I add all of them in, this procedure might not be feasible.

I tried checking the version history to see if the addition of a citation might have caused the issue, but version history is tracking the formatting of all citations so far.


@johanm if none of the last few inserted citations is the culprit, the most effective way to troubleshoot this is by gradually removing chunks of text rather than individual citations. I know this can be tedious but this error is quite rare and not known to re-incide once solved. Please feel free to reach out again if you find that it does, or with any other questions you might have.

Thanks @vicente – we corresponded a bit via email, but for the record, in case others are reading, removing chunks of text hasn’t worked either. The best workaround I can identify thus far is simply to duplicate the document.

@johanm thanks for sharing this solution. As I mentioned via chat, please feel free to share the document with us privately so the team can have a go at identifying the source of the issue.