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

Poetry stuck when installing GCP keyring plugin #6668

Closed
4 tasks done
snthibaud opened this issue Oct 1, 2022 · 29 comments
Closed
4 tasks done

Poetry stuck when installing GCP keyring plugin #6668

snthibaud opened this issue Oct 1, 2022 · 29 comments
Labels
kind/question User questions (candidates for conversion to discussion) status/duplicate Duplicate issues

Comments

@snthibaud
Copy link

  • Poetry version: 1.2.1
  • Python version: 3.9.2
  • OS version and name: Debian GNU/Linux 11 (bullseye)
  • pyproject.toml: not relevant
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I have been trying to install the GCP keyring plugin, but the installer got stuck. It has been resolving for an entire night, so I reran it with -vvv and noticed it stops after indicating it is creating a new session for files.pythonhosted.org . This is the full output:


xyz@xyz:~ $ poetry self add keyrings.google-artifactregistry-auth -vvv
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading libsecret
[keyring.backend] Loading macOS
Creating new session for pypi.org
Source (PyPI): 6 packages found for keyrings-google-artifactregistry-auth *
Using version ^1.1.1 for keyrings.google-artifactregistry-auth

Updating dependencies
Resolving dependencies...
   1: fact: poetry-instance is 1.2.1
   1: derived: poetry-instance
   1: fact: poetry-instance depends on poetry (1.2.1)
   1: fact: poetry-instance depends on keyrings.google-artifactregistry-auth (^1.1.1)
   1: selecting poetry-instance (1.2.1)
   1: derived: keyrings.google-artifactregistry-auth (>=1.1.1,<2.0.0)
   1: derived: poetry (==1.2.1)
Creating new session for pypi.org
Source (PyPI): 1 packages found for poetry 1.2.1
Source (PyPI): 1 packages found for keyrings-google-artifactregistry-auth >=1.1.1,<2.0.0
   1: fact: keyrings-google-artifactregistry-auth (1.1.1) depends on pluggy (*)
   1: fact: keyrings-google-artifactregistry-auth (1.1.1) depends on requests (*)
   1: fact: keyrings-google-artifactregistry-auth (1.1.1) depends on google-auth (*)
   1: fact: keyrings-google-artifactregistry-auth (1.1.1) depends on keyring (*)
   1: selecting keyrings-google-artifactregistry-auth (1.1.1)
   1: derived: keyring
   1: derived: google-auth
   1: derived: requests
   1: derived: pluggy
Source (PyPI): 179 packages found for keyring *
Source (PyPI): 115 packages found for google-auth *
Source (PyPI): No release information found for requests-0.0.1, skipping
Source (PyPI): No release information found for requests-0.12.01, skipping
Source (PyPI): No release information found for requests-2.15.0, skipping
Source (PyPI): 144 packages found for requests *
Source (PyPI): 17 packages found for pluggy *
   1: fact: poetry (1.2.1) depends on dulwich (>=0.20.46,<0.21.0)
   1: fact: poetry (1.2.1) depends on urllib3 (>=1.26.0,<2.0.0)
   1: fact: poetry (1.2.1) depends on xattr (>=0.9.7,<0.10.0)
   1: fact: poetry (1.2.1) depends on virtualenv (>=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6)
   1: fact: poetry (1.2.1) depends on tomlkit (>=0.11.1,<0.11.2 || >0.11.2,<0.11.3 || >0.11.3,<1.0.0)
   1: fact: poetry (1.2.1) depends on shellingham (>=1.5,<2.0)
   1: fact: poetry (1.2.1) depends on requests-toolbelt (>=0.9.1,<0.10.0)
   1: fact: poetry (1.2.1) depends on requests (>=2.18,<3.0)
   1: fact: poetry (1.2.1) depends on platformdirs (>=2.5.2,<3.0.0)
   1: fact: poetry (1.2.1) depends on pkginfo (>=1.5,<2.0)
   1: fact: poetry (1.2.1) depends on pexpect (>=4.7.0,<5.0.0)
   1: fact: poetry (1.2.1) depends on packaging (>=20.4)
   1: fact: poetry (1.2.1) depends on keyring (>=21.2.0)
   1: fact: poetry (1.2.1) depends on jsonschema (>=4.10.0,<5.0.0)
   1: fact: poetry (1.2.1) depends on importlib-metadata (>=4.4,<5.0)
   1: fact: poetry (1.2.1) depends on html5lib (>=1.0,<2.0)
   1: fact: poetry (1.2.1) depends on crashtest (>=0.3.0,<0.4.0)
   1: fact: poetry (1.2.1) depends on cleo (>=1.0.0a5,<2.0.0)
   1: fact: poetry (1.2.1) depends on cachy (>=0.3.0,<0.4.0)
   1: fact: poetry (1.2.1) depends on cachecontrol (>=0.12.9,<0.13.0)
   1: fact: poetry (1.2.1) depends on poetry-plugin-export (>=1.0.7,<2.0.0)
   1: fact: poetry (1.2.1) depends on poetry-core (1.2.0)
   1: selecting poetry (1.2.1)
   1: derived: poetry-core (==1.2.0)
   1: derived: poetry-plugin-export (>=1.0.7,<2.0.0)
   1: derived: cachecontrol[filecache] (>=0.12.9,<0.13.0)
   1: derived: cachy (>=0.3.0,<0.4.0)
   1: derived: cleo (>=1.0.0a5,<2.0.0)
   1: derived: crashtest (>=0.3.0,<0.4.0)
   1: derived: html5lib (>=1.0,<2.0)
   1: derived: importlib-metadata (>=4.4,<5.0)
   1: derived: jsonschema (>=4.10.0,<5.0.0)
   1: derived: keyring (>=21.2.0)
   1: derived: packaging (>=20.4)
   1: derived: pexpect (>=4.7.0,<5.0.0)
   1: derived: pkginfo (>=1.5,<2.0)
   1: derived: platformdirs (>=2.5.2,<3.0.0)
   1: derived: requests (>=2.18,<3.0)
   1: derived: requests-toolbelt (>=0.9.1,<0.10.0)
   1: derived: shellingham (>=1.5,<2.0)
   1: derived: tomlkit (>=0.11.1,!=0.11.2,!=0.11.3,<1.0.0)
   1: derived: virtualenv (>=20.4.3,!=20.4.5,!=20.4.6)
   1: derived: xattr (>=0.9.7,<0.10.0)
   1: derived: urllib3 (>=1.26.0,<2.0.0)
   1: derived: dulwich (>=0.20.46,<0.21.0)
Source (PyPI): 1 packages found for poetry-core 1.2.0
Source (PyPI): 1 packages found for poetry-plugin-export >=1.0.7,<2.0.0
Source (PyPI): 3 packages found for cachecontrol >=0.12.9,<0.13.0
Source (PyPI): 1 packages found for cachy >=0.3.0,<0.4.0
Source (PyPI): No release information found for cleo-0.2.1, skipping
Source (PyPI): 1 packages found for cleo >=1.0.0a5,<2.0.0
Source (PyPI): 2 packages found for crashtest >=0.3.0,<0.4.0
Source (PyPI): 3 packages found for html5lib >=1.0,<2.0
Source (PyPI): 20 packages found for importlib-metadata >=4.4,<5.0
Source (PyPI): 11 packages found for jsonschema >=4.10.0,<5.0.0
Source (PyPI): 9 packages found for packaging >=20.4
Source (PyPI): No release information found for pexpect-0.97, skipping
Source (PyPI): No release information found for pexpect-2.01, skipping
Source (PyPI): 2 packages found for pexpect >=4.7.0,<5.0.0
Source (PyPI): 10 packages found for pkginfo >=1.5,<2.0
Source (PyPI): 1 packages found for platformdirs >=2.5.2,<3.0.0
Source (PyPI): No release information found for requests-toolbelt-0.0.0, skipping
Source (PyPI): 1 packages found for requests-toolbelt >=0.9.1,<0.10.0
Source (PyPI): 1 packages found for shellingham >=1.5,<2.0
Source (PyPI): 3 packages found for tomlkit >=0.11.1,<0.11.2 || >0.11.2,<0.11.3 || >0.11.3,<1.0.0
Source (PyPI): 32 packages found for virtualenv >=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6
Source (PyPI): No release information found for xattr-0.9.0, skipping
Source (PyPI): 3 packages found for xattr >=0.9.7,<0.10.0
Source (PyPI): No release information found for urllib3-0.3, skipping
Source (PyPI): No release information found for urllib3-0.3.1, skipping
Source (PyPI): No release information found for urllib3-0.4.0, skipping
Source (PyPI): No release information found for urllib3-0.4.1, skipping
Source (PyPI): 13 packages found for urllib3 >=1.26.0,<2.0.0
Source (PyPI): No release information found for dulwich-0.0.1, skipping
Source (PyPI): No release information found for dulwich-0.1.0, skipping
Source (PyPI): No release information found for dulwich-0.1.1, skipping
Source (PyPI): No release information found for dulwich-0.2.1, skipping
Source (PyPI): No release information found for dulwich-0.3.0, skipping
Source (PyPI): No release information found for dulwich-0.3.1, skipping
Source (PyPI): No release information found for dulwich-0.3.2, skipping
Source (PyPI): No release information found for dulwich-0.3.3, skipping
Source (PyPI): No release information found for dulwich-0.4.0, skipping
Source (PyPI): No release information found for dulwich-0.4.1, skipping
Source (PyPI): No release information found for dulwich-0.5.0, skipping
Source (PyPI): No release information found for dulwich-0.6.0, skipping
Source (PyPI): No release information found for dulwich-0.6.1, skipping
Source (PyPI): No release information found for dulwich-0.6.2, skipping
Source (PyPI): No release information found for dulwich-0.7.0, skipping
Source (PyPI): No release information found for dulwich-0.7.1, skipping
Source (PyPI): No release information found for dulwich-0.8.0, skipping
Source (PyPI): No release information found for dulwich-0.8.1, skipping
Source (PyPI): No release information found for dulwich-0.8.2, skipping
Source (PyPI): No release information found for dulwich-0.8.3, skipping
Source (PyPI): No release information found for dulwich-0.8.4, skipping
Source (PyPI): No release information found for dulwich-0.8.5, skipping
Source (PyPI): No release information found for dulwich-0.8.6, skipping
Source (PyPI): No release information found for dulwich-0.8.7, skipping
Source (PyPI): No release information found for dulwich-0.9.0, skipping
Source (PyPI): 1 packages found for dulwich >=0.20.46,<0.21.0
   1: selecting poetry-core (1.2.0)
   1: fact: poetry-plugin-export (1.0.7) depends on poetry-core (>=1.1.0,<2.0.0)
   1: fact: poetry-plugin-export (1.0.7) depends on poetry (>=1.2.0,<2.0.0)
   1: selecting poetry-plugin-export (1.0.7)
   1: selecting cachy (0.3.0)
   1: fact: cleo (1.0.0a5) depends on pylev (>=1.3.0,<2.0.0)
   1: fact: cleo (1.0.0a5) depends on crashtest (>=0.3.1,<0.4.0)
   1: selecting cleo (1.0.0a5)
   1: derived: crashtest (>=0.3.1,<0.4.0)
   1: derived: pylev (>=1.3.0,<2.0.0)
Source (PyPI): 2 packages found for pylev >=1.3.0,<2.0.0
   1: selecting crashtest (0.3.1)
   1: selecting platformdirs (2.5.2)
   1: fact: requests-toolbelt (0.9.1) depends on requests (>=2.0.1,<3.0.0)
   1: selecting requests-toolbelt (0.9.1)
   1: selecting shellingham (1.5.0)
   1: fact: dulwich (0.20.46) depends on urllib3 (>=1.25)
   1: selecting dulwich (0.20.46)
   1: fact: pexpect (4.8.0) depends on ptyprocess (>=0.5)
   1: selecting pexpect (4.8.0)
   1: derived: ptyprocess (>=0.5)
Source (PyPI): 5 packages found for ptyprocess >=0.5
   1: selecting pylev (1.4.0)
   1: fact: cachecontrol (0.12.11) depends on cachecontrol (0.12.11)
   1: fact: cachecontrol (0.12.11) depends on requests (*)
   1: fact: cachecontrol (0.12.11) depends on msgpack (>=0.5.2)
   1: fact: cachecontrol (0.12.11) depends on lockfile (>=0.9)
   1: selecting cachecontrol[filecache] (0.12.11)
   1: derived: lockfile (>=0.9)
   1: derived: msgpack (>=0.5.2)
   1: derived: cachecontrol (==0.12.11)
Source (PyPI): 4 packages found for lockfile >=0.9
Source (PyPI): 13 packages found for msgpack >=0.5.2
Source (PyPI): 1 packages found for cachecontrol 0.12.11
   1: fact: html5lib (1.1) depends on webencodings (*)
   1: fact: html5lib (1.1) depends on six (>=1.9)
   1: selecting html5lib (1.1)
   1: derived: six (>=1.9)
   1: derived: webencodings
Source (PyPI): 8 packages found for six >=1.9
Source (PyPI): 6 packages found for webencodings *
   1: selecting tomlkit (0.11.5)
   1: selecting ptyprocess (0.7.0)
   1: selecting webencodings (0.5.1)
   1: selecting six (1.16.0)
   1: fact: packaging (21.3) depends on pyparsing (>=2.0.2,<3.0.5 || >3.0.5)
   1: selecting packaging (21.3)
   1: derived: pyparsing (>=2.0.2,!=3.0.5)
Source (PyPI): No release information found for pyparsing-1.1.2, skipping
Source (PyPI): No release information found for pyparsing-1.2, skipping
Source (PyPI): No release information found for pyparsing-1.3.3, skipping
Source (PyPI): 39 packages found for pyparsing >=2.0.2,<3.0.5 || >3.0.5
   1: selecting pkginfo (1.8.3)
   1: fact: jsonschema (4.16.0) depends on attrs (>=17.4.0)
   1: fact: jsonschema (4.16.0) depends on pyrsistent (>=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2)
   1: selecting jsonschema (4.16.0)
   1: derived: pyrsistent (>=0.14.0,!=0.17.0,!=0.17.1,!=0.17.2)
   1: derived: attrs (>=17.4.0)
Source (PyPI): 25 packages found for pyrsistent >=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2
Source (PyPI): 13 packages found for attrs >=17.4.0
   1: selecting urllib3 (1.26.12)
Source (PyPI): Getting info for msgpack (1.0.4) from PyPI
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading sdist: msgpack-1.0.4.tar.gz
Creating new session for files.pythonhosted.org




@snthibaud snthibaud added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 1, 2022
@dimbleby
Copy link
Contributor

dimbleby commented Oct 1, 2022

probably a stray .lock file in your cache find ~/.cache/pypoetry -name '*lock' -delete

@snthibaud
Copy link
Author

@dimbleby Thank you! Unfortunately the find/delete command did not help.

@dimbleby
Copy link
Contributor

dimbleby commented Oct 1, 2022

You're likely going to have to debug this yourself then, or at least provide some way to reproduce. It works fine here!

@neersighted
Copy link
Member

I'd suggest blowing away your Poetry cache (be aware this will also nuke your virtual environments) with rm -rf ~/.cache/pypoetry -- regardless, this looks like a transient local issue that cannot be reproduced definitively (and fixes for the two known ways to trigger this state are resolved in the master branch). As such I'm going to close it, and ask you to request it be converted to a Discussion or join Discord if you need more support.

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2022
@neersighted neersighted added kind/question User questions (candidates for conversion to discussion) status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 1, 2022
@snthibaud
Copy link
Author

Alright. I will try clearing all caches. Another thing that might have an influence is that I am running this on a Rapsberry Pi 4. I guess it has a different architecture (arm) from most computers on which Poetry is installed, so perhaps it's important to reproduce?

@snthibaud
Copy link
Author

@neersighted I tried your suggestion as well and it did result in a slightly different output, but it still hangs.
It stops here now:

...
Source (PyPI): 13 packages found for attrs >=17.4.0
Source (PyPI): Getting info for urllib3 (1.26.12) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/urllib3/1.26.12/json HTTP/1.1" 200 17299
   1: selecting urllib3 (1.26.12)
Source (PyPI): Getting info for msgpack (1.0.4) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/msgpack/1.0.4/json HTTP/1.1" 200 11371
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading sdist: msgpack-1.0.4.tar.gz
[urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/22/44/0829b19ac243211d1d2bd759999aa92196c546518b0be91de9cacc98122a/msgpack-1.0.4.tar.gz HTTP/1.1" 200 128053

How can I join the discord discussion?

@snthibaud
Copy link
Author

I thought it was perhaps compiling the msgpack package, but the CPU usage is also very low, so I do not think it is.

@clintonroy
Copy link
Contributor

I would shove a strace in front of the command
strace -o /tmp/poetry.log poetry self add yadda yadda

See what happens at the end of the log when the process has apparently hung.

@snthibaud
Copy link
Author

snthibaud commented Oct 4, 2022

@clintonroy Thank you!
This is the output from strace:

openat(AT_FDCWD, "/tmp/tmp469r9589/.venv/bin/activate_this.py", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 4
ioctl(4, FIOCLEX)                       = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
ioctl(4, TCGETS, 0x7fd3703580)          = -1 ENOTTY (Inappropriate ioctl for device)
lseek(4, 0, SEEK_CUR)                   = 0
write(4, "\"\"\"Activate virtualenv for curre"..., 1175) = 1175
close(4)                                = 0
getpid()                                = 1258725
getpid()                                = 1258725
getpid()                                = 1258725
getpid()                                = 1258725
getpid()                                = 1258725
getpid()                                = 1258725
getpid()                                = 1258725
getpid()                                = 1258725
getpid()                                = 1258725
openat(AT_FDCWD, "/tmp/tmp469r9589/.venv/pyvenv.cfg", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 4
ioctl(4, FIOCLEX)                       = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
ioctl(4, TCGETS, 0x7fd3703870)          = -1 ENOTTY (Inappropriate ioctl for device)
lseek(4, 0, SEEK_CUR)                   = 0
lseek(4, 0, SEEK_CUR)                   = 0
write(4, "home = /usr\nimplementation = CPy"..., 204) = 204
close(4)                                = 0
uname({sysname="Linux", nodename="raspberrypi", ...}) = 0
newfstatat(AT_FDCWD, "/tmp/tmp469r9589/.venv/bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/tmp/tmp469r9589/.venv/bin", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(4, 0x3daa57d0 /* 20 entries */, 32768) = 632
getdents64(4, 0x3daa57d0 /* 0 entries */, 32768) = 0
close(4)                                = 0
newfstatat(AT_FDCWD, "/tmp/tmp469r9589/.venv/bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/tmp/tmp469r9589/.venv/bin", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(4, 0x3daa57d0 /* 20 entries */, 32768) = 632
getdents64(4, 0x3daa57d0 /* 0 entries */, 32768) = 0
close(4)                                = 0
mkdirat(AT_FDCWD, "/tmp/tmp469r9589/dist", 0777) = 0
newfstatat(AT_FDCWD, "/tmp/tmp469r9589/.venv/bin/pip", {st_mode=S_IFREG|0755, st_size=238, ...}, 0) = 0
newfstatat(AT_FDCWD, "/tmp/tmp469r9589/.venv/bin/pip", {st_mode=S_IFREG|0755, st_size=238, ...}, 0) = 0
newfstatat(AT_FDCWD, "/tmp/tmp469r9589/.venv/bin/python", {st_mode=S_IFREG|0755, st_size=5280744, ...}, 0) = 0
pipe2([4, 5], O_CLOEXEC)                = 0
fstat(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
ioctl(4, TCGETS, 0x7fd3703920)          = -1 ENOTTY (Inappropriate ioctl for device)
lseek(4, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
pipe2([6, 7], O_CLOEXEC)                = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f81ecc110) = 1258773
close(7)                                = 0
close(5)                                = 0
read(6, "", 50000)                      = 0
close(6)                                = 0
lseek(4, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
fstat(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
read(4, "Looking in indexes: https://pypi"..., 8192) = 110
read(4, "User for us-west1-python.pkg.dev"..., 8082) = 34
read(4, xyz@xyz:~ $ 

@clintonroy
Copy link
Contributor

looks like you might have to follow the children
strace -o /tmp/poetry.log --follow-forks poetry yadda yadda

@snthibaud
Copy link
Author

@clintonroy Thanks again!
Then I get:

1260537 close(5)                        = 0
1260537 getsockopt(4, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
1260537 getsockname(4, {sa_family=AF_INET6, sin6_port=htons(56432), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "2401:4d40:2180:600:4bfc:15a9:2692:2d55", &sin6_addr), sin6_scope_id=0}, [128->28]) = 0
1260537 ioctl(4, FIONBIO, [1])          = 0
1260537 getpeername(4, {sa_family=AF_INET6, sin6_port=htons(443), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "2404:6800:4008:c13::52", &sin6_addr), sin6_scope_id=0}, [28]) = 0
1260537 getpid()                        = 1260537
1260537 getpid()                        = 1260537
1260537 getpid()                        = 1260537
1260537 getpid()                        = 1260537
1260537 getpid()                        = 1260537
1260537 getpid()                        = 1260537
1260537 write(4, "\26\3\1\2\0\1\0\1\374\3\3\371u\365\345\237\2061\271\6BQ\30\0\320*X\374\315\178\232"..., 517) = 517
1260537 read(4, 0x3fed1bc3, 5)          = -1 EAGAIN (Resource temporarily unavailable)
1260537 ppoll([{fd=4, events=POLLIN}], 1, {tv_sec=14, tv_nsec=999000000}, NULL, 0) = 1 ([{fd=4, revents=POLLIN}], left {tv_sec=14, tv_nsec=955175630})
1260537 read(4, "\26\3\3\0z", 5)        = 5
1260537 read(4, "\2\0\0v\3\3\333\211\210\254\230\205\254mT\312_&\6D\305+\253P;\221\240<f\307;u"..., 122) = 122
1260537 read(4, "\24\3\3\0\1", 5)       = 5
1260537 read(4, "\1", 1)                = 1
1260537 read(4, "\27\3\3\0212", 5)      = 5
1260537 read(4, "\336\f\353gR+\373\255\374\35\250Pn\354X5%\25a\372V$O\350\323\251\317\354(\3417\332"..., 4402) = 4402
1260537 write(4, "\24\3\3\0\1\1\27\3\3\0E\241\325\226}\35\215\244\231\235\330\271&\377Ut\257\324\256\2,\23"..., 80) = 80
1260537 ioctl(4, FIONBIO, [1])          = 0
1260537 ppoll([{fd=4, events=POLLOUT}], 1, {tv_sec=15, tv_nsec=0}, NULL, 0) = 1 ([{fd=4, revents=POLLOUT}], left {tv_sec=14, tv_nsec=999990204})
1260537 write(4, "\27\3\3\2\273Z\341r\275XY\347br\244\266\260>1BFVM\241\2\"\207\221j\261\316g"..., 704) = 704
1260537 ioctl(4, FIONBIO, [1])          = 0
1260537 read(4, 0x40170f53, 5)          = -1 EAGAIN (Resource temporarily unavailable)
1260537 ppoll([{fd=4, events=POLLIN}], 1, {tv_sec=15, tv_nsec=0}, NULL, 0) = 1 ([{fd=4, revents=POLLIN}], left {tv_sec=14, tv_nsec=87839569})
1260537 read(4, "\27\3\3\2Q", 5)        = 5
1260537 read(4, "3<\242\341'\215x\21\244\330jhh\25=\344A.@\271\267\231V\313\22,\27\217\205\243\233\333"..., 593) = 593
1260537 read(4, "\27\3\3\2\r", 5)       = 5
1260537 read(4, "J\354\216\31\5\311rvM\271\343\314\231J\273\240m\303b4\217^\371\1*\366\322\30^\220BM"..., 525) = 525
1260537 getpid()                        = 1260537
1260537 openat(AT_FDCWD, "/tmp/tmpanbmt3i8", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0600) = 5
1260537 fstat(5, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
1260537 ioctl(5, TCGETS, 0x7fdfad3970)  = -1 ENOTTY (Inappropriate ioctl for device)
1260537 lseek(5, 0, SEEK_CUR)           = 0
1260537 lseek(5, 0, SEEK_CUR)           = 0
1260537 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
1260537 ioctl(1, TCGETS, 0x7fdfad4020)  = -1 ENOTTY (Inappropriate ioctl for device)
1260537 write(1, "User for us-west1-python.pkg.dev"..., 34) = 34
1260490 <... read resumed>"User for us-west1-python.pkg.dev"..., 8082) = 34
1260490 read(3,  <unfinished ...>
1260537 read(0, xyz@xyz:~ $ 

@dimbleby
Copy link
Contributor

dimbleby commented Oct 5, 2022

looks like keyring is asking you for a username

@dimbleby
Copy link
Contributor

dimbleby commented Oct 5, 2022

or possibly keyring is doing nothing and the repository is asking you for a username. Anyway you'll want to set up authentication, I expect

@snthibaud
Copy link
Author

I see. Thank you! But authentication to what?

@dimbleby
Copy link
Contributor

dimbleby commented Oct 5, 2022

User for us-west1-python.pkg.dev"

@snthibaud
Copy link
Author

Hmm... why is it looking there, actually? It looks like a URL related to my GCP repo, but I do not want to install this plugin from there. I am running the poetry add command outside of any Poetry project as well.

@snthibaud
Copy link
Author

And I want to install this plugin specifically to handle the authentication.

@dimbleby
Copy link
Contributor

dimbleby commented Oct 5, 2022

no idea, this doesn't look like anything to do with poetry, best of luck.

did you try googling?

https://stackoverflow.com/questions/68979914/keyring-authentication-to-artifact-repository-not-working-gcp

@snthibaud
Copy link
Author

Interesting. I did create that Stackoverflow issue myself in the past. The solution does not work now. I will try to figure out more a bit later. Thanks!

@clintonroy
Copy link
Contributor

adding a -s 10000 might make it a bit easier to understand

@dimbleby dimbleby mentioned this issue Oct 6, 2022
@snthibaud
Copy link
Author

I like above pull request to resolve the hidden prompt issue and also resolved this specific issue now.
For anyone running into something similar (and also my future self): the prompt occurred because a source requiring authentication was configured in .config/pip/pip.conf. Commenting that source with a hashtag enabled me to install the authentication plugin.

@sfoley-gpqa
Copy link

sfoley-gpqa commented Feb 9, 2023

@snthibaud
Having the same problem right now on a Raspberry Pi 400 with Poetry 1.3.2 running Python 3.10.11 installed via pyenv.

The following sequence of actions hangs forever:

$ poetry new test
$ cd test/
$ poetry install
$ poetry add requests -vvvvv
Loading configuration file /home/pi/.config/pypoetry/config.toml
Using virtualenv: /home/pi/repos/bossqa3/.venv
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading libsecret
[keyring.backend] Loading macOS

The only thing I have configured is to install virtual environments into the project directory:

$ cat ~/.config/pypoetry/config.toml
[virtualenvs]
in-project = true

@snthibaud
Copy link
Author

@sfoley-gpqa Hello Sean, did you check my last comment? Not sure if the cause is similar in your case, but that resolved it for me.

@sfoley-gpqa
Copy link

sfoley-gpqa commented Feb 9, 2023

@snthibaud

Thanks for following up. I appreciate your time and feedback. I read all of the comments in the thread and tried everything. I don't seem to have a pip.conf anywhere except /etc/pip.conf and that didn't have any auth-related content in it.

I was eventually able to work around the problem by running the install like this

$ PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install

This seems like an awful workaround though :(

The only keyring-related thing I can think of that I did was to copy some SSH keys to the Raspberry Pi and run ssh-add /path/to/key. I'm not sure how that would make things get stuck?

@snthibaud
Copy link
Author

Sure! I am not a developer of Poetry, so I cannot say whether or not it is related. It seems improbable.
The main problem here is that the Poetry installer gets stuck and hides the error messages, I think.

@Nintorac
Copy link

Nintorac commented Apr 4, 2023

I hit this too. No amount of deleting .cache files was able to resolve it. only running with @sfoley-gpqa solution did it work.

I did get a password prompt at one point but cancelled it and then never saw it again.

There's no reason that poetry should be trying to authenticate my keychain that I can figure out.

FWIW I'm running Fedora 36

edit: rebooting fixed the issue

@aschwtzr
Copy link

aschwtzr commented Jun 2, 2023

The solution below from this issue cleared the issue up for me.

export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring

@wxgeo
Copy link
Contributor

wxgeo commented Nov 20, 2023

Same issue on Debian 12.
I removed by mistake some config directories in $HOME last day, so I suspect this is somehow linked to that.

Anyway, running export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring did the trick for me too, so thank you for the advice!

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/question User questions (candidates for conversion to discussion) status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

8 participants