Automattic / google-docs-add-on

Publish to WordPress from Google Docs
GNU General Public License v3.0
165 stars 21 forks source link

Authorization error when opening add-on #128

Open chad1008 opened 3 years ago

chad1008 commented 3 years ago

I'm currently getting the following error at the bottom of the pane when opening the add-on:

Error

Authorization is required to perform that action.

Please report this error

The final line is a link that actually just leads to https://wordpress.com/support/ and not to this Github repo.

I've tried removing and reinstalling the add-on and gotten the same results.

Based on the comments on the Marketplace, it doesn't look like this kind of error is universal, but it does appear to be fairly common.

chad1008 commented 3 years ago

An additional report of this same error has come in on 3909056-zen.

After troubleshooting that a bit, it looks like this is due to multiple Google sign ins on the same browser.

To reproduce:

  1. Sign into Google Chrome with Google account A (this is the account that you are NOT you're trying to connect to WordPress.com)
  2. Once Chrome is signed in, sign in to Google Docs using Google account B (this is the account that ARE trying to connect to WordPress.com)
  3. From Google Docs, as Google account B, try using the add-on on a new document. Your sites will not appear, you won't be able to add new ones, and the authorization is required error appears at the bottom of the sidebar.

I'm able to get around the error by either:

  1. Incognito window signed into Google with only account B
  2. Rather than signing into Docs with a second address in the same window, create a separate Chrome profile for Google account B. The addon-on then works.

I don't know if there's a way around this, as it sounds like it'll depend on how Chrome/Google grab the current account info from the mix of existing sign-ins. If it a single browser instance signed into multiple accounts is a no-go, can we update the error message in this case to give more detailed context?