Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google API Keys Missing Warning Message when using Chromium Portable

When i use the new Chromium Portable browser it always shows "Google API keys are missing.Some functionality of Chromium Portable will be disabled" after starting up.

How do i get rid of this warning message and what does it mean?.

like image 900
Hyperion Avatar asked Jan 22 '14 07:01

Hyperion


People also ask

How do I fix Google API keys missing in chromium?

You have to add the API keys manually in your args.gn file. Get then from cloud.google.com or follow the instructions on the website where you built Chromium.

How do I enable API key in chromium?

Go to the Credentials sub tab under the API & Services section in the hamburger menu. Click the "Create credentials" button then click on the OAuth client ID item in the drop-down list. Click on the "Configure consent screen" button.

How do I get my Google Drive API key?

To create an API key: Navigate to the APIs & Services→Credentials panel in console. Select Create credentials, then select API key from the dropdown menu. The API key created dialog box displays your newly created key.


2 Answers

To get rid of the message...

...on Windows, you can use the command prompt to set the following environment variables to "no":

setx GOOGLE_API_KEY "no" setx GOOGLE_DEFAULT_CLIENT_ID "no" setx GOOGLE_DEFAULT_CLIENT_SECRET "no" 

Windows' environment variables can also be set from the "Advanced System Settings" tab of the "System" control panel. After setx ... relaunching the browser should no longer have the message. Setting the variables through the "Advanced System Settings" tab may require a log-out before it takes effect.

... on Linux you can use the terminal to set the environment variables to "no" in the bash shell:

export GOOGLE_API_KEY="no" export GOOGLE_DEFAULT_CLIENT_ID="no" export GOOGLE_DEFAULT_CLIENT_SECRET="no" 

A subsequent launch of the browser from the terminal will not show the missing API key message. To make this setting permanent and to cover invocations from clicking on an icon, follow the directions here for setting environment variables that affect terminal as well as graphical logins.

...on macOS, you can add the following key-value pairs to the LSEnvironment dictionary in Chromium.app > Contents > Info.plist:

<key>LSEnvironment</key> <dict>     <key>GOOGLE_API_KEY</key>     <string>no</string>     <key>GOOGLE_DEFAULT_CLIENT_ID</key>     <string>no</string>     <key>GOOGLE_DEFAULT_CLIENT_SECRET</key>     <string>no</string> </dict> 

(Note that macOS may have cached the existing Info.plist file, so changes may not take effect immediately. See this answer for some ways around that.)

As for the meaning, I think Dragomir Goranov's answer gives sufficient information.

like image 97
mormegil Avatar answered Oct 22 '22 07:10

mormegil


I needed to get rid of this message too, so I just took what mormegil suggested but applied it to a batch script that launches Chromium.

My below sample batch file will launch Chromium into KIOSK mode but you can just remove the --kiosk if you don't need that.

set GOOGLE_API_KEY="no" set GOOGLE_DEFAULT_CLIENT_ID="no" set GOOGLE_DEFAULT_CLIENT_SECRET="no"  "C:\chromium\ChromiumPortable_49.0.2593.0.paf\App\Chromium\32\chrome.exe" --kiosk 

I did it this way since I don't want to set those environment variables to affect other instances of Chromium but rather just the one that I'm launching with my batch script.

like image 20
MattWeiler Avatar answered Oct 22 '22 06:10

MattWeiler