Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Workflow is causing Alfred to run multiple times #1

Open
christineyen opened this issue Dec 14, 2018 · 5 comments
Open

Workflow is causing Alfred to run multiple times #1

christineyen opened this issue Dec 14, 2018 · 5 comments
Labels

Comments

@christineyen
Copy link

It seems that triggering your workflow is causing Alfred to start a new instance (as verified in the Activity Monitor), which results in other workflows triggering multiple times.

See issue described here: https://www.alfredforum.com/topic/11957-alfred-pastes-the-same-snippet-multiple-times/

I was seeing the symptoms described in that thread, but am in fact running your workflow, not the one linked from that thread. =\

(Also, trying to uninstall your workflow fails in a mysterious way:

$ npm uninstall -g emoji-alfred-workflow

> [email protected] preuninstall /Users/cyen/.nvm/versions/node/v9.9.0/lib/node_modules/emoji-alfred-workflow
> alfy-cleanup

{ Error: Command failed: alfred-unlink
module.js:545
    throw err;
    ^

Error: Cannot find module './'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:470:25)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/cyen/.nvm/versions/node/v9.9.0/lib/node_modules/emoji-alfred-workflow/node_modules/.bin/alfred-unlink:3:20)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)

    at Promise.all.then.arr (/Users/cyen/.nvm/versions/node/v9.9.0/lib/node_modules/emoji-alfred-workflow/node_modules/execa/index.js:201:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:118:7)
  code: 1,
  killed: false,
  stdout: '',
  stderr: 'module.js:545\n    throw err;\n    ^\n\nError: Cannot find module \'./\'\n    at Function.Module._resolveFilename (module.js:543:15)\n    at Function.Module._load (module.js:470:25)\n    at Module.require (module.js:593:17)\n    at require (internal/module.js:11:18)\n    at Object.<anonymous> (/Users/cyen/.nvm/versions/node/v9.9.0/lib/node_modules/emoji-alfred-workflow/node_modules/.bin/alfred-unlink:3:20)\n    at Module._compile (module.js:649:30)\n    at Object.Module._extensions..js (module.js:660:10)\n    at Module.load (module.js:561:32)\n    at tryModuleLoad (module.js:501:12)\n    at Function.Module._load (module.js:493:3)\n',
  failed: true,
  signal: null,
  cmd: 'alfred-unlink',
  timedOut: false }
npm WARN lifecycle [email protected]~preuninstall: continuing anyway [email protected] preuninstall: `alfy-cleanup`
npm WARN lifecycle Exit status
@janclarin janclarin added the bug label Dec 26, 2018
@janclarin
Copy link
Owner

janclarin commented Dec 26, 2018

Hi @christineyen!

Thanks for filing this bug! Unfortunately, I wasn't able to reproduce it though.

I tried on node v.9.9.0 through nvm:

  1. Installed the the emoji-alfred-workflow npm package, ran the workflow, then uninstalled it.
  2. Installed another alfy workflow, alfred-emoji, then did the same as step 1.

I didn't notice any new Alfred instances and was able to uninstall the workflows successfully. In the meantime, I'll be monitoring the issue in alfred-emoji and in the alfred forum bug post.

Apologies for the slow response and happy holidays!

@deanishe
Copy link

Here's the bug: SamVerschueren/alfred-notifier#8

@christineyen
Copy link
Author

I thinkkk that the uninstall issue may have been due to the fact that I'd disabled the workflow but was trying to uninstall it via npm. Or it was on an old version (I could see an upgrade notification in the workflow description). Or something else strange with my setup, given that after I successfully uninstalled/reinstalled it, I got a Dropbox popup asking if I wanted to move the directory out of my Dropbox.

¯_(ツ)_/¯ In either case, I can't repro this anymore with the new version and am glad to have everything working again. Thanks for checking in!

@deanishe
Copy link

deanishe commented Dec 27, 2018

Might make sense to re-open this issue: the bug hasn't actually been fixed.

You aren't seeing it with the latest version because the bug is only triggered when an update is available.

@janclarin janclarin reopened this Dec 27, 2018
@janclarin
Copy link
Owner

Thanks for pointing out the bug, @deanishe! I'll update this workflow as soon as the bug is fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants