mailpile / Mailpile

A free & open modern, fast email client with user-friendly encryption and privacy features
https://mailpile.is
Other
8.82k stars 1.02k forks source link

login error, exception while checking stored passphrase #2199

Closed yawks closed 5 years ago

yawks commented 5 years ago

On a fresh mailpile (v1.0.0rc4) install, during the setup I entered a passphrase. If I try it on the webinterface, everything goes well. If I shutdown mailpile and restarts it afterwards, the passphrase does not work neither on the console nor in the web interface. Same behaviour if I create the passphrase in the web interface first.

Here is the console view:

mailpile> setup
Elapsed: 0.036s (setup/migrate: Performed 1 migrations, failed 0.)
Disabling lockdown
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.004s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.004s (tags/add: Added 1 tags)
Elapsed: 0.004s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.004s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Elapsed: 0.004s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.004s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Elapsed: 0.002s (tags/add: Added 1 tags)
Elapsed: 0.003s (tags/add: Added 1 tags)
Created default tags
Failed to load language C.UTF-8
Failed to configure i18n (C.UTF-8). Using fallback.
Metadata index not found: /home/mat/.local/share/Mailpile/default/mailpile.idx
Elapsed: 1.630s (Loaded metadata, 0 messages)
Enabling SpamBayes autotagger
Enabling Gravatar image importer
Enabling Libravatar image importer
Importing contacts from GPG keyring
setup/tor error: Proxy settings have already been configured.
Elapsed: 0.003s (setup/tor: Proxy settings have already been configured.)
Reenabling lockdown
Language set to: C

Choose a password for Mailpile:

Confirm password:
Obfuscating search index and enabling indexing of encrypted e-mail. Yay!
Elapsed: 1.448s (setup/migrate: Performed 1 migrations, failed 0.)
Elapsed: 18.685s (setup: Performed initial Mailpile setup)

OK: Performed initial Mailpile setup

mailpile> quit
Elapsed: 0.001s (quit: quit)
Elapsed: 0.000s (interact: )
Elapsed: 0.003s (cleanup: Performed shutdown tasks)
OK: Performed shutdown tasks
(mp-virtualenv) mat@changm1-l1:~/Mailpile$ ./mp
Elapsed: 0.032s (health: We are healthy!)
Elapsed: 0.001s (motd: )
Mailpile.py              a tool             Copyright 2013-2018, Mailpile ehf
 v1.0.0rc4         for searching and               <https://www.mailpile.is/>
               organizing piles of e-mail

This program is free software: you can redistribute it and/or modify it under
the terms of either the GNU Affero General Public License as published by the
Free Software Foundation. See the file COPYING.md for details.

The Web interface address is: http://localhost:33411/

   * Type `help` for instructions or `quit` to quit.
   * Long running operations can be aborted by pressing: <CTRL-C>
   * You can log in using the `login` command.

mailpile> login

Your password:
/Mailpile/mailpile/auth.py", line 172, in _do_login
    sps = VerifyAndStorePassphrase(config, passphrase=password)
  File "/home/mat/Mailpile/mailpile/auth.py", line 47, in VerifyAndStorePassphrase
    (config.load_master_key(sps)))
  File "/home/mat/Mailpile/mailpile/config/manager.py", line 219, in load_master_key
    passphrase=sps)
  File "/home/mat/Mailpile/mailpile/util.py", line 760, in decrypt_and_parse_lines
    if not pdsfd.verify(_raise=_raise) and error_cb:
  File "/home/mat/Mailpile/mailpile/crypto/streamer.py", line 759, in verify
    if self.close() != 0:
  File "/home/mat/Mailpile/mailpile/crypto/streamer.py", line 756, in close
    return InputCoprocess.close(self)
  File "/home/mat/Mailpile/mailpile/crypto/streamer.py", line 287, in close
    proc.terminate()
  File "/usr/lib/python2.7/subprocess.py", line 1274, in terminate
    self.send_signal(signal.SIGTERM)
  File "/usr/lib/python2.7/subprocess.py", line 1269, in send_signal
    os.kill(self.pid, sig)
OSError: [Errno 3] No such process

login error: Failed: login
Elapsed: 4.087s (login: Failed: login )

Failed: Failed: login

What is wrong?

BjarniRunar commented 5 years ago

That looks like a problem with GnuPG being missing or not working properly. Did you install from our Debian package?

If you installed a package from anywhere else, you may be missing all sorts of dependencies.

BjarniRunar commented 5 years ago

Closing this due to a lack of response. Without further feedback, I'm going to assume this is another case of a broken environment.

BjarniRunar commented 5 years ago

Oh, and thanks for reporting this! Please feel free to re-open or comment further, or create another issue if you feel I closed prematurely!

yawks commented 5 years ago

Sorry for the long delay... and thank you for your answer.

I finally understood what was wrong. At the end of the step "make virtualenv", this message appears:

NOTE: If you want to test/develop with GnuPG 2.1, you might want to activate the virtualenv and then run this script to build GnuPG 2.1: ./scripts/add-gpgme-and-gnupg-to-venv

It requires to have this package installed: qtdeclarative5-dev (and probably pinentry-qt as well but unsure).

After having launched the add-gpgme-and-gnupg-to-venv script the problem described in this ticket disappear.