Google API Keys Missing Warning Message when using Chromium Portable

落爺英雄遲暮 提交于 2019-12-31 11:18:07

问题


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?.


回答1:


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.




回答2:


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.




回答3:


It means that some functionality will not work. For example "Chrome Sync API" requires API keys. For more information you can check this URL: http://www.chromium.org/developers/how-tos/api-keys

If something is not clear to you after you read the provided information, please specify exactly what.



来源:https://stackoverflow.com/questions/21276763/google-api-keys-missing-warning-message-when-using-chromium-portable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!