Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open the Settings window from Alfred #89

Open
elmundio87 opened this issue Nov 8, 2017 · 10 comments
Open

Unable to open the Settings window from Alfred #89

elmundio87 opened this issue Nov 8, 2017 · 10 comments

Comments

@elmundio87
Copy link

Recently, I've become unable to open the Settings window from within the Alfred workflow. Selecting Alfred Jira Workflow -> Settings -> Edit Settings doesn't do anything.

If I run npm -s run electron within the alfred-jira git repository, the settings window opens and I can edit and save changes as normal.

I've tried running the debugger while reproducing the issue, but it captured no error messages.

@steyep
Copy link
Owner

steyep commented Nov 8, 2017

What version of the workflow are you using? What version of Alfred are you using?

@elmundio87
Copy link
Author

Alfred 3.5.1
Latest version of the workflow - commit ID 06476c1

@elmundio87
Copy link
Author

A bit more info;

I wasn't aware that the workflow gets copied into the Alfred.alfredpreferences sync folder.

I've tried running npm -s run electron from within this directory, and I get this output;

module.js:529
    throw err;
    ^

Error: Cannot find module './'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/edmundd/OneDrive/Alfred.alfredpreferences/workflows/_jira/node_modules/.bin/electron:3:16)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)```

@elmundio87
Copy link
Author

elmundio87 commented Nov 9, 2017

OK, I've solved the issue by deleting the node_modules folder within Alfred.alfredpreferences/workflows/_jira and re-running npm install

@steyep
Copy link
Owner

steyep commented Nov 9, 2017

The Alfred.alfredpreferences/workflows/_jira directory is just a symlink to your cloned repository. You can run readlink Alfred.alfredpreferences/workflows/_jira to see the directory it's pointing at. So it seems odd that you would have different results depending on the directory you're running the command from. I'm guessing one of the modules did not correctly interpret symlinks? I guess that's something I can look into in order to prevent this from happening in the future.

In any event, I'm glad you were able to get it working again and thanks for creating an issue for this and bringing it to my attention.

@elmundio87
Copy link
Author

The output of readlink Alfred.alfredpreferences/workflows/_jira is blank, implying that it isn't a symlink.

I renamed the _jira folder and created the symlink manually, but then I got 2 entries for "Alfred Jira Workflow" when I activated Alfred so I reverted it.

@steyep
Copy link
Owner

steyep commented Nov 9, 2017

Did you use the workflow on more than one computer? I suppose something like that could botch the symlink but the workflow itself only makes a symlink of your cloned repo – it doesn't copy the directory into your workflows directory.

@elmundio87
Copy link
Author

I did do a full OS reinstall from a time machine backup recently, could that have something to do with it?

@steyep
Copy link
Owner

steyep commented Nov 9, 2017

Yeah I suppose that could do it

@steyep
Copy link
Owner

steyep commented Nov 9, 2017

Actually, I just noticed that ./node_modules/.bin/electron is a symlink as well which probably further complicates matters. I'm going to update the code to use the realpath.

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

No branches or pull requests

2 participants