Endindex must be larger or equal to startindex

I downloaded my google doc as docx, reuploaded and then in google, clicked the “convert to google doc” button.

Now, if I open the plugin, I still have my document library on the right, all listed, great. But when I click “Update citations & bibliography”, I get “There was an error formatting your citations” with the detailed message “A Google Apps Script error occurred with message "Endindex (55) must be larger or equal to Startindex (56).”. Contact Paperpile support to resolve this issue.
One or more of these errors caused processing to not be completed."

Same behavior in another document I created at the same time and treated equally (they belong to the same batch of work).

Going from the original google doc is not an option due to reasons. I need to use the docx as a starting file. Behavior also happens after refresh, I am not in edit mode.

Welcome to our forum, @AWerner. Our Google Docs plugin and sidebar add-on and our Word plugin use different field encoding methods for citations, so Paperpile handles them differently in each editor. You can work in both, but when switching between Google Docs and Word, conversion steps are needed to make sure citations stay linked correctly.

It sounds like those steps may have been missed. Could you please try the following:

From Google Docs to Word:

  1. Save the original Google document to .docx format. In Google Docs, click File > Download > Microsoft Word (.docx).
  2. Open the document in Word.
  3. In the Paperpile tab, click Settings and Tools > Convert from > Paperpile Google Docs.

Then you can work with the document in Word (for example, add more citations). Once you are finished, you need to convert the document again to Google Docs.

From Word to Google Docs:

In the Paperpile tab in Word, click Settings and Tools > Export to Google Docs, then follow the on-screen instructions:

Once you’ve done that, open the converted Google Doc and try Update citations & bibliography again in the sidebar add-on, or use the Paperpile Chrome extension to enable the Paperpile Google Docs plugin, which automatically adds a Paperpile menu in the top ribbon where you can format citations.

If the issue still appears after these steps, let us know, and we’ll have our team investigate the specific error.

Since I am on Linux, I never opened the docx in Word. I used LibreOffice and didn’t touch the actual citations. I just inserted line numbers and removed a few comments. So the citation encoding should still be the same.
I thus suspect the error in the fact, that it is not the same file, name, and google URL anymore.

Update:
I got my hands on one of the supported Word Versions on windows and tried as suggested, even from the original, outdated, google doc file (Exporting, importing, then exporting again).

Importing in word and converting to word citations seems to work. But if I want to export to google docs again, I get “Could not convert references. They may be malformed”. Even when I take the original, working, google doc and download it as docx.
Document is not protected. Word Version: Professional Plus 2019.

Thank you for sharing the details of what you have tried @AWerner. To help our Word specialist investigate, can you share the document with us? You can send it through our in-app messenger or email us at support@paperpile.com.