astrada / google-drive-ocamlfuse

FUSE filesystem over Google Drive
https://astrada.github.io/google-drive-ocamlfuse/
MIT License
5.42k stars 346 forks source link

Authorization fails if a process is already bound to 127.0.0.1:8080 #855

Open henrywintif opened 2 months ago

henrywintif commented 2 months ago

I have a process running that occupied port 8080.

After running google-drive-ocamlfuse -id xxxxxxxxxx.apps.googleusercontent.com -secret XXX-YYY-ZZZ an error in the shell came up with the following text: Thread 1 killed on uncaught exception Unix.Unix_error(50, "bind", ""). The OAuth browser window did open, but auth failed because the process for retrieving the callback never started.

I see two ways of solving this:

  1. Warn the user that port 8080 must be available
  2. Use a distinct port for the OAuth callback

I actually think that using options 1 & 2, where a different, obscure port number is used, and also a warning is given to the user that the chosen new port number must be available.

astrada commented 2 months ago

You can change the default port with the -port command line option (https://github.com/astrada/google-drive-ocamlfuse/wiki/Usage#since-0732) or modifying the configuration file.