Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

ERR_CONNECTION_REFUSED - problems with localhost #504

Open
calipomza opened this issue Jul 27, 2024 · 10 comments
Open

ERR_CONNECTION_REFUSED - problems with localhost #504

calipomza opened this issue Jul 27, 2024 · 10 comments

Comments

@calipomza
Copy link

I have Debian 12 and use de snap version
I created json and install in my system.
I execute gphotos-sync, and I view the web for verify, I accept permissions, but the system show ERR_CONNECTION_REFUSED - problems with localhost in Chrome, opera and Firefox
Thanks

@calipomza
Copy link
Author

calipomza commented Jul 27, 2024

gphotos-sync /home/ironman/Photos
07-27 11:55:59 WARNING gphotos-sync 2.14.2 2024-07-27 11:55:59.137312
Please go here and authorize, https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=(here is the web page)
Paste the response token here:

@sebrem
Copy link
Contributor

sebrem commented Jul 27, 2024

The last step should be your browser redirecting to localhost in order to send data to the application. I can only suspect that the application started in snap can't be accessed from your browser for some reason (firewall, apparmor, ...). Can you verify that port 8080/tcp is bound on localhost by snap during executing this? (e.g. using netstat -tulpn or ss -tulpn? Or maybe something else is listening on port 8080/tcp?

N.B. I'd edit the URL if I were you, it might reveal something regarding your Google account.

@gilesknap
Copy link
Owner

@calipomza unfortunately the person that made the snap has left Canonical and will not be updating it as far as I'm aware. I imagine that since the oauth2 flow switched to using local webserver that the snap won't work for similar reasons we had issues with containers - this is the PR I made into Google to fix that issue googleapis/google-auth-library-python-oauthlib#202.

Would you consider using a container instead of snap? We can definitely get that to work but I'm not going to find the time to learn all about the snap ecosystem I'm afraid.

@calipomza
Copy link
Author

Then I install manually..... then:
python3 -m venv /path/to/venv
source /path/to/venv/bin/activate

all ok

python3 -m pip install gphotos-sync
Collecting gphotos-sync
Using cached gphotos_sync-3.2.5-py3-none-any.whl (62 kB)
Collecting attrs
Using cached attrs-23.2.0-py3-none-any.whl (60 kB)
Collecting exif
Using cached exif-1.6.0-py3-none-any.whl (30 kB)
Collecting appdirs
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting pyyaml
Using cached PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB)
Collecting psutil
Using cached psutil-6.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (290 kB)
Collecting google-auth-oauthlib
Using cached google_auth_oauthlib-1.2.1-py2.py3-none-any.whl (24 kB)
Collecting plum-py<2.0.0,>=0.5.0
Using cached plum_py-0.8.7-py3-none-any.whl (69 kB)
Collecting google-auth>=2.15.0
Using cached google_auth-2.32.0-py2.py3-none-any.whl (195 kB)
Collecting requests-oauthlib>=0.7.0
Using cached requests_oauthlib-2.0.0-py2.py3-none-any.whl (24 kB)
Collecting cachetools<6.0,>=2.0.0
Using cached cachetools-5.4.0-py3-none-any.whl (9.5 kB)
Collecting pyasn1-modules>=0.2.1
Using cached pyasn1_modules-0.4.0-py3-none-any.whl (181 kB)
Collecting rsa<5,>=3.1.4
Using cached rsa-4.9-py3-none-any.whl (34 kB)
Collecting oauthlib>=3.0.0
Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
Collecting requests>=2.0.0
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Collecting pyasn1<0.7.0,>=0.4.6
Using cached pyasn1-0.6.0-py2.py3-none-any.whl (85 kB)
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140 kB)
Collecting idna<4,>=2.5
Using cached idna-3.7-py3-none-any.whl (66 kB)
Collecting urllib3<3,>=1.21.1
Using cached urllib3-2.2.2-py3-none-any.whl (121 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2024.7.4-py3-none-any.whl (162 kB)
Installing collected packages: appdirs, urllib3, pyyaml, pyasn1, psutil, plum-py, oauthlib, idna, charset-normalizer, certifi, cachetools, attrs, rsa, requests, pyasn1-modules, exif, requests-oauthlib, google-auth, google-auth-oauthlib, gphotos-sync
ERROR: Could not install packages due to an OSError: [Errno 13] Permiso denegado: '/path/to/venv/lib/python3.11/site-packages/appdirs.py'
Check the permissions.

what is the problem
Thanks for all

@ikwyl6
Copy link

ikwyl6 commented Jul 28, 2024

Looks like an appdirs.py issue with that package. Search for that package and the error. Doesn't seem like a gphotos-sync issue.

@calipomza
Copy link
Author

Excuse me please. What is a appdirs.py. Where search the error, in google?

@gilesknap
Copy link
Owner

Now - really an app should pin all its dependencies to make sure it always installs so you could blame gphotos-sync for this.

Therefore I could most likely fix this for you with a little pinning.

Will try to take a look this weekend.

@calipomza
Copy link
Author

Thanks my friend. Will talk in weekend

@ikwyl6
Copy link

ikwyl6 commented Jul 29, 2024

Excuse me please. What is a appdirs.py. Where search the error, in google?

In the output that you pasted above it tells you all the internal workings that pip is doing to install your packages and on the line Installing collected packages: is lists appdirs. On the next line after that it has ERROR: Could not install packages due to an OSError: [Errno 13] Permiso denegado: '/path/to/venv/lib/python3.11/site-packages/appdirs.py' . So I'm just reading what you pasted as the output and it looks like it's appdirs.py package that has some kind of permissions problem. Check this link, this is what I was saying to search for: https://www.google.ca/search?q=appdirs.py+permission+denied&sca_esv=ae95a0e0aab0d175&source=hp&ei=ig-oZryDDaegptQPscuH6Q4&iflsig=AL9hbdgAAAAAZqgdmhOekQNqK6SrQfhB1xCfXGtjpcAp&oq=appdirs.py+permission&gs_lp=Egdnd3Mtd2l6IhVhcHBkaXJzLnB5IHBlcm1pc3Npb24qAggAMgUQIRigATIFECEYoAFI7ypQAFjuI3AAeACQAQCYAbsBoAG_GKoBBDAuMjC4AQPIAQD4AQGYAhSgAsoawgIREC4YgAQYsQMY0QMYgwEYxwHCAggQABiABBixA8ICCxAAGIAEGLEDGIMBwgIOEC4YgAQYsQMYgwEY5QTCAggQLhiABBixA8ICBRAAGIAEwgIUEC4YgAQYsQMY0QMYgwEYxwEYyQPCAgsQABiABBiSAxiKBcICCxAuGIAEGNEDGMcBwgILEC4YgAQYxwEYrwHCAgQQABgewgIGEAAYHhgPwgIGEAAYCBgewgIIEAAYCBgeGA_CAgoQABgIGAoYHhgPwgILEAAYgAQYhgMYigXCAggQABiABBiiBMICBhAAGBYYHsICBxAhGKABGAqYAwCSBwYwLjE5LjGgB7pi&sclient=gws-wiz

@calipomza
Copy link
Author

Thanks my friend

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

No branches or pull requests

4 participants