Finicky cannot find config file
⚠️ Please note that only Finicky 4 is being actively developed and maintained, bugs in Finicky 3 and below won't be fixed
Describe the bug
I have finicky.js config file that lives in: ~/.finicky.js (ie: Users/my_user/.finicky.js). It seems like Finicky is not finding it and the logs show that it's looking for it in /var/root/.finicky.js. Am I doing something wrong? Please let me know if I can provide more details.
Your configuration
Finicky version: 4.0.0 (9c1f2d1, built 2025-05-13 18:34:11 UTC)
Configuration is very basic, not the source of the issue.
To Reproduce Steps to reproduce the behavior:
- Go to any URL
- Defaults to Safari.
- Check logs and see that it cannot find config file
Hm. There's an alternative way we could try to get the user home dir if it's not working for you. If you wouldn't mind, could you copy all of the logs (use the copy logs button) and reply with them here?
I'm curious. If you open a terminal and run echo $HOME, what does that command output? For me it prints my home directory, e.g. /Users/johnste
It's weird because I installed this two days ago, and I have had the issue come and go. I have it working now, but I haven't really touched anything to make it work. Maybe it reloaded or something and it worked. Once it happens again, I will post the full logs here! Thank you for being so responsive 🙏 PS: Yeah, my $HOME shows the same with my user.
Hi! I'm seeing this happening again after a few days. Here are the logs:
[2025-05-19T17:36:31.671Z] [INFO ] Starting Finicky | version: 4.0.0
[2025-05-19T17:36:31.685Z] [WARN ] Logging requests to disk. Logs may include sensitive information. Disable this by setting logRequests: false.
[2025-05-19T17:36:31.685Z] [WARN ] Failed to setup file logging | Error: failed to create log directory: mkdir /var/root/Library: permission denied
[2025-05-19T17:36:31.685Z] [ERROR] failed to read config: no config file found in any of these locations: /var/root/.finicky.js, /var/root/.finicky.ts, /var/root/.config/finicky.js, /var/root/.config/finicky.ts, /var/root/.config/finicky/finicky.js, /var/root/.config/finicky/finicky.ts
[2025-05-19T17:36:31.685Z] [INFO ] Listening for events...
[2025-05-19T17:36:31.696Z] [ERROR] Error creating cache directory | Error: mkdir /var/root/Library: permission denied
[2025-05-19T17:36:31.696Z] [INFO ] Checking for updates...
[2025-05-19T17:36:31.825Z] [INFO ] URL received | url: https://xxxx
[2025-05-19T17:36:31.825Z] [WARN ] No configuration available, using default configuration
[2025-05-19T17:36:31.825Z] [INFO ] Starting browser | name: com.apple.Safari | url: https://xxxx
[2025-05-19T17:36:32.974Z] [ERROR] Error creating cache directory | Error: mkdir /var/root/Library: permission denied
I've had a look tonight to try to figure this out. Could you somehow be running the app as root? I don't know why this would happen. If you can find any pattern to when this happens it would be useful, but as Finicky's using the standard methods of getting the home directory, I'm not sure what I can do about it.
I'm using my work laptop, and I think the one pattern I'm finding is when I have to authenticate via WARP Cloudflare (a sort of VPN). So the flow is: 1. I click the logo on the top menu bar, which should lead me to the Cloudflare website to log in. 2. This gets confused and cannot load Finicky.
However, after some time it kinda "fixes" itself and then starts working. I think I have only seen this break in this way. I think there might be something in the way this is accessing the link that is messing with it.
All this said, I think I can just be careful about how I log into Cloudflare here, but I'm not seeing it break in other places consistently. If I do, I can report back. If you want to close this ticket, I'm totally ok with that too!
I'm having a similar issue when using a mobile router (similar to https://consumer.huawei.com/ie/routers/mobile-wifi-3s/ ). When the device gets connected to the computer, it will automatically open the login page in a browser, presumable as root, which causes the same error message as shown in this issue.
Did you experience this issue in Finicky 3.4.0?
I only started using finicky with version 4.
I just tried to download the old version, but get an error Configuration: SyntaxError: Unexpected keyword 'export'
Can I see a sample config for 3.4.0 somewhere?
@samcarter Finicky 3 config is similar to 4 but has a few small differences. You could try using the old Finicky Kickstart tool to generate one.
module.exports = {
defaultBrowser: "Safari",
handlers: [
{
match: /^https?:\/\/google\.com\/.*$/,
browser: "Safari"
}
]
}
Thanks! I'm going to test tonight when I'm near that problematic device.
Since Finicky 3.4 launches on demand and keeps on running, this issue, if it also affects 3.4, should happen less.
Will need to think about this - and try to find a reproduction so I can debug it.
I can confirm that the problem does not occur with 3.4
I'm also experiencing this issue on finicky v4.1.2. Also on a work laptop that uses Cloudflare WARP. Restarting finicky helps resolve the issue.
Another related issue is that Finicky 4 no longer loads configs from custom locations (which Finicky 3 did).
Also see https://github.com/johnste/finicky/issues/441.
Tried to reproduce the error by installing Cloudflare WARP, but I assume I'd need to enroll in some sort of company account to be able to repeat the same steps – I'm not getting a login prompt.
Is someone here wiling and able to help me out?
I have made a test build (PR) that includes an alternative way of getting the user's home directory, but before I commit to refactoring large parts of the application, I would like to find out if this method works more reliably than the current solution.
- Download the
Finicky-universalartifact zip from the action summary page of the PR - Unzip and open the Finicky application inside. ⚠ The app isn't signed, so you need to right-click and select "open" to be able to run it
- Replace the existing Finicky app in
/Applicationswith the new one - Reproduce the issue where Finicky can't find the config due to looking in
/var/root - Go to the troubleshoot tab, enable debug logs and check the debug log
- Does this home directory correspond to the expected one? That is, not
/var/rootbut the one for your user?
@johnste Thanks for looking into this problem!
For my specific case with the login page of my mobile router, your PR works great and I get my personal home directory in the debug output.
Oh great! I'll begin the work to use this information instead. It will require some work to refactor the application flow so it'll take a little bit of time to build and test. I'll keep this issue updated.
@samcarter Would you mind testing this build to see if the issue remains? https://github.com/johnste/finicky/actions/runs/15833130376?pr=455
Similar instructions as the last one, just that this one should hopefully just use the correct folders, and there's no debug output
@johnste Thanks for working on this! I will happily test (I currently don't have the problematic device with me, so might take until tonight or tomorrow)
@johnste I'm terrible sorry, I think I messed up the testing.
I was testing the version from your comment https://github.com/johnste/finicky/issues/412#issuecomment-2998942771 and had the same /var/root/.finicky.js error as originally.
Then I went back to the version from https://github.com/johnste/finicky/issues/412#issuecomment-2985573002 , which originally worked for me, and it now has the same /var/root/.finicky.js error. I don't really know what is happing, the only explanation I can think of is that I maybe forgot to close the finicky window before connecting my device and it thus worked for me?
I'm terrible sorry if this sent you on the wrong track and wasted your time!
@samcarter Ah, that is unfortunate. Don't worry about it though, these things happen. This does mean we need to find another angle at figuring this out.
Would adding a last-resort search location in a user-independent folder help? Maybe something like /opt/finicky/ ?
I found a couple of issues in my last approach. If you're still up for testing I'd be very interested in learning if this latest build https://github.com/johnste/finicky/actions/runs/15984289913?pr=455 works any better.
It works for me if I switch to the root account (sudo su) and then launch Finicky manually open -a /Applications/Finicky.app/, whereas the current release tries to find configuration in /var/root
Wow, you are fantastic! The new version works great (and yes, I did double check that the config window was not still open - I even restarted the laptop to make sure there wasn't anything still running).
Amazing! I'll clean this up a bit and release a new version soon. Thanks again for testing!
Looking forward to the new release! Thank you so much for your patience to fix this!