Closed Koramchad closed 1 year ago
Google's old OOB authentication flow has been deprecated so you need to get a new client secret.
In addition the flow is local only so you need to do it on a machine with a browser first and then transfer the .gphotos.token to your QNAP.
Take a look at https://gilesknap.github.io/gphotos-sync/main/tutorials/installation.html#initial-setup and see if that helps.
closing as stale
I tried to run gphotos sync one more time on my Qnap to continue making progress on downloading more photos. I got an error on my Qnap, so I tried to get a new .gphotos.token from my Mac to see if that would fix it, but I'm also getting errors on that process.
This is from my Mac:
I get tho the login on the browser and I get a successfull message, but the terminal gives me the error above.
This is the error I got on my Qnap when I tried to run gphotos-sync after it worked last time:
[/share/Container/photoprism] # gphotos-sync /share/Photos 10-09 13:02:03 WARNING gphotos-sync 3.0.3 2022-10-09 13:02:03.956829 10-09 13:02:03 ERROR Process failed. Traceback (most recent call last): File "/opt/lib/python3.10/site-packages/gphotos_sync/Main.py", line 496, in main self.setup(args, db_path) File "/opt/lib/python3.10/site-packages/gphotos_sync/Main.py", line 345, in setup self.auth.authorize() File "/opt/lib/python3.10/site-packages/gphotos_sync/authorize.py", line 96, in authorize flow.run_local_server(open_browser=False, host=self.host, port=self.port) File "/opt/lib/python3.10/site-packages/google_auth_oauthlib/flow.py", line 491, in run_local_server local_server = wsgiref.simple_server.make_server( File "/opt/lib/python3.10/wsgiref/simple_server.py", line 154, in make_server File "/opt/lib/python3.10/socketserver.py", line 452, in __init__ File "/opt/lib/python3.10/wsgiref/simple_server.py", line 50, in server_bind File "/opt/lib/python3.10/http/server.py", line 136, in server_bind File "/opt/lib/python3.10/socketserver.py", line 466, in server_bind OSError: [Errno 98] Address already in use 10-09 13:02:03 WARNING Done.
I did some research on previous issues and found that there was some kind of issue with the port being used. If I try to launch it with a random port, I do get the prompt to login on a browser (which I can't do since it's a server with no browser access).
[/share/Container/photoprism] # gphotos-sync --port 8081 /share/Photos 10-09 13:23:44 WARNING gphotos-sync 3.0.3 2022-10-09 13:23:44.702294 Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=267860787202-s4432r4q8ot299o1ghp5lc0739drvond.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8081%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fphotoslibrary.readonly+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fphotoslibrary.sharing&state=Pi7mHVqxkUAx9LLmKJIxcpSO89rWyp&access_type=offline ^C10-09 13:23:47 ERROR User cancelled download 10-09 13:23:47 WARNING Done. [/share/Container/photoprism] #
What am I missing here?
Thanks!