renanlecaro / mermaid-gdocs

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

Script Authorization Error when using a non-default google account #33

Closed lucio-CA closed 1 year ago

lucio-CA commented 1 year ago

When I try inserting a new diagram, I get the following error:

ScriptError: Authorization is required to perform that action.

image

lucio-CA commented 1 year ago

FYI, this is a Google Workplace account, but Workspace Admin page has allowed users to install 3rd party Add-Ons, so I don't know why its not working.

lucio-CA commented 1 year ago

I've verified that I can install/run this under a regular Google account. The problem is running this under a Google Workspace account.

renanlecaro commented 1 year ago

I just realized that I have a corporate google account, which lets me reproduce the error, great ! I'll try to investigate further image

renanlecaro commented 1 year ago

The problem only arises when the user is logged in to two accounts, and is not using the default one. Asking google for what's selected in the document targets the default user and fails. The only workaround is to use a private nav with your work account. On my side, i'll add an errror message telling users what's up.

This is related to this bug https://issuetracker.google.com/issues/201559231?pli=1

renanlecaro commented 1 year ago

I'd suggest using a different browser for work, and log in first with your work account there.

lucio-CA commented 1 year ago

The only workaround is to use a private nav with your work account

Not sure what that means.

Looking at the bug, workarounds that come to mind:

On Mon, Jun 12, 2023 at 11:20 PM Renan LE CARO @.***> wrote:

The problem only arises when the user is logged in to two accounts, and is not using the default one. Asking google for what's selected in the document targets the default user and fails. The only workaround is to use a private nav with your work account. On my side, i'll add an errror message telling users what's up.

This is related to this bug https://issuetracker.google.com/issues/201559231?pli=1

— Reply to this email directly, view it on GitHub https://github.com/renanlecaro/mermaid-gdocs/issues/33#issuecomment-1588618794, or unsubscribe https://github.com/notifications/unsubscribe-auth/BABY2YMAS4TVLOB4TW7CLIDXLABDXANCNFSM6AAAAAAYMPEANQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Lucio Flores CleverAlpha

renanlecaro commented 11 months ago

Private nav = private navigation = incognito window