Google Drive Sync from MacOS

When syncing with Google Drive, a new browser tab pops up asking for the account to use and the permissions to grant. This continues to take place and Codebook doesn’t get synced. It seems like a new set of browser permission tabs pop up for every API request into Google Drive.

Running Codebook 3.7.0 from Nov 6, 2018, MacOs Mojave 10.14.1, and Chrome 70.0.3538.110.

Thanks

Hi @emilio_apey

Thank you for using Codebook and posting to the discussion forum, although I’m sorry to hear about the trouble with Google Drive sync.

When you select “Allow” after authenticating with your Google account, are you redirected back to the open Codebook window, or does a new Codebook window open up? The reason I ask is because if it’s the latter you may have a second Codebook installation present on your machine which could be causing the issues.

Can you search your machine for another Codebook installation (perhaps in the Downloads folder) and if there is one, move it to the trash, empty the trash, restart Codebook and attempt to sync with Google Drive again.

Let me know the results. Thanks!

I couldn’t find another copy of Codebook in my machine.

So, I removed/uninstalled Codebook hoping that this would clean up if there were more than one version.

However, that didn’t fix it. Still, when I try to sync with Google Drive it re-directs me to a new browser tab. After I select the account to use and grants it permissions, a new browser tab pops up where the same activity takes place, and so on, and on, and on, and on … with a series of new browser tabs asking to identify the Google account and the permissions. It just continues popping new browser tabs.

Something is taking place because a copy of the database file is being created, but the information is not being updated.

Welll, I got tire of spending so much time with this broken Google Drive syncing. I decided to sync directly to the file Google Drive stores in my laptop. So now Google Drive does the file syncing, and Codebook just syncs to the local version of the file.

This is kind of a work around, but it works, and I don’t have to waste more time looking into this bug.

@emilio_apey

Thanks for the response and sorry for the continued trouble.

After I select the account to use and grants it permissions, a new browser tab pops up where the same activity takes place, and so on, and on, and on, and on …

When you grant codebook permission by clicking the “Allow” button at the end of authentication, does it prompt you to Allow this page to open "Codebook" ?

Open_Codebook

When you open Codebook > Preferences > Sync tab and select Google Drive, does your account show up there with an “Unlink” button next to it?

What browser are you using when authenticating with Google Drive after being directed from Codebook?

Could you try running this command in Terminal (founder under Applications > Utilities > Terminal) to ensure there are no other copies of Codebook present on your machine:

find / -name Codebook*.app 2>/dev/null

It should output the locations of any Codebook apps, if it find any other than the one in Applications, then move them to the trash, empty the trash and attempt to sync again.

Also, just to confirm, does your current Codebook installation reside in the /Applications ?

Let me know the results and the answers to the questions. Thanks!

@emilio_apey ,

I am also having the same problem. I have no additional copies of Codebook on my machine, I have run your terminal command and I have tried:

  1. reinstalling Codebook and deleting the existing database stored locally in my Library
  2. Using the Firefox and Safari browser

Nothing seems to resolve the issue.

@mmoore see message above

@Andrew_Phillips

Thanks for using Codebook and sorry for the trouble with Google Drive sync. Let’s try these steps out:

  1. Quit and close Codebook if it’s open.
  2. Open Keychain Access via Applications > Utilities (can also be found easily using spotlight search).
  3. Search in the upper right hand corner for Google Drive. Does a listing show up for STRIP: Google Drive ? If so, right click on it and choose delete.
  4. Launch Codebook again and attempt to re-authenticate and sync with Google Drive again.

If this doesn’t work, can you describe what happens when you click “Allow” after entering your Google Drive credentials. Thanks!

@mmoore

It worked! Thanks for your help.

@Andrew_Phillips

Excellent. Glad I could help. I’ve seen this occur previously if you denied access when prompted to enter your macOS passphrase and “Allow” Codebook to access the Google Drive OAuth token stored in your keychain (the system prompt). Typically it should prompt you again (next time you attempt to complete authentication for example), but in certain scenarios it doesn’t seem to prompt again.

We’ll continue to look into whether there’s a way to handle this a bit better (or possibly reset it) from an Application standpoint.