Google API keys won't working at Runtime

387 views
Skip to first unread message

Arthur Carrenho Monita Martins

unread,
Jun 15, 2021, 10:22:25 PM6/15/21
to Chromium OS Development
I'm using Google APIs on a Chromium OS already compiled (arnoldthebat daily and special), but the login doesn't work. The keys are ok, configured in /etc/chrome_dev.conf following the official documentation guide. The "keys are missing" message is gone, but when I try to log in, it just says something went wrong.

I have the following APIs enabled:
  • Safe Browsing API
  • Admin SDK API
  • BigQuery API
  • BigQuery Storage API
  • Chrome Management API
  • Chrome Policy API
  • Chrome Verified Access API
  • Chrome Web Store API
  • Cloud Datastore API
  • Cloud Debugger API
  • Cloud Identity API
  • Cloud Logging API
  • Cloud Monitoring API
  • Cloud Search API
  • Cloud SQL
  • Cloud Storage
  • Cloud Storage API
  • Cloud Trace API
  • Geocoding API
  • Geolocation API
  • Google Assistant API
  • Google Calendar API
  • Google Cloud APIs
  • Google Cloud Storage JSON API
  • Google Drive API
  • Nearby Messages API
  • Service Management API
  • Service Usage API
  • Time Zone API

Am I doing something wrong?



‘Esta mensagem é direcionada apenas para os endereços constantes no cabeçalho inicial. Se você não está listado nos endereços constantes no cabeçalho, pedimos-lhe que desconsidere completamente o conteúdo dessa mensagem e cuja cópia, encaminhamento e/ou execução das ações citadas estão imediatamente anuladas e proibidas’.

 ‘Apesar do Magazine Luiza tomar todas as precauções razoáveis para assegurar que nenhum vírus esteja presente nesse e-mail, a empresa não poderá aceitar a responsabilidade por quaisquer perdas ou danos causados por esse e-mail ou por seus anexos’.

Michael Siejak

unread,
Jun 15, 2021, 10:26:43 PM6/15/21
to Arthur Carrenho Monita Martins, Chromium OS Development
I have the same issue. For about 2 months now. One day, it just stopped working

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev
---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Alex Frick

unread,
Jun 17, 2021, 4:07:13 PM6/17/21
to Michael Siejak, Arthur Carrenho Monita Martins, Chromium OS Development
I got it to work. I created a brand new project, enabled all of these PLUS you MUST enable chrome sync api, but the only way it will let you is if you FIRST subscribe to https://groups.google.com/u/1/a/chromium.org/g/google-browser-signin-testaccounts as per the NEW instructions at the updated (finally) https://www.chromium.org/developers/how-tos/api-keys Also, your project must be of the type "Desktop" The updated page still tells you to use "Other" but that option is missing in the cloud console, and setting it as a chrome app or web app (which intuitively seems like it would be the right thing to do) will NOT work. I struggled with this for months and cursed under my breath along with many chromium os devs and linux chromium packagers when google decided to restrict api keys.

It is FINALLY working with sign in, sync, even google drive!! I have tested on arnold the bats special builds 89 90 and 91, as well as my own dev builds of 92 and 93. 

Again to reiterate. Don't use an old project. Create a new one. Use all the API keys you  listed PLUS sync after subscribing to the test group. Create your OAUTH2 credentials FIRST, then API KEYS. Then make your rootfs rw, edit /etc/chrome_dev.conf, and reboot. This took ALOT of trial and error and frustration and talking to people in the dev group. 

Alex Frick

unread,
Jun 17, 2021, 4:08:53 PM6/17/21
to Michael Siejak, Arthur Carrenho Monita Martins, Chromium OS Development
The reason an old project will not work is because of the new server flow of authenticating API keys. Just subscribing and using the same keys that used to work will always yield the "something went wrong" at the last stage of signing in. 
On March 15 the change was made, and concurrently, as per Arnold's post here >> https://arnoldthebat.co.uk/wordpress/2021/02/10/important-update/ he removed the built in keys, and delegated to the aforementioned updated how to page on API keys. Also if you notice it has a section about reworking your gn.args, should any of you also want to build chromium browser for desktop and enable certain apis.

Mihai Sardarescu

unread,
Jun 21, 2021, 8:59:33 AM6/21/21
to Chromium OS Development, circumci...@gmail.com, arthur....@luizalabs.com, Chromium OS Development, msie...@gmail.com
New and existing API keys and OAuth client IDs work the same as long as they are correctly configured. First thing to check is that the old OAuth client ID still exist and that someone has not deleted them by mistake. If they exist, than I am curious to hear what exactly the difference is between the new OAuth client ID (that is working) and the old one (which apparently is not working anymore).

Note that per the new process, signing in to Chromium/ChromiumOS with a Google account is restricted and only designed for developers (see https://www.chromium.org/developers/how-tos/api-keys):
Signing in to Chromium requires an OAuth 2.0 token for authentication. As this OAuth 2.0 token gives access to various Google services that handle user data (e.g. Chrome sync), for security and privacy reasons the generation of this OAuth 2.0 token is restricted. This means that signing in to Chromium is restricted (as the OAuth 2.0 token cannot be generated). In order to sign in to Chromium builds, please add your test account to google-browser-si...@chromium.org (accounts in this group are allowed to get access tokens bypassing the restriction above).

Thank you,
Mihai
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev
---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.
Reply all
Reply to author
Forward
0 new messages