0

I am developing an unpacked local chrome extension with manifest version 2 that uses the chrome.identity API which currently works on my main Chrome Profile, and I'd also like to install it on my second Chrome Profile.

However, i am getting this error only on the Second Profile: Unchecked runtime.lastError: OAuth2 request failed: Service responded with error: 'internal server error, which normally means that the 'key' field in manifest.json is not set correctly (thrown by chrome.identity API). The thing is, i've followed the exact same steps on this secondary profile as I did on my main profile, but it only gives the error on the secondary profile:

  • Dragged the .crx file over to the chrome://extensions page.
  • Typed chrome://version in the search bar and navigated to the "Profile Path" listed there.
  • Copied the "key" field in manifest.json
  • Removed the extension installed from the .crx
  • Pasted the "key" into my extension folder
  • Selected "Load Unpacked".

What I've also tried:

  • this answer and this answer, but it didn't solve my problem.
  • Removing the existing extension from the main profile before installing it on the new one, but that didn't work either.

Additional info:

  • When loading the extensions, their extension IDs are the same, which I believe is expected since they come from the same .crx file.
  • Both keys are also the same, which I'm not sure is expected behavior since each profile has its own path where the extension folder shows up when I install the .crx file. (maybe having two extensions with the same key is giving some kind of conflict even though they are on different profiles?)
  • I am using Ubuntu 18.04 with Chrome Version 91.0.4472.114 (Official Build) (64-bit)
Lucas Mendonca
  • 387
  • 3
  • 13
  • If the id is identical to the extension in the first profile then you must have a `pem` file in the same directory when you create crx so just move it elsewhere. – wOxxOm Jul 09 '21 at 09:02

1 Answers1

0

I figured out what was the issue: the new profile wasn't registered as a trusted tester on Google Cloud.

Steps to fix:

  1. Go to Google Cloud OAuth consent screen.
  2. In "Test Users" section, add the e-mail for the new Chrome Profile.
Lucas Mendonca
  • 387
  • 3
  • 13