bachya / lp-vault-manager

An Alfred 2 workflow to interact with a LastPass vault.
121 stars 13 forks source link

lpvs fails without error #3

Open avallen opened 9 years ago

avallen commented 9 years ago

Hi Aaron,

many thanks for your great work, I look forward to making extensive use of it in the future, saving me some minutes per day! :-)

Now everything seems to work fine save the most important thing: lpvs <term> does just not respond, instead it just displays "Searching vault...". Nothing is output in alfred's debug mode (set to output all information).

The data that returned from lpass export does contain non-ASCII characters, so this might be related to issue #2, testing with the 3.2 pre-release that you offer in that issue does not fix the issue however (after re-executing lpdd).

I'd be glad to provide additional debugging help if you'd like to investigate this further.

Thanks, Andreas

bachya commented 9 years ago

Good morning Andreas – sorry to hear you're having trouble.

It sounds like you are able to execute `lpass export from Terminal? If so, the problem definitely lies with my side.

Could you run lpsettings within Alfred, select the 4th option ("Edit Config File"), and paste those results here?

avallen commented 9 years ago

Thanks Aaron,

yes lpass export runs fine. Here is the output from "Edit Config File":

{
  "general": {
    "browser": 3, 
    "cache_bust": 300
  }, 
  "lastpass": {
    "path": "/usr/local/bin/lpass", 
    "username": "andreas.vallen@gmail.com"
  }, 
  "passwords": {
    "length": 14, 
    "number": 10
  }
}
bachya commented 9 years ago

Thank you. That all looks good.

Let's go a level deeper:

  1. Open Alfred Preferences, right click on "LastPass Vault Manager", and select "Show in Finder".
  2. Open Terminal and type pythondo not hit ENTER yet.
  3. From Finder, drag lpvm.py into Terminal; this should effectively leave something like python /some/path/to/lpvm.py.
  4. At the end of that string, type search-vault "<QUERY>" – replace <QUERY> with a valid query.
    • Your Terminal should now show python /some/path/to/lpvm.py search-vault "<QUERY>".
  5. Hit ENTER.

Let me know what gets output and we'll go from there.

avallen commented 9 years ago

Great instructions, thanks. The resulting output is the following:

andreas:~ $ python /Users/andreas/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A33E58DD-49C4-46E2-8F58-846AAFA9009B/lpvm.py  search-vault yahoo
22:11:56 workflow.py:1598 DEBUG    Loading cached data from : /Users/andreas/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle
<?xml version="1.0" encoding="utf-8"?>
<items><item autocomplete="yahoo.com" uid="yahoo.com" valid="yes"><title>yahoo.com</title><subtitle>Click to launch; &#8984;-Click to copy password; Shift-Click to copy username.</subtitle><subtitle mod="cmd">&#8984;-Click to copy password</subtitle><subtitle mod="shift">Shift-Click to copy username</subtitle><arg>yahoo.com***https://login.yahoo.com/config/login_verify2?.intl=us&amp;.src=ygrp&amp;.done=http%3a//health.groups.yahoo.com%2Fgroup%2Fwombtwin%2Flinks%2F%3Fprop%3Deupdate</arg></item></items>22:11:56 workflow.py:2113 WARNING  Can't save last version: workflow has no version
22:11:56 workflow.py:1969 DEBUG    Workflow finished in 0.061 seconds.

Prettified:

andreas:~ $ python /Users/andreas/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A33E58DD-49C4-46E2-8F58-846AAFA9009B/lpvm.py  search-vault yahoo
22:11:56 workflow.py:1598 DEBUG    Loading cached data from : /Users/andreas/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle

<?xml version="1.0" encoding="utf-8" ?>
<items>
    <item autocomplete="yahoo.com" uid="yahoo.com" valid="yes">
        <title>yahoo.com</title>
        <subtitle>Click to launch; &#8984;-Click to copy password; Shift-Click to copy username.</subtitle>
        <subtitle mod="cmd">&#8984;-Click to copy password</subtitle>
        <subtitle mod="shift">Shift-Click to copy username</subtitle>
        <arg>yahoo.com***https://login.yahoo.com/config/login_verify2?.intl=us&amp;.src=ygrp&amp;.done=http%3a//health.groups.yahoo.com%2Fgroup%2Fwombtwin%2Flinks%2F%3Fprop%3Deupdate</arg>
    </item>
</items>

22:11:56 workflow.py:2113 WARNING  Can't save last version: workflow has no version
22:11:56 workflow.py:1969 DEBUG    Workflow finished in 0.061 seconds.```
bachya commented 9 years ago

Well that is very odd, indeed – that's exactly the XML I would expect. In fact, if I hardcode it into my lpvs Script Filter, I get what you'd expect:

screen shot 2015-01-05 at 3 26 22 pm

Let's try one other thing: inside the lpvs Script Filter, change:

/usr/bin/env python

...to:

python (so that the entire script reads python lpvm.py search-vault "{query}")

Any difference?

avallen commented 9 years ago

Yes, after this change and a restart it now shows the following error - this time searching for google which should exist too:

3fb0d352-3f74-4783-a310-9bddb7da7900

avallen commented 9 years ago

Here's some debug output that goes with it:

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 00:13:40 workflow.py:1598 DEBUG    Loading cached data from : /Users/andreas/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle
00:13:40 workflow.py:2113 WARNING  Can't save last version: workflow has no version
00:13:40 workflow.py:1969 DEBUG    Workflow finished in 0.037 seconds.
bachya commented 9 years ago

Would you be willing to share your cash to data with me? You can get the path from that Alfred debug info. It only contains URLs and host names, so there shouldn't be anything damaging to you there. Feel free to email it to me at bachya1208@gmail.com.

ghost commented 9 years ago

I'm a bit of an amateur when it comes to Terminal, but I can't seem to get past the python stage. I just get:

-bash: python/Users/mattkneale/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.9E41EC43-4013-41AA-9C2C-A21A4B5B88D7/lpvm.py: No such file or directory

EDIT: Scrap that, no space after python before dragging. Whoops! Here's what I get now:

16:04:24 workflow.py:2113 WARNING Can't save last version: workflow has no version 16:04:24 workflow.py:1969 DEBUG Workflow finished in 0.673 seconds.

bachya commented 9 years ago

Thanks, Matt! Looks like I could use some better debugging info. :) Hang tight while I look into some things; I may have both you and Andreas try a pre-release build with more debugging.

ghost commented 9 years ago

No problem :) Thanks for your work. FWIW I love the look of the workflow, and it's still pretty cool for generating passwords quickly on the fly so still useful even if we can't get it resolved!

bachya commented 9 years ago

Appreciate that! We'll get this squashed, don't worry – I want you to experience the full benefits of this workflow. :)

Could you confirm whether your lpvs Script Filter starts with python instead of /usr/bin/env python (and whether that makes a difference)?

ghost commented 9 years ago

Let's hope so!

/usr/bin/env python, and can confirm it makes no difference if I remove the /usr/bin/env.

bachya commented 9 years ago

@avallen – I loaded the data you sent my into my cache and was able to query it just fine:

screen_shot_2015-01-06_at_12_18_32_pm

So, this tells me that the issue might be environmental. Still experimenting, but wanted to let you know.

bachya commented 9 years ago

@avallen and @MattKneale – I've updated the 3.2 pre-release with more debugging; would you mind:

  1. installing the updated workflow (https://github.com/bachya/lp-vault-manager/releases/tag/v3.2).
  2. Re-running lpdd and posting the debug output from the Run Script action connected to it.
  3. Re-running lpvs <QUERY> and posting the debug output from the Script Filter itself.

Thanks!

avallen commented 9 years ago

I tried but did not receive any debug output from lpvs and only the following line when doing lpdd - which had been there before already.

[INFO: alfred.workflow.input.keyword] Processing output 'alfred.workflow.action.script' with arg ''

Could it be that the pre-release version that is offered under the above link still points to the previous version - it says:

bachya released this 2 days ago.

ghost commented 9 years ago

I'll try this later tonight/early tomorrow :) Just out at the moment. Thanks for your efforts Aaron.

On 6 January 2015 at 20:12, Andreas Vallen notifications@github.com wrote:

I tried but did not receive any debug output from lpvs and only the following line when doing lpdd - which had been there before already.

[INFO: alfred.workflow.input.keyword] Processing output 'alfred.workflow.action.script' with arg ''

Could it be that the pre-release version that is offered under the above link still points to the previous version - it says:

bachya released this 2 days ago.

— Reply to this email directly or view it on GitHub https://github.com/bachya/lp-vault-manager/issues/3#issuecomment-68925909 .

bachya commented 9 years ago

@avallen It's the same release; I just added a different .alfredworkflow file.

That's interesting that you don't see any debug output from either; you should definitely be seeing XML and other results.

So, we've figured out that:

  1. Running the script by itself gives the correct results.
  2. No debug output or results appear when running the same script within Alfred.

Is there anything special about your environment? What version of OS X and Python are you using?

ghost commented 9 years ago

No idea RE: python (can't even remember installing it; how do I find the version?)

I'm on the beta channel for Yosemite... probably should have mentioned that sooner!

On Tue, 6 Jan 2015 22:06 Aaron Bach notifications@github.com wrote:

@avallen https://github.com/avallen It's the same release; I just added a different .alfredworkflow file.

That's interesting that you don't see any debug output from either; you should definitely be seeing XML and other results.

So, we've figured out that:

  1. Running the script by itself gives the correct results.
  2. No debug output or results appear when running the same script within Alfred.

Is there anything special about your environment? What version of OS X and Python are you using?

— Reply to this email directly or view it on GitHub https://github.com/bachya/lp-vault-manager/issues/3#issuecomment-68942895 .

bachya commented 9 years ago

No idea RE: python (can't even remember installing it; how do I find the version?)

In Terminal, run: python --version

I'm on the beta channel for Yosemite... probably should have mentioned that sooner!

Interesting... @avallen, what about you? Are you on a Yosemite beta, as well? I'm running full-fledged Yosemite... I wonder if that's a problem.

ghost commented 9 years ago

Version is 2.7.6.

Yosemite is 10.10.2

On Tue, 6 Jan 2015 23:51 Aaron Bach notifications@github.com wrote:

No idea RE: python (can't even remember installing it; how do I find the version?)

In Terminal, run: python --version

I'm on the beta channel for Yosemite... probably should have mentioned that sooner!

Interesting... @avallen https://github.com/avallen, what about you? Are you on a Yosemite beta, as well? I'm running full-fledged Yosemite... I wonder if that's a problem.

— Reply to this email directly or view it on GitHub https://github.com/bachya/lp-vault-manager/issues/3#issuecomment-68956336 .

avallen commented 9 years ago

No, I'm not on the Yosemite beta channel, instead running the regular current Yosemite version (10.10.1).

Python version in Terminal (with PATH having brew's /usr/local/bin prepended) is:

andreas:~/Downloads $ which python
/usr/local/bin/python
andreas:~/Downloads $ python --version
Python 2.7.9
andreas:~/Downloads $ brew info python
python: stable 2.7.9 (bottled), HEAD
https://www.python.org
/usr/local/Cellar/python/2.7.6 (4663 files, 73M)
  Built from source
/usr/local/Cellar/python/2.7.9 (4860 files, 79M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/python.rb

Not sure about the python version in a launchd environment however, if alfred uses that, it might pick up the system python under /usr/bin instead.

ghost commented 9 years ago

Hi Aaron,

I've installed 3.2 with no success regretfully. Could you clarify how to access the debug outputs of the scripts? Still a novice to this!

shkm commented 9 years ago

@MattKneale This what you're after?

ghost commented 9 years ago

Thanks @shkm

@bachya lpdd output:

[INFO: alfred.workflow.input.keyword] Processing output 'alfred.workflow.action.script' with arg ''

Nothing comes up when running lpvs

bachya commented 9 years ago

Well guys, this is stumping me. Interestingly enough, I'm starting to notice it happen on my side, too: I'll type lpvs <QUERY> and nothing will show up. If I close and re-open my Alfred search, things work as expected. It's a stumper.

I'm currently working on a complete rewrite that makes it much cleaner to see where things are going on. Once it's ready, I'll report back here and would love to have you test. Assuming it continues, I'm going to exercise the nuclear option and ask the Alfred forum participants for help. :)

Stay tuned!

ghost commented 9 years ago

No problem, sorry it didn't work as planned! Look forward to seeing the next version.

Best,

Matt On 9 Jan 2015 18:44, "Aaron Bach" notifications@github.com wrote:

Well guys, this is stumping me. Interestingly enough, I'm starting to notice it happen on my side, too: I'll type lpvs and nothing will show up. If I close and re-open my Alfred search, things work as expected. It's a stumper.

I'm currently working on a complete rewrite that makes it much cleaner to see where things are going on. Once it's ready, I'll report back here and would love to have you test. Assuming it continues, I'm going to exercise the nuclear option and ask the Alfred forum participants for help. :)

Stay tuned!

— Reply to this email directly or view it on GitHub https://github.com/bachya/lp-vault-manager/issues/3#issuecomment-69378793 .

bachya commented 9 years ago

ALRIGHT, gentlemen – I may have implemented something that works, here (at least, for me, the issue no longer occurs). Among some other changes, I modified the updating of the vault to happen in a background process (so there's no change it'll hang on Alfred's thread).

Try the new pre-release of 4.0 and let me know?

https://github.com/bachya/lp-vault-manager/releases/tag/pre-v4.0

(I also snuck a couple of new features in there, as you might be able to tell from the release notes.)

AnxiousGummi commented 9 years ago

A quick comment from a:

Now, I was experiencing both this error and the one in #2 and so far the pre-release of 4.0 has done the trick for me.

Quick note: For complete Mac beginners (like myself) it would be helpful to elaborate a little bit on the installing of the Alfred workflow itself. Being an old Linux user, the Homebrew installation of lastpass-cli was easy but I was stumped for a little while on how to install the workflow. It's always the simple stuff.

Anyway, thanks for your amazing work.

bachya commented 9 years ago

Roger that @AnxiousGummi; when 4.0 gets officially published, I'll add some installation verbiage.

avallen commented 9 years ago

Hi Aaron,

Great to see that you are planning a new release. I just found the time to test the pre-release, unfortunately however it doesn't fix the original issue for me - lpvs still stays blocked with "Searching vault..." with no debug output.

Additionally I see another issue in that I seem not to be able to login anymore. After selecting "Login to LastPass" the alfred prompt shows lpsettings lastpass-login but I cannot submit the login - pressing return again does not effect anything, the prompt still contains the login command and there is no output to the logs. The terminal would not open as it did before.

Maybe it has to do with the unspecified scriptfilter error that is shown in the log when invoking the settings?

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 14:04:02 workflow.py:1386 DEBUG    Reading settings from `/Users/andreas/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json` ...
14:04:02 lpsettings_query.py:35 DEBUG    Query arguments: [u'']
14:04:02 lpsettings_query.py:43 DEBUG    Parsed command: list-settings
14:04:02 lpsettings_query.py:44 DEBUG    Parsed argument: None
14:04:02 lpsettings_query.py:45 DEBUG    Parsed delimiter: >
14:04:02 lpsettings_query.py:46 DEBUG    Parsed query: list-settings
14:04:02 workflow.py:1996 DEBUG    Workflow finished in 0.001 seconds.
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 14:04:03 workflow.py:1386 DEBUG    Reading settings from `/Users/andreas/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json` ...
14:04:03 lpsettings_query.py:35 DEBUG    Query arguments: [u'list-lp-settings']
14:04:03 lpsettings_query.py:43 DEBUG    Parsed command: list-lp-settings
14:04:03 lpsettings_query.py:44 DEBUG    Parsed argument: None
14:04:03 lpsettings_query.py:45 DEBUG    Parsed delimiter: >
14:04:03 lpsettings_query.py:46 DEBUG    Parsed query: list-lp-settings
14:04:03 workflow.py:1996 DEBUG    Workflow finished in 0.001 seconds.
bachya commented 9 years ago

Something's going wrong with outputting Script Filter XML on your side – the reason lpsettings lastpass-login isn't working for you, I'm guessing, is because you're already logged in; in that case, you should see this Script Filter:

screen shot 2015-01-11 at 3 25 12 pm

That "Code 0" error is a generic error that means the workflow received some text it wasn't expecting. In this case, however, it's misleading: Alfred is merely saying that it doesn't know what to do with that DEBUG statement (which is fine).

What does the debug log look like when you run the lpvs command?

bachya commented 9 years ago

@avallen – there's another individual on the Alfred forum who seems to be experiencing what you are. Since I can't reproduce it faithfully, I wanted to let you know that I'm asking the community for help (http://www.alfredforum.com/topic/5356-script-filters-via-python-seem-to-sporadically-not-work/). Hopefully, we'll get it resolved soon!

ghost commented 9 years ago

@bachya I've ran the 4.0 pre-release and this time get the "No items matching "x". See lpvs debug filter for more information".

Debug searching for "GitHub":

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 15:24:43 workflow.py:1386 DEBUG Reading settings from /Users/mattkneale/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json ... 15:24:43 lpvs_query.py:30 DEBUG Query arguments: [u'search-vault-for-query', u'G'] 15:24:43 lpvs_query.py:38 DEBUG Parsed command: search-vault-for-query 15:24:43 lpvs_query.py:39 DEBUG Parsed argument: G 15:24:43 lpvs_query.py:40 DEBUG Parsed delimiter: > 15:24:43 lpvs_query.py:41 DEBUG Parsed query: search-vault-for-query G 15:24:43 lpvs_query.py:52 DEBUG Executing command: search-vault-for-query 15:24:43 background.py:180 DEBUG Command arguments cached to /Users/mattkneale/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache 15:24:43 background.py:184 DEBUG Calling [u'/usr/bin/python', '/Users/mattkneale/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3734C784-249E-46FE-B5C1-AF5BB7103D18/workflow/background.pyc', u'update'] ... 15:24:43 workflow.py:1996 DEBUG Workflow finished in 0.001 seconds. 15:24:43 workflow.py:1996 DEBUG Workflow finished in 0.002 seconds. 15:24:43 background.py:189 DEBUG Executing task update in background... 15:24:43 workflow.py:1609 DEBUG Loading cached data from : /Users/mattkneale/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle 15:24:43 utilities.py:231 DEBUG Search results: [] 15:24:43 workflow.py:1996 DEBUG Workflow finished in 0.046 seconds. [ERROR: alfred.workflow.input.scriptfilter] Code 0: 15:24:43 workflow.py:1386 DEBUG Reading settings from /Users/mattkneale/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json ... 15:24:43 lpvs_query.py:30 DEBUG Query arguments: [u'search-vault-for-query', u'GitHub'] 15:24:43 lpvs_query.py:38 DEBUG Parsed command: search-vault-for-query 15:24:43 lpvs_query.py:39 DEBUG Parsed argument: GitHub 15:24:43 lpvs_query.py:40 DEBUG Parsed delimiter: > 15:24:43 lpvs_query.py:41 DEBUG Parsed query: search-vault-for-query GitHub 15:24:43 lpvs_query.py:52 DEBUG Executing command: search-vault-for-query 15:24:43 background.py:180 DEBUG Command arguments cached to /Users/mattkneale/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache 15:24:43 background.py:184 DEBUG Calling [u'/usr/bin/python', '/Users/mattkneale/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3734C784-249E-46FE-B5C1-AF5BB7103D18/workflow/background.pyc', u'update'] ... 15:24:44 workflow.py:1996 DEBUG Workflow finished in 0.001 seconds. 15:24:44 workflow.py:1996 DEBUG Workflow finished in 0.002 seconds. 15:24:44 background.py:189 DEBUG Executing task update in background... 15:24:44 workflow.py:1609 DEBUG Loading cached data from : /Users/mattkneale/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle 15:24:44 utilities.py:231 DEBUG Search results: [] 15:24:44 workflow.py:1996 DEBUG Workflow finished in 0.048 seconds.

avallen commented 9 years ago

@bachya - I had a look at the forum post you mentioned (http://www.alfredforum.com/topic/5356-script-filters-via-python-seem-to-sporadically-not-work/) and analyzed whether the use of the system python /usr/bin/python could be the culprit, but just executing the various workflows script from the commandline seems to work with the system python (Yosemite's is version 2.7.6) as well as with my brew-installed python under /usr/local/bin/python (2.7.9).

Maybe this helps.

bachya commented 9 years ago

@avallen – unfortunately, no. :( I've implemented all of the advice given, but I can't see any tactical difference. There's something fishy going on with Alfred, but I'm not sure what it is at the moment. I will continue to dig.

hakusaro commented 9 years ago

Hi,

I'm also experiencing an issue where lpvs [anything] returns no results. I'm on OS X seed 10.10.2, and I'm happy to provide any debug output needed. This is on the 4.0 pre-release after a fresh install of release didn't work. It also says getting new data, but never does?

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 05:40:54 workflow.py:1386 DEBUG    Reading settings from `/Users/shank/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json` ...
05:40:54 lpvs_query.py:30 DEBUG    Query arguments: [u'search-vault-for-query', u'os01sv01']
05:40:54 lpvs_query.py:38 DEBUG    Parsed command: search-vault-for-query
05:40:54 lpvs_query.py:39 DEBUG    Parsed argument: os01sv01
05:40:54 lpvs_query.py:40 DEBUG    Parsed delimiter: >
05:40:54 lpvs_query.py:41 DEBUG    Parsed query: search-vault-for-query os01sv01
05:40:54 lpvs_query.py:52 DEBUG    Executing command: search-vault-for-query
05:40:54 background.py:180 DEBUG    Command arguments cached to `/Users/shank/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache`
05:40:54 background.py:184 DEBUG    Calling [u'/usr/bin/python', '/Users/shank/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.4F4FFD37-3D0E-4B09-9D9D-1F19B8520032/workflow/background.pyc', u'update'] ...
05:40:54 workflow.py:1996 DEBUG    Workflow finished in 0.001 seconds.
05:40:54 workflow.py:1996 DEBUG    Workflow finished in 0.002 seconds.
05:40:54 background.py:189 DEBUG    Executing task `update` in background...
05:40:54 utilities.py:231 DEBUG    Search results: None
05:40:54 workflow.py:1996 DEBUG    Workflow finished in 0.097 seconds.
jacob-long commented 9 years ago

I'll add myself among those experiencing apparently the same problem. I definitely am getting the

[INFO: alfred.workflow.input.keyword] Processing output 'alfred.workflow.action.script' with arg ''

When running the lpdd command.

bachya commented 9 years ago

Thanks for the feedback @nicatronTg and @jlongrc; this is a bugger of a bug. What happens if you open the workflow's folder in Terminal and run /usr/bin/python update.py? What output do you get?

hakusaro commented 9 years ago

@bachya I was prompted for my master password twice when I ran that, and got:

➜  user.workflow.4F4FFD37-3D0E-4B09-9D9D-1F19B8520032  /usr/bin/python update.py
12:25:51 workflow.py:1386 DEBUG    Reading settings from `/Users/shank/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json` ...
pinentry-curses: no LC_CTYPE known - assuming UTF-8
pinentry-curses: no LC_CTYPE known - assuming UTF-8
pinentry-curses: no LC_CTYPE known - assuming UTF-8
12:26:10 workflow.py:1645 DEBUG    Cached data saved at : /Users/shank/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle
12:26:10 update.py:26 DEBUG    639 vault items cached.
12:26:10 workflow.py:2140 WARNING  Can't save last version: workflow has no version
12:26:10 workflow.py:1996 DEBUG    Workflow finished in 18.642 seconds.
➜  user.workflow.4F4FFD37-3D0E-4B09-9D9D-1F19B8520032
bachya commented 9 years ago

Thanks, @nicatronTg – it's good to see this line:

12:26:10 update.py:26 DEBUG    639 vault items cached.

Now, if you run lpvs and search your vault for a site you know exists, what do you see?

hakusaro commented 9 years ago

@bachya that definitely caused it to kick in gear -- maybe it lost the login state somehow?

bachya commented 9 years ago

@nicatronTg Very intriguing. Will you do me a favor? Install this pre-release of 4.2, run lpdd again (which should blow away your existing cache and re-download it), then try lpvs again?

hakusaro commented 9 years ago

@bachya looks like it worked out of the box.

bachya commented 9 years ago

@nicatronTg Let's do one last "nuclear" test. :)

  1. Open the directory that holds the cached data: open ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow\ Data/com.bachya.lpvm
  2. Delete all files in that directory.
  3. In Terminal, run lpass logout --force to log yourself out.

With all that done:

  1. Run lpsettings and select Modify LastPass Settings >> Login To LastPass.
  2. Assuming that goes well, run lpvs build01 – you should see a result that says "Getting new data from LastPass."
  3. Wait approximately 5 seconds.
  4. Run lpvs build01 again.

Let me know where any breaks occur.

bachya commented 9 years ago

@avallen @MattKneale @shkm @AnxiousGummi Gents, would love for you to try out the new pre-release, as well; I think/hope we're closing in on resolving this issue. Instructions above.

avallen commented 9 years ago

@bachya - I followed the instructions above, but I do not see the "Getting new data from LastPass." message.

lpvs now says "No items matching <search term>". This does not change after doing a manual lpdd.

Here's the debut output of an lpvs invocation:

[ERROR: alfred.workflow.input.scriptfilter] Code 0: 00:40:43 workflow.py:1386 DEBUG    Reading settings from `/Users/andreas/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json` ...
00:40:44 workflow.py:1960 DEBUG    Workflow version : 4.2.0
00:40:44 lpvs_query.py:30 DEBUG    Query arguments: [u'search-vault-for-query', u'g']
00:40:44 lpvs_query.py:38 DEBUG    Parsed command: search-vault-for-query
00:40:44 lpvs_query.py:39 DEBUG    Parsed argument: g
00:40:44 lpvs_query.py:40 DEBUG    Parsed delimiter: >
00:40:44 lpvs_query.py:41 DEBUG    Parsed query: search-vault-for-query g
00:40:44 lpvs_query.py:53 DEBUG    Executing command: search-vault-for-query
00:40:44 background.py:180 DEBUG    Command arguments cached to `/Users/andreas/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache`
00:40:44 background.py:184 DEBUG    Calling [u'/usr/bin/python', '/Users/andreas/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3F178CC-1C72-4B5A-9C98-5D5AE1599900/workflow/background.pyc', u'update'] ...
00:40:44 workflow.py:1960 DEBUG    Workflow version : 4.2.0
00:40:44 workflow.py:1996 DEBUG    Workflow finished in 0.015 seconds.
00:40:44 workflow.py:1996 DEBUG    Workflow finished in 0.016 seconds.
00:40:44 background.py:189 DEBUG    Executing task `update` in background...
00:40:44 utilities.py:221 DEBUG    Search results: None
00:40:44 workflow.py:1996 DEBUG    Workflow finished in 0.085 seconds.
[ERROR: alfred.workflow.input.scriptfilter] Code 0: 00:40:44 workflow.py:1386 DEBUG    Reading settings from `/Users/andreas/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json` ...
00:40:44 workflow.py:1960 DEBUG    Workflow version : 4.2.0
00:40:44 lpvs_query.py:30 DEBUG    Query arguments: [u'search-vault-for-query', u'google']
00:40:44 lpvs_query.py:38 DEBUG    Parsed command: search-vault-for-query
00:40:44 lpvs_query.py:39 DEBUG    Parsed argument: google
00:40:44 lpvs_query.py:40 DEBUG    Parsed delimiter: >
00:40:44 lpvs_query.py:41 DEBUG    Parsed query: search-vault-for-query google
00:40:44 lpvs_query.py:53 DEBUG    Executing command: search-vault-for-query
00:40:44 background.py:180 DEBUG    Command arguments cached to `/Users/andreas/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/update.argcache`
00:40:44 background.py:184 DEBUG    Calling [u'/usr/bin/python', '/Users/andreas/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3F178CC-1C72-4B5A-9C98-5D5AE1599900/workflow/background.pyc', u'update'] ...
00:40:44 workflow.py:1960 DEBUG    Workflow version : 4.2.0
00:40:44 workflow.py:1996 DEBUG    Workflow finished in 0.016 seconds.
00:40:44 workflow.py:1996 DEBUG    Workflow finished in 0.017 seconds.
00:40:44 background.py:189 DEBUG    Executing task `update` in background...
00:40:44 utilities.py:221 DEBUG    Search results: None
00:40:44 workflow.py:1996 DEBUG    Workflow finished in 0.084 seconds.
bachya commented 9 years ago

@avallen What happens if you open the workflow's folder in Terminal and run /usr/bin/python update.py? What output do you get?

avallen commented 9 years ago

I get the following output and am asked from the lp master password in the process:

andreas:~/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3F178CC-1C72-4B5A-9C98-5D5AE1599900 $ /usr/bin/python update.py
00:55:49 workflow.py:1960 DEBUG    Workflow version : 4.2.0
00:55:49 workflow.py:1386 DEBUG    Reading settings from `/Users/andreas/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json` ...
00:55:59 workflow.py:1645 DEBUG    Cached data saved at : /Users/andreas/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle
00:55:59 update.py:26 DEBUG    644 vault items cached.
00:55:59 workflow.py:2151 DEBUG    Set last run version : 4.2.0
00:55:59 workflow.py:1996 DEBUG    Workflow finished in 9.724 seconds.
bachya commented 9 years ago

I'm glad to see this line:

00:55:59 update.py:26 DEBUG    644 vault items cached.

What happens now if you run lpvs?