You are not logged in.
Pages: 1
I am getting this error message when I enter a password for ssh tunneled connections.
Failed to decrypt the SSH tunnel password. Error: Object type <class 'str'> cannot be passed to C code remove ppycryptodomex
I had the message last month as well and found a solutions via installing a alternative package to pycryptodome. I cannot find the forum that gave the instruction now and don't recall which package I installed. Could anyone help with this.
Thanks!
Last edited by dasbrow (2019-01-08 20:41:32)
Offline
Versions? Package names even?
Moving to NC...
Offline
pgadmin4-3.6-1
Offline
Someone else posted a Bug https://bugs.archlinux.org/task/61228
Offline
Have you tried the building the package with the fix applied and testing it? To check it does resolve the issue for you.
Offline
Yes, I pulled the source to see if maybe it was not compiled against pycryptodome and the patch is applied. I get a completely different issue when I remove the patch from the build script.
Offline
I get a completely different issue when I remove the patch from the build script.
Please clarify this as it doesn't make much sense. The package in the repos doesn't have the patch applied yet, so the error without the patch is what you posted in your first post, right? If you get a different error with the patch applied, then post that error - we can't see what's happening on your computer, you need to tell us.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Please ensure the base-devel group is installed then the following generates and installs the patched package.
git clone git://git.archlinux.org/svntogit/community.git --single-branch --branch "packages/pgadmin4" #needs git
cd community/trunk/
curl -o pgadmin4-compatibility-with-python3-pycryptodome.patch "https://bugs.archlinux.org/task/61228?getfile=17111"
updpkgsums #needs pacman-contrib
gpg --recv-keys 8881B2A8210976F2
makepkg -rsi # or install devtools then use extra-x86_64-build followed by pacman -U pgadmin4-3.6-1-x86_64.pkg.tar.xzOffline
dasbrow wrote:I get a completely different issue when I remove the patch from the build script.
Please clarify this as it doesn't make much sense. The package in the repos doesn't have the patch applied yet, so the error without the patch is what you posted in your first post, right? If you get a different error with the patch applied, then post that error - we can't see what's happening on your computer, you need to tell us.
Edit: Ignore this reply -> The repo may not, but the source package from SVN (arch's build source) has the patch in the directory. I've rebuilt the package with said patch, which did not solve the issue.
Last edited by dasbrow (2019-01-08 16:41:16)
Offline
Never mind, I believe I see where I have gone wrong. I will report back once I fixed my other screw up.
Offline
Please ensure the base-devel group is installed then the following generates and installs the patched package.
git clone git://git.archlinux.org/svntogit/community.git --single-branch --branch "packages/pgadmin4" #needs git cd community/trunk/ curl -o pgadmin4-compatibility-with-python3-pycryptodome.patch "https://bugs.archlinux.org/task/61228?getfile=17111" updpkgsums #needs pacman-contrib gpg --recv-keys 8881B2A8210976F2 makepkg -rsi # or install devtools then use extra-x86_64-build followed by pacman -U pgadmin4-3.6-1-x86_64.pkg.tar.xz
Thanks for the information
I now get this message.
"Failed to decrypt the saved password. Error: 'bytes' object has no attribute 'encode'"
Offline
premature thoughts of it being solved.
Last edited by dasbrow (2019-01-08 20:42:07)
Offline
What file and line number is the new error coming from?
Offline
What file and line number is the new error coming from?
2019-01-09 09:54:24,328: ERROR flask.app: 'bytes' object has no attribute 'encode'
Traceback (most recent call last):
File "/usr/lib/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 259, in connect
password = decrypt(encpass, user.password.encode('utf-8'))
File "/usr/lib/pgadmin4/web/pgadmin/utils/crypto.py", line 54, in decrypt
cipher = AES.new(pad(key.encode('utf-8')), AES.MODE_CFB, iv)
AttributeError: 'bytes' object has no attribute 'encode'
2019-01-09 09:54:25,723: ERROR flask.app: 'bytes' object has no attribute 'encode'
Traceback (most recent call last):
File "/usr/lib/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 259, in connect
password = decrypt(encpass, user.password.encode('utf-8'))
File "/usr/lib/pgadmin4/web/pgadmin/utils/crypto.py", line 54, in decrypt
cipher = AES.new(pad(key.encode('utf-8')), AES.MODE_CFB, iv)
AttributeError: 'bytes' object has no attribute 'encode'
2019-01-09 09:54:25,728: ERROR flask.app: Could not connected to server(#2) - 'LOCAL'.
Error: Failed to decrypt the saved password.
Error: 'bytes' object has no attribute 'encode'Edit pasted wrong error message, correct one is now above.
Last edited by dasbrow (2019-01-09 14:59:04)
Offline
If you manually change /usr/lib/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py" line 259 from
password = decrypt(encpass, user.password.encode('utf-8'))to
password = decrypt(encpass, user.password)What is the output then?
Offline
If you manually change /usr/lib/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py" line 259 from
password = decrypt(encpass, user.password.encode('utf-8'))to
password = decrypt(encpass, user.password)What is the output then?
Fixed! Will keep testing it.
Offline
Pages: 1