alfred-firefox icon indicating copy to clipboard operation
alfred-firefox copied to clipboard

No Connection to Browser: dial unix /tmp/alfred-firefox.501.sock: connect: no such file or directory

Open fnl opened this issue 3 years ago • 15 comments

Alfred 4.2.1; Firefox Assistant 0.2.1; Firefox 83.0; Alfred Integration 1.1.2; Catalina 10.15.7

I have two Macs with exactly the above setup; On one, I installed the Alfred Firefox Integration without trouble, on the second I now cannot get it to work:

[03:28:29.671] Firefox Assistant[Script Filter] Script with argv 'ase' finished
[03:28:29.672] ERROR: Firefox Assistant[Script Filter] Code 1: 03:28:29 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/fnl/Documents/Dropbox/Configs/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2BBC9FED-93A4-49F1-B4B8-2698E78F073E
🍺
03:28:29 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------
03:28:29 actions.go:83: loaded URL action "Open in Chrome" from "~/Documents/Dropbox/Configs/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2BBC9FED-93A4-49F1-B4B8-2698E78F073E/scripts/Open in Chrome.sh"
03:28:29 actions.go:83: loaded URL action "Open in Default Application" from "~/Documents/Dropbox/Configs/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2BBC9FED-93A4-49F1-B4B8-2698E78F073E/scripts/Open in Default Application.sh"
03:28:29 actions.go:83: loaded URL action "Open in Firefox" from "~/Documents/Dropbox/Configs/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2BBC9FED-93A4-49F1-B4B8-2698E78F073E/scripts/Open in Firefox.sh"
03:28:29 actions.go:83: loaded URL action "Open in Safari" from "~/Documents/Dropbox/Configs/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2BBC9FED-93A4-49F1-B4B8-2698E78F073E/scripts/Open in Safari.sh"
03:28:29 update.go:210: 9m16.681611s since last check for update
03:28:29 client.go:248: searching bookmarks for "ase" ...
03:28:29 rpc_client.go:36: [ERROR] dial unix /tmp/alfred-firefox.501.sock: connect: no such file or directory
03:28:29 workflow.go:342: ------------------ FATAL ERROR -------------------
03:28:29 workflow.go:343: Cannot Connect to Extension : goroutine 1 [running]:
runtime/debug.Stack(0xc000147990, 0x1, 0x1)
	/usr/local/opt/go/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/deanishe/awgo.(*Workflow).Run.func2(0xc000138000)
	/Users/daj/pkg/mod/github.com/deanishe/[email protected]/workflow.go:343 +0xe7
panic(0x140f940, 0x1544170)
	/usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2
main.mustClient(0x14c15b5)
	/Users/daj/Code/Alfred/alfred-firefox-assistant/rpc_client.go:37 +0xb4
main.runBookmarks(0xc0000c2030, 0x0, 0x0, 0x0, 0x0)
	/Users/daj/Code/Alfred/alfred-firefox-assistant/client.go:249 +0xc1
github.com/peterbourgon/ff/ffcli.(*Command).Run(0x1831c40, 0xc0000c2030, 0x0, 0x0, 0x183a601, 0x2)
	/Users/daj/pkg/mod/github.com/peterbourgon/[email protected]/ffcli/command.go:96 +0x248
github.com/peterbourgon/ff/ffcli.(*Command).Run(0x1832500, 0xc0000c2010, 0x3, 0x3, 0x14b6453, 0x9)
	/Users/daj/pkg/mod/github.com/peterbourgon/[email protected]/ffcli/command.go:90 +0x1f1
main.run()
	/Users/daj/Code/Alfred/alfred-firefox-assistant/main.go:144 +0x191
github.com/deanishe/awgo.(*Workflow).Run(0xc000138000, 0x14d4a18)
	/Users/daj/pkg/mod/github.com/deanishe/[email protected]/workflow.go:357 +0x2af
main.main()
	/Users/daj/Code/Alfred/alfred-firefox-assistant/main.go:149 +0x39
03:28:29 workflow.go:344: ---------------- END STACK TRACE -----------------
03:28:29 feedback.go:468: Sent 1 result(s) to Alfred
03:28:29 workflow.go:375: [ERROR] Cannot Connect to Extension
03:28:29 workflow.go:378: Get help at https://github.com/deanishe/alfred-firefox/issues
03:28:29 workflow.go:401: ------------------- 5.937233ms -------------------
[03:28:29.681] Firefox Assistant[Script Filter] {
  "variables": {
    "AW_SESSION_ID": "PQJB0DNB94Q85SOZIQUAT3J5"
  },
  "items": [
    {
      "title": "Cannot Connect to Extension",
      "valid": false,
      "icon": {
        "path": "icons/error.png"
      }
    }
  ]
}

If I run the server.sh script from a terminal, it starts and even gets the searches from Alfred, but times out as it does not connect to Firefox. And the Firefox extension always insists it is "disconnected". Also, ffass workflow:register finishes successfully.

Removing and reinstalling the workflow as well as restarting the machine also did not help. Any ideas what I can try next?

fnl avatar Nov 29 '20 02:11 fnl

I have the same problem. It was working until the Alfred update to 4.3. I have "disconnected" on the FF plugin

I see the following error in firefox-assistant.log:

16:11:14 workflow.go:342: ------------------ FATAL ERROR -------------------
16:11:14 workflow.go:343: server already running : goroutine 1 [running]:
runtime/debug.Stack(0xc000163d00, 0x1, 0x1)
	/usr/local/opt/go/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/deanishe/awgo.(*Workflow).Run.func2(0xc000150000)
	/Users/daj/pkg/mod/github.com/deanishe/[email protected]/workflow.go:343 +0xe7
panic(0x142f1c0, 0xc0001243d0)
	/usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2
main.run()
	/Users/daj/Code/Alfred/alfred-firefox-assistant/main.go:145 +0x1c8
github.com/deanishe/awgo.(*Workflow).Run(0xc000150000, 0x14d4a18)
	/Users/daj/pkg/mod/github.com/deanishe/[email protected]/workflow.go:357 +0x2af
main.main()
	/Users/daj/Code/Alfred/alfred-firefox-assistant/main.go:149 +0x39
16:11:14 workflow.go:344: ---------------- END STACK TRACE -----------------
16:11:14 workflow.go:375: [ERROR] server already running
16:11:14 workflow.go:378: Get help at https://github.com/deanishe/alfred-firefox/issues
16:11:14 workflow.go:401: ------------------ 2.04351008s -------------------

philippkeller avatar Dec 15 '20 14:12 philippkeller

I switched now to the firefox bookmarks alfred workflow by the same author which brings me back firefox bookmark search to alfred (once I got used to that I never wanted to miss it again!)

philippkeller avatar Dec 16 '20 06:12 philippkeller

Also encountered this issue. Took a while to figure it out. The problem I encountered was that in Catalina, Firefox has issues running files through the native client that are located in ~/Desktop, ~/Documents, ~/Downloads, iCloud Drive, third-party cloud storage, if used, removable volumes, or network volumes. (according to https://stackoverflow.com/questions/64419734/macos-catalina-launchd-cant-open-input-file-error).

The default location to save Alfred settings (and workflows) is in ~/Documents. Moving the preference bundle to my home folder did the trick to make this workflow work.

Thanks for your hard work!

jonepatr avatar Aug 08 '21 13:08 jonepatr

@jonepatr do you mean the setting in advanced -> syncing -> set preferences folder? I tried this one and the problem remains for me.

What I found out: The problem occurs after alfred is updating. It seems with one update it stops working and then with the next update it starts working again…

philippkeller avatar Aug 22 '21 06:08 philippkeller

I just installed the workflow and the extension and I am having this issue. I've already tried moving the preferences file. Any suggestions?

vitobotta avatar Dec 15 '21 22:12 vitobotta

the last few times I was able to fix it with this:

  1. exit firefox
  2. Alfred -> ffass -> Register workflow to browser
  3. start firefox again

philippkeller avatar Dec 16 '21 18:12 philippkeller

I tried it many times before giving up. :(

vitobotta avatar Dec 16 '21 18:12 vitobotta

Also encountered this issue. Took a while to figure it out. The problem I encountered was that in Catalina, Firefox has issues running files through the native client that are located in ~/Desktop, ~/Documents, ~/Downloads, iCloud Drive, third-party cloud storage, if used, removable volumes, or network volumes. (according to https://stackoverflow.com/questions/64419734/macos-catalina-launchd-cant-open-input-file-error).

The default location to save Alfred settings (and workflows) is in ~/Documents. Moving the preference bundle to my home folder did the trick to make this workflow work.

Thanks for your hard work!

thanks! I gave up, but this method makes it works again 👍

ssentanoe avatar Dec 25 '21 18:12 ssentanoe

Also encountered this issue. Took a while to figure it out. The problem I encountered was that in Catalina, Firefox has issues running files through the native client that are located in ~/Desktop, ~/Documents, ~/Downloads, iCloud Drive, third-party cloud storage, if used, removable volumes, or network volumes. (according to https://stackoverflow.com/questions/64419734/macos-catalina-launchd-cant-open-input-file-error).

The default location to save Alfred settings (and workflows) is in ~/Documents. Moving the preference bundle to my home folder did the trick to make this workflow work.

Thanks for your hard work!

thanks! I moved the preference bundle to my home folder in addition to reinstalled workflow before it finally took effect

jiz4oh avatar Mar 17 '22 10:03 jiz4oh

hm... moved folder, restarted firefox countless times, reinstalled addon and workflow... not sure what else to try

s00500 avatar Dec 13 '22 09:12 s00500

@s00500, https://github.com/deanishe/alfred-firefox/issues/20#issuecomment-894801306 is what worked for me and, it looks like, quite a few others -- but it did take me a minute to understand how exactly to implement it. Adding a screengrab of the specific place to make this change in the hope that it helps you and others in the future:

image

So, go to Alfred's preferences, choose the "Advanced" tab on the left, click "Set preferences folder," and choose your home folder in the resulting dialog. You may then have to go through these instructions in order to let your Mac know that the workflow isn't a security risk -- I did, but it did start working again after that.

bdimaggio avatar Dec 23 '22 03:12 bdimaggio

@bdimaggio Thanks for instructions but I did EXACTLY that... strangely after checking today it seems like the workflow does work... not sure why

s00500 avatar Dec 23 '22 15:12 s00500

@s00500, #20 (comment) is what worked for me and, it looks like, quite a few others -- but it did take me a minute to understand how exactly to implement it. Adding a screengrab of the specific place to make this change in the hope that it helps you and others in the future:

image

So, go to Alfred's preferences, choose the "Advanced" tab on the left, click "Set preferences folder," and choose your home folder in the resulting dialog. You may then have to go through these instructions in order to let your Mac know that the workflow isn't a security risk -- I did, but it did start working again after that.

This is not good for those with multiple machines or want cloud backups.

ollyde avatar Jan 31 '23 22:01 ollyde

@ollydixon Agreed! Would love to hear a solution that addresses the OP's problem and takes that concern into account.

bdimaggio avatar Feb 01 '23 15:02 bdimaggio

@bdimaggio the solution is for Mozilla to get their ass in gear and open up the bookmarks api 😂

ollyde avatar Feb 01 '23 16:02 ollyde