Unable to get Google Drive to integrate with Files.app

57 views
Skip to first unread message

Powder Linux

unread,
Aug 21, 2018, 3:44:06 PM8/21/18
to Chromium-dev
Hey. Can anyone tell me how I can get Google Drive to integrate with the Files.app? I have the Google Drive API enabled in my build- so besides enabling the API, I am not sure what else I am supposed to do to get the 2 of them to integrate with each other. 
I can see an entry for Google Drive in the Files app- but when I click on 'My Drive' it says 'Nothing to see here', and when I click on 'More..' it says 'Failed to retrieve space info'. ..?
Can somebody tell me what I am missing? The build I am using is board=amd64-generic. Any help would be great.. Thanks!  
-Powder

Screenshot 2018-08-21 at 3.13.58 PM.png


Luciano Pacheco

unread,
Aug 22, 2018, 12:58:59 AM8/22/18
to powde...@gmail.com, chromi...@chromium.org
Hi Powder, 

It seems that you need to setup the API keys as described here and here.

If you need more information about the failures communicating with Drive you can go to the Chrome browser in the affected device and go to chrome://drive-internals which shows some logs. 

Like recently I got "HTTP_REFUSED" errors or something like that when I forgot to setup my keys.

If it still doesn't work share the errors you got here and we try to help you.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/bc48926f-604b-43ac-9c18-4a830e19b4ca%40chromium.org.

Powder Linux

unread,
Aug 22, 2018, 3:00:22 PM8/22/18
to Chromium-dev, powde...@gmail.com
Hey, Thanks for the response! I doubled checked that I have the Google Drive API enabled.. (I used the ~/.googleapikeys method to bake the keys into my build as described here.) ..everything looks good as far as that goes. 
I am guessing that my problem lies in the 'Drive UI Integration' settings? I am not sure what I am supposed to add to those settings..
I have a copy of the log for you to take a look at it. From what I can see, it looks like it is complaining about being unable to fetch a list of team drives.. I was able to find a setting for that in the Drive API settings, but the save button was unclickable after I tried checking the box for it- which I am guessing is the result of a  missing a URL that needs to go in the 'Open URL' field in drive integration settings. (I am not sure what URL I am supposed to use, see screenshot below). Let me know what you think. Thanks again! 
-Powder 

google_drive_api.png

chrome_drive-internals_event-log.txt

Christian Biesinger

unread,
Aug 22, 2018, 3:42:57 PM8/22/18
to powde...@gmail.com, chromium-dev
I would suggesting asking on a chromium-os mailing list instead.

Christian

Luciano Pacheco

unread,
Aug 22, 2018, 9:24:46 PM8/22/18
to powde...@gmail.com, chromi...@chromium.org
Hi, 

The logs says HTTP_FORBIDDEN which means that the access to Drive was denied. So it seems that you're build hasn't yet picked up the keys you configured.

How are you building your ChromeOS ? I think you might need to: re-enter the chroot or SDK prompt and also rebuild it.

If you're using the simple chrome build instructions I recommend to put the API keys in the gn args, if you're using the full build instructions you have to re-enter the chroot which will show a log message about ~/. googleapikeys and you'll need to rebuild.

The options from the screenshot you've sent shouldn't matter, they seem to be related to when you're building an application that will run inside Drive itself.

Powder Linux

unread,
Aug 23, 2018, 2:05:30 PM8/23/18
to Chromium-dev, powde...@gmail.com
SUCCESS! I cant thank you enough Luciano- I finally got it working! You were rite, the API keys never got picked up into the build.. :(
I don't understand what I did wrong to make the keys not get baked into my build? I followed the instructions from the 'full build instructions' guide- more specifically, these instructions:

you will need to have keys (see API Keys) either in your include.gypi, or in a file in your home directory called “.googleapikeys”. If either of these file are present for step 1 of building (below) they will be included automatically.

So before I started building, I made a file called ".googleapikeys" that included the following:

GOOGLE_API_KEY=your_api_key
GOOGLE_DEFAULT_CLIENT_ID=your_client_id
GOOGLE_DEFAULT_CLIENT_SECRET=your_client_secret
I am not sure why it never got picked up into my build.. And I wasn't able to figure out how to get in working with 'gn args' command.. (still haven't figured it out) :(

I ended up getting it to work by editing 'chrome_dev.conf' to deploy my keys at runtime- which resulted in the drive features now working with files.app! (no errors!) :)

So thanks again! I really appreciate your time and your help!
-Powder

Luciano Pacheco

unread,
Aug 23, 2018, 8:31:29 PM8/23/18
to powde...@gmail.com, chromi...@chromium.org
Good to hear you got it working.

About the ~/.googleapikeys file, did you create this inside the chroot/cros_sdk or outside? I think you're suppose to create it outside and it will be picked up when you enter the chroot/cros_sdk, from there it will be picked when rebuilding Chrome.

After creating the keys file outside chroot, when you enter cros_sdk it will say something like:
$ cros_sdk 
INFO    cros_sdk:enter_chroot: Copied Google API keys into chroot.

Which basically copies the from outside chroot home to inside chroot home.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.

Powder Linux

unread,
Aug 26, 2018, 3:12:57 AM8/26/18
to Chromium-dev, powde...@gmail.com
Hey,
I did create the file outside of the chroot.. I just recently tried deleting the chroot and re-creating it just to make sure that it wasnt done incorrectly on my first attempt, and it still doesnt appear to be picking the keys up.
I checked the contents of my home folder inside of the chroot, and I can see that the .googleapikeys file has been copied into there.. So my only guess now is that maybe it is the contents of the file that it doesnt like? (like the way that I have the API information output into the file) (see screenshot)
I read the script from the googlesource link that you sent, and it should be working according to that.. But im not seeing the echo message about finding the keys when I enter the chroot with cros_sdk. (It didnt show up when I re-created the chroot either) ..So I am pretty stumped at the moment. 
Let me know what you think. I really appreciate your time helping me with this! Thanks.
-Powder 
Here is a screenshot of my home folder (inside of the chroot), what I see when I enter the chroot, and the contents of the .googleapikey file:

googleapikey_help.png

Luciano Pacheco

unread,
Aug 26, 2018, 9:08:27 PM8/26/18
to powde...@gmail.com, chromi...@chromium.org
It only shows this message once, if the file already exists inside the chroot it won't show the message.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
Reply all
Reply to author
Forward
0 new messages