lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.86k stars 291 forks source link

CLI 1.3.6 no more working #690

Open lerminou opened 4 months ago

lerminou commented 4 months ago

We used the v 1.3.6 version since a few months, it was OK until a 1 or 2 weeks.

The login is OK but the ls command returns an error:

Environment: docker redhat system 9 lastpass-cli 1.3.6

no newer versions are availables

Success: Logged in as XXXXXX.
[user@858dcd7458be ~]$ lpass ls
Error: Unable to fetch blob. Either your session is invalid and you need to login with `lpass login`, you need to synchronize, your blob is empty, or there is something wrong with your internet connection.

It seems to work with the 1.3.7 on a fedora docker,

Please build the newer versions 1.5.0 for these systems.

plemelin commented 4 months ago

Being hit with the same issue here. Stopped working around July 1st.

Is there any kind of debug information we can provide or any idea on when an update can be expected?

There are multiple reports of this by now:

plemelin commented 4 months ago

For now, here is how I'm working around this issue on my CentOS 7 installation until I migrate away:

sed -i -e "s/^mirrorlist/#mirrorlist/" -e "s/^#baseurl/baseurl/g" -e "s/mirror.centos.org/vault.centos.org/g" /etc/yum.repos.d/CentOS-*
yum install -y git python-dns cmake libxml2-devel openssl-devel curl-devel
yum groupinstall -y "Development Tools"

git clone --branch v1.5.0 https://github.com/lastpass/lastpass-cli.git
cd lastpass-cli
make
make install

I'm brushing up on my RPM building skills and will see if I get anywhere

plemelin commented 4 months ago

Here's how to make an RPM for yourself (there is an old spec file in the contrib folder, I used that as a base):

sed -i -e "s/^mirrorlist/#mirrorlist/" -e "s/^#baseurl/baseurl/g" -e "s/mirror.centos.org/vault.centos.org/g" /etc/yum.repos.d/CentOS-*
yum install -y git python-dns cmake libxml2-devel openssl-devel curl-devel wget rpmdevtools
yum groupinstall -y "Development Tools"

rpmdev-setuptree
cd ~/rpmbuild/SOURCES
wget https://github.com/lastpass/lastpass-cli/releases/download/v1.5.0/lastpass-cli-1.5.0.tar.gz
cd ../SPECS
# see further down for the content of the spec file
vi lastpass-cli.spec
rpmbuild -bb ~/rpmbuild/SPECS/lastpass-cli.spec

You can find the rpm under ~/rpmbuild/RPMS/x86_64/

The content of the spec file:

Name:           lastpass-cli
Version:        1.5.0
Release:        1%{?dist}
Summary:        C99 command line interface to LastPass.com

License:        GPLv2
URL:            https://github.com/LastPass/lastpass-cli
Source0:        lastpass-cli-1.5.0.tar.gz

BuildRequires:  openssl-devel,libxml2-devel,libcurl-devel
Requires:       libcurl,libxml2,pinentry

%description
A command line interface to LastPass.com. Made open source and available on
github.

%prep
%setup -q

%build
make %{?_smp_mflags}

%files
/usr/bin/lpass

%install
rm -rf $RPM_BUILD_ROOT
%make_install
make install
bmbufalo commented 4 months ago

+1 with identical issues here. Also not the first time the RHEL version has been wildly out of date and caused issues...

tvanhe commented 4 months ago

+1 Please update the RHEL versions

HotDonut commented 4 months ago

For now, here is how I'm working around this issue on my CentOS 7 installation until I migrate away:

sed -i -e "s/^mirrorlist/#mirrorlist/" -e "s/^#baseurl/baseurl/g" -e "s/mirror.centos.org/vault.centos.org/g" /etc/yum.repos.d/CentOS-*
yum install -y git python-dns cmake libxml2-devel openssl-devel curl-devel
yum groupinstall -y "Development Tools"

git clone --branch v1.5.0 https://github.com/lastpass/lastpass-cli.git
cd lastpass-cli
make
make install

I'm brushing up on my RPM building skills and will see if I get anywhere

Hi, I followed these instruction on RedHat 8. With the new version the initial error is fixed but now i get some weird syncing issues. I can add/delete objects just fine. I can edit/update newly created "Password" objects. I cannot edit any objects created before the update to 1.5.0. I cannot edit e.g. a "Server" object, even when its newly created.

Example:

[root@f902408e6b7e ~]# lpass login --trust --force account_name
Success: Logged in as account_name.

[root@f902408e6b7e ~]# lpass ls
(none)
    test2 [id: 5457670289910033576]

[root@f902408e6b7e ~]# printf "Password: asdf" | lpass edit --sync=now --non-interactive test2

[root@f902408e6b7e ~]# lpass show test2
test2 [id: 5457670289910033576]
Username: test
Password: asdf
Hostname:
Language: de-DE
NoteType: Server

[root@f902408e6b7e ~]# lpass sync

[root@f902408e6b7e ~]# lpass logout
Are you sure you would like to log out? [Y/n] Y
Log out: complete.

[root@f902408e6b7e ~]# lpass login --trust --force account_name
Success: Logged in as account_name.

[root@f902408e6b7e ~]# lpass show test2
test2 [id: 5457670289910033576]
Username: test
Password: test
Language: de-DE
Hostname:
NoteType: Server

Does anybody face the same issue or has any idea why this would happen?

HotDonut commented 4 months ago

Using the sources from the 1.3.7 branch fixed the "Unable to fetch blob" issue without causing the edit/sync issue for me on RedHat8. At least temporarily.... git clone --branch v1.3.7 https://github.com/lastpass/lastpass-cli.git