Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google-drive-ocamlfuse: command not found #1

Open
justforfun20 opened this issue Dec 25, 2020 · 3 comments
Open

google-drive-ocamlfuse: command not found #1

justforfun20 opened this issue Dec 25, 2020 · 3 comments

Comments

@justforfun20
Copy link

copied compose and installed. When I try to run the google-drive-ocamlfuse commend, I get a "command not found" error. Strangely, when I tab to autofill, the only option is google-drive-ocamlfulse_local_ ... but also get same error message.

I'm completely new to Docker and Linux so please forgive me for any newb type mistakes.

@maltokyo
Copy link
Owner

Could you please share your full compose file (delete sensitive stuff), and the command you tried to run, and from which environment (inside the docker container or from host?)

@mkari37
Copy link

mkari37 commented Apr 3, 2021

I think justforfun20 and I may be running into the same problem. I'm running on a headless CentOS 7, and my docker setup is known good. I followed headless authorization instructions at https://github.com/astrada/google-drive-ocamlfuse/wiki/Headless-Usage-&-Authorization .

Here's the compose.yml, which is identical except for the credentials (details copied from the .json file provided by Google to minimize errors, and yes, I did remove the tail from CLIENT_ID).

version: '3'
services:
  google-drive-ocamlfuse:
    container_name: google-drive-ocamlfuse
    image: maltokyo/docker-google-drive-ocamlfuse:0.7.22 # this version is in sync with the official google-drive-ocamlfuse release, starting at 0.7.19
    restart: always
    environment:
      # below are must have for first run only, after that comment them out!
      CLIENT_ID: "..."
      CLIENT_SECRET: "..."
      VERIFICATION_CODE: "..."
      MOUNT_OPTS: "nonempty,allow_other" #nonempty will ensure that it still will mount even if you have some leftover artefacts/rubbish inside the mount dir on your host. That is dangerous if you have something in there, so ensure it is empty when you begin
    security_opt:
      - "apparmor:unconfined"
    cap_add:
      - "mknod"
      - "sys_admin"
    devices:
      - "/dev/fuse"
    volumes:
      - "./google-drive-ocamlfuse_local_data:/mnt/gdrive:shared" # change the first path to where you want to store your local data to sync with google drive
      - "./google-drive-ocamlfuse_local_config:/config/.gdfuse/default" # change the first path to where you want to store your config data

And here's a log

2021-04-03T14:02:07.704394227Z creating gdfuser group for gid 0
2021-04-03T14:02:07.742059215Z creating gdfuser group for uid 0
2021-04-03T14:02:07.795918971Z taking ownership of /config for gdfuser
2021-04-03T14:02:07.801474539Z initializing google-drive-ocamlfuse...
2021-04-03T14:02:07.895939763Z Please, open the following URL in a web browser: https://accounts.google.com/o/oauth2/auth?client_id=[...].apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&response_type=code&access_type=offline&approval_prompt=force
2021-04-03T14:02:08.152170135Z Cannot retrieve auth tokens.
2021-04-03T14:02:08.152237563Z Failure("Unexpected error response: {\n  \"error\": \"invalid_grant\",\n  \"error_description\": \"Bad Request\"\n}")
2021-04-03T14:02:08.162873355Z Please enter the verification code: mounting at /mnt/gdrive
2021-04-03T14:02:08.249136771Z /bin/sh: 1: xdg-open: not found
2021-04-03T14:02:08.253513459Z /bin/sh: 1: firefox: not found
2021-04-03T14:02:08.258103627Z /bin/sh: 1: google-chrome: not found
2021-04-03T14:02:08.263125819Z /bin/sh: 1: chromium-browser: not found
2021-04-03T14:02:08.268426519Z /bin/sh: 1: open: not found
2021-04-03T14:02:08.268742551Z Error: Error opening URL:https://accounts.google.com/o/oauth2/auth?client_id=[...].apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&response_type=code&access_type=offline&approval_prompt=force
2021-04-03T14:02:09.749403159Z existing google-drive-ocamlfuse config found
2021-04-03T14:02:09.749475651Z mounting at /mnt/gdrive
2021-04-03T14:02:09.845234823Z /bin/sh: 1: xdg-open: not found
2021-04-03T14:02:09.850064943Z /bin/sh: 1: firefox: not found
2021-04-03T14:02:09.855221295Z /bin/sh: 1: google-chrome: not found
2021-04-03T14:02:09.860460207Z /bin/sh: 1: chromium-browser: not found
2021-04-03T14:02:09.865996371Z /bin/sh: 1: open: not found
2021-04-03T14:02:09.866339655Z Error: Error opening URL:https://accounts.google.com/o/oauth2/auth?client_id=[...].apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&response_type=code&access_type=offline&approval_prompt=force

The log then repeats the last 8 lines forever, with increasing delays.

At a guess, I think the problem might lie somewhere around the su-gdfuser-echo-pipe line? It seems like it's not accepting the verification code on the first run.

(Edit to add : Nothing mounts. /mnt/gdrive/ doesn't exist, regardless of the message).

@maltokyo
Copy link
Owner

I just updated the docker image to the latest version, does that still happen? please use docker image tag/version 0.7.26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants