finicky: Configuration parsing fails inconsistently
I’m migrating my old config to the new format but am seeing a notification about an error parsing config. In order to try to isolate the problem, I copied the config from the “Advanced usage, settings” section of the README in order to start adding my old configuration bit by bit.
As expected, when I copy over everything intact to .finicky.js I see that a notification that the file was loaded, but if I save again (with no changes to the stock config) it appears to fail maybe half the time. Closing and reopening Finicky does not change this behavior.
This was seen on RC0 (in About: Version 2.0-RC0 (1)).
In RC1 which appears to have been uploaded as I was writing out this issue, I get some slightly better output, though it is still failing around half of the time:
2019-05-21 13:06:58 - Error parsing config: "TypeError: undefined is not an object (evaluating 'object[key]')"
Again, this is with the stock config:
module.exports = {
defaultBrowser: "Google Chrome",
options: {
// Hide the finicky icon from the top bar
hideIcon: true
},
handlers: [
{
// Open any link clicked in Slack in Safari
match: ({ sourceBundleIdentifier }) =>
sourceBundleIdentifier === "com.tinyspeck.chatlyio",
browser: "Safari"
},
{
match: ["http://zombo.com"],
browser: {
name: "Google Chrome Canary",
// Force opening the link in the background
openInBackground: true
}
}
]
};
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (11 by maintainers)
Commits related to this issue
- Fix finicky workUrls matcher https://github.com/johnste/finicky/issues/53#issuecomment-494549559 — committed to stackptr/dotfiles by stackptr 5 years ago
Note that I managed to make it work - and it confirms my hypothesis of a difference in external libraries version:
install_name_tool -change /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore /Users/llange/Applications/Finicky.app/Contents/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore ~/Applications/Finicky.app/Contents/MacOS/Finicky(I believe I could use there a relative marker for the path - did not try it yet)And I was able to open a link n the console:
So I believe it’s due to my aging version of macos, itself having an old version of webkit.
I see multiple paths here
If some other have this issue (mainly @stackptr ), could they confirm their macos version / JavaScriptCore version to see if there is a pattern here ?
It logs the following:
Any click or Finicky Console test result in the same error:
If I log on stdout, I have a little more info but still not usable:
(I don’t know what the 73 is about, I have no line 73 nor column 73 in the file)
Additional information : I install the application with HomeBrew, in my local user “Applications” folder (~/Applications).
Here is the libraries and their versions as resolved on my system:
Thanks you!
Your updated configuration works just fine for me which feels peculiar. I’ll try it some more to see if I can figure out what’s going on.
I want to note your config won’t fully work.
finicky.matchDomains()is a function that will only match against domains/hostnames and your arrayworkUrlscontain full url regular expressions. You can use theworkUrlsarray directly instead: