renanlecaro / mermaid-gdocs

Mermaidsjs wrapper for gdocs.
https://mermaid-gdocs.lecaro.me/
95 stars 16 forks source link

Can't edit or create new images using Chrome on Windows 10 #31

Closed mooreds closed 1 year ago

mooreds commented 1 year ago

I have an existing document with some diagrams (all sequence diagrams). They render fine.

However, when I try to create a new diagram or update an existing one, there's an issue. When updating, I'm able to make a change to the diagram via Edit selected chart and have it reflected, but when I click Update, I see this error message:

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

I see a similar error message when creating a new diagram and clicking Insert with the default graph diagram code. I saw this error message yesterday and this morning.

I've tried:

When looking at the error console, I don't see anything obvious, but there is a warning message when I first start up the extension: There was an error during the transport or processing of this request. Error code = 404, Path = /wardeninit

When clicking save, I see:

graph LR
  A -->B data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOQAAABiCAYAAABAvn9IAAAAAXNSR0IArs4c6QAACaZJREFUeF7tnXtsFEUcx7/HlZ6gvKMRbGhKxEAggKUgMfjioRKUACIBiVGrf1AoCC3xUfvioVUElEdKSCwiRlQiEvxD4zMkNgSVIBpDFNEKNCCiaBRoWq6cmbXX7J13dm/md3vb9bv/EGB+M7/5zH5ud2dm7wLgQQIk4BkCAc9kwkRIgARAIXkSkICHCFBIDw0GUyEBCslzgAQ8RIBCemgwmAoJUEieAyTgIQIU0kODwVRIgELyHCABDxGgkB4aDKZCAhSS5wAJeIgAhfTQYDAVEqCQPAdIwEMEKKSHBoOpkACF5DlAAh4ioC1kbdGxPq2hlv0e6ot+KgF8tOiFwQv1K2CkBIGNS74/DCAoUVcm6wg2Z49bsDn3d50cTIU8q9Oo52ICqKWQmR+VNiGHZj4TswyCzdl9MyZkqFsQkwtzzHqQoejTDU344t1fAAqZoRGIbTYq5NSiXAS6eCKllJL4cGsjmptakXEhZ5bmpZS4VwofPfgnhfTKYACwC9mzX1cPZeYslbfXNlBIZ6gSl6KQJvTkYymkulnTPNomdc6qW1ZeITUhMiyGAIWkkLxl9dCHAoWkkBSSQooR4DO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I5CUkgK6YJoTpugkBSSQjq1xYVyFJJCUkgXRHPaBIWkkBTSqS0ulKOQFJJCuiCa0yYoJIWkkE5tcaEchaSQFNIF0Zw2QSEpJIV0aosL5SgkhaSQLojmtAkKSSEppFNbXChHISkkhXRBNKdNUEgKSSGd2uJCOQpJISmkC6I5bYJCUkgK6dQWF8pRSApJIV0QzWkTFFJIyMmFOU6Ze6rc6YYmCumhEbELKfBzja737MOtjWhuakWwObvvgs25v+sk4PjXbeMrj35jgE6jnosJoHbRC4MXei6v/1lCUSE7e7czKeT+zg7Pyj+Ajyhk5keyTchg5jMxyyDYnD3O9SukWcqMJgESSERA+5aVOEmABOQJUEh5pqyRBLQJUEhtdAwkAXkCFFKeKWskAW0CFFIbHQNJQJ4AhZRnyhpJQJsAhdRGx0ASkCdAIeWZskYS0CZAIbXRMZAE5AlQSHmmrJEEtAlQSG10DCQBeQIUUp4payQBbQIUUhsdA0lAngCFlGfKGklAm8Df9ItC6pIorMkAAAAASUVORK5CYII=
2382548268-warden_bin_i18n_warden.js:107 Net state changed from IDLE to BUSY
2382548268-warden_bin_i18n_warden.js:107 Net state changed from BUSY to IDLE

but no other errors.

I'm using Version 112.0.5615.138 (Official Build) (64-bit) on Windows 10. I tested on Version 112.0.5615.137 (Official Build) (x86_64) on macos (intel) and it works, weirdly enough.

mooreds commented 1 year ago

Hmmm. I tried it in another browser (MS Edge, Version 112.0.1722.64 (Official build) (64-bit)) and it failed with

ScriptError: Authorization is required to perform that action.

But then I removed all my google accounts on Edge (had 2) and then signed in again with only one account and it worked. Chrome had multiple accounts too (both today when it failed and a few weeks ago when the diagramming plugin worked). The Macos chrome browser had only one account set up when I tested it.

So perhaps the issue is when a user has multiple Google accounts?

renanlecaro commented 1 year ago

@mooreds it seems like this is the issue indeed, a problem with the google docs API with multiple users logged in : https://stackoverflow.com/questions/71982714/exception-action-not-allowed-when-using-documentapp-getactivedocument

mooreds commented 1 year ago

For future readers of this issue, this is a bug in Google Docs from 2017, not sure it will ever be fixed: https://issuetracker.google.com/issues/69270374?pli=1