deanishe / alfred-firefox

Search and control Firefox from Alfred
Other
345 stars 19 forks source link

Unable to open bookmark that have `ext+container:name=NAME&url=https://example.com` #14

Closed pyrho closed 4 years ago

pyrho commented 4 years ago

There is a neat little FF feature to allows the user to open a bookmark directly in a given container. Using ext+container:name=THE_CONTAINER_NAME&url=https://example.com but it breaks when using this workflow.

Here is the log: ``` [18:13:07.315] Firefox Assistant[Script Filter] Queuing argument 't' [18:13:07.341] Firefox Assistant[Script Filter] Script with argv 't' finished [18:13:07.345] STDERR: Firefox Assistant[Script Filter] 18:13:07 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A 🍺 18:13:07 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------ 18:13:07 actions.go:83: loaded URL action "Open in Chrome" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Chrome.sh" 18:13:07 actions.go:83: loaded URL action "Open in Default Application" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Default Application.sh" 18:13:07 actions.go:83: loaded URL action "Open in Firefox" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Firefox.sh" 18:13:07 actions.go:83: loaded URL action "Open in Safari" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Safari.sh" 18:13:07 update.go:210: 6m0.683575s since last check for update 18:13:07 feedback.go:468: Sent 1 result(s) to Alfred 18:13:07 workflow.go:404: ------------------- 6.65923ms -------------------- [18:13:07.346] Firefox Assistant[Script Filter] { "variables": { "AW_SESSION_ID": "IOVZPI25Z9TVGHASZJG0334I" }, "items": [ { "title": "Query Too Short", "subtitle": "Please enter at least 3 characters", "valid": false, "icon": { "path": "icons/warning.png" } } ] } [18:13:07.372] Firefox Assistant[Script Filter] Queuing argument 'tr' [18:13:07.457] Firefox Assistant[Script Filter] Script with argv 'tr' finished [18:13:07.461] STDERR: Firefox Assistant[Script Filter] 18:13:07 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A 🍺 18:13:07 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------ 18:13:07 actions.go:83: loaded URL action "Open in Default Application" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Default Application.sh" 18:13:07 actions.go:83: loaded URL action "Open in Firefox" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Firefox.sh" 18:13:07 actions.go:83: loaded URL action "Open in Safari" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Safari.sh" 18:13:07 actions.go:83: loaded URL action "Open in Chrome" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Chrome.sh" 18:13:07 update.go:210: 6m0.736693s since last check for update 18:13:07 feedback.go:468: Sent 1 result(s) to Alfred 18:13:07 workflow.go:404: ------------------- 5.952642ms ------------------- [18:13:07.463] Firefox Assistant[Script Filter] { "variables": { "AW_SESSION_ID": "IOVZPI25Z9TVGHASZJG0334I" }, "items": [ { "title": "Query Too Short", "subtitle": "Please enter at least 3 characters", "valid": false, "icon": { "path": "icons/warning.png" } } ] } [18:13:07.473] Firefox Assistant[Script Filter] Queuing argument 'tre' [18:13:07.565] Firefox Assistant[Script Filter] Script with argv 'tre' finished [18:13:07.573] STDERR: Firefox Assistant[Script Filter] 18:13:07 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A 🍺 18:13:07 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------ 18:13:07 actions.go:83: loaded URL action "Open in Chrome" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Chrome.sh" 18:13:07 actions.go:83: loaded URL action "Open in Default Application" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Default Application.sh" 18:13:07 actions.go:83: loaded URL action "Open in Firefox" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Firefox.sh" 18:13:07 actions.go:83: loaded URL action "Open in Safari" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Safari.sh" 18:13:07 update.go:210: 6m0.837415s since last check for update 18:13:07 client.go:248: searching bookmarks for "tre" ... 18:13:07 rpc_client.go:28: RPC client connected to "Firefox Developer Edition" 18:13:07 actions_custom.go:86: invalid modifier for "tab_godoc" 18:13:07 feedback.go:468: Sent 1 result(s) to Alfred 18:13:07 workflow.go:404: ------------------ 11.963824ms ------------------- [18:13:07.575] Firefox Assistant[Script Filter] { "variables": { "AW_SESSION_ID": "IOVZPI25Z9TVGHASZJG0334I" }, "items": [ { "title": "Trello", "subtitle": "ext+container:name=Work\u0026url=https://trello.com/", "arg": "ext+container:name=Work\u0026url=https://trello.com/", "uid": "S1DQe4VEe6j_", "valid": true, "icon": { "path": "icons/bookmark.png" }, "variables": { "ACTION": "Open in Firefox", "CMD": "url", "TITLE": "Trello", "URL": "ext+container:name=Work\u0026url=https://trello.com/" }, "mods": { "alt": { "subtitle": "Open in Safari", "icon": { "path": "/Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Safari.icns" }, "variables": { "ACTION": "Open in Safari", "CMD": "url", "TITLE": "Trello", "URL": "ext+container:name=Work\u0026url=https://trello.com/" } }, "cmd": { "arg": "", "subtitle": "Other Actions…", "icon": { "path": "icons/more.png" }, "variables": { "ACTION": "Open in Firefox", "CMD": "actions", "TITLE": "Trello", "URL": "ext+container:name=Work\u0026url=https://trello.com/" } } } } ] } [18:13:07.646] Firefox Assistant[Script Filter] Queuing argument 'trel' [18:13:07.739] Firefox Assistant[Script Filter] Script with argv 'trel' finished [18:13:07.751] STDERR: Firefox Assistant[Script Filter] 18:13:07 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A 🍺 18:13:07 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------ 18:13:07 actions.go:83: loaded URL action "Open in Chrome" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Chrome.sh" 18:13:07 actions.go:83: loaded URL action "Open in Default Application" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Default Application.sh" 18:13:07 actions.go:83: loaded URL action "Open in Firefox" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Firefox.sh" 18:13:07 actions.go:83: loaded URL action "Open in Safari" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Safari.sh" 18:13:07 update.go:210: 6m1.01163s since last check for update 18:13:07 client.go:248: searching bookmarks for "trel" ... 18:13:07 rpc_client.go:28: RPC client connected to "Firefox Developer Edition" 18:13:07 actions_custom.go:86: invalid modifier for "tab_godoc" 18:13:07 feedback.go:468: Sent 1 result(s) to Alfred 18:13:07 workflow.go:404: ------------------ 11.721674ms ------------------- [18:13:07.753] Firefox Assistant[Script Filter] { "variables": { "AW_SESSION_ID": "IOVZPI25Z9TVGHASZJG0334I" }, "items": [ { "title": "Trello", "subtitle": "ext+container:name=Work\u0026url=https://trello.com/", "arg": "ext+container:name=Work\u0026url=https://trello.com/", "uid": "S1DQe4VEe6j_", "valid": true, "icon": { "path": "icons/bookmark.png" }, "variables": { "ACTION": "Open in Firefox", "CMD": "url", "TITLE": "Trello", "URL": "ext+container:name=Work\u0026url=https://trello.com/" }, "mods": { "alt": { "subtitle": "Open in Safari", "icon": { "path": "/Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Safari.icns" }, "variables": { "ACTION": "Open in Safari", "CMD": "url", "TITLE": "Trello", "URL": "ext+container:name=Work\u0026url=https://trello.com/" } }, "cmd": { "arg": "", "subtitle": "Other Actions…", "icon": { "path": "icons/more.png" }, "variables": { "ACTION": "Open in Firefox", "CMD": "actions", "TITLE": "Trello", "URL": "ext+container:name=Work\u0026url=https://trello.com/" } } } } ] } [18:13:07.788] Firefox Assistant[Script Filter] Queuing argument 'trell' [18:13:07.881] Firefox Assistant[Script Filter] Script with argv 'trell' finished [18:13:07.886] STDERR: Firefox Assistant[Script Filter] 18:13:07 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A 🍺 18:13:07 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------ 18:13:07 actions.go:83: loaded URL action "Open in Chrome" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Chrome.sh" 18:13:07 actions.go:83: loaded URL action "Open in Default Application" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Default Application.sh" 18:13:07 actions.go:83: loaded URL action "Open in Firefox" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Firefox.sh" 18:13:07 actions.go:83: loaded URL action "Open in Safari" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Safari.sh" 18:13:07 update.go:210: 6m1.153862s since last check for update 18:13:07 client.go:248: searching bookmarks for "trell" ... 18:13:07 rpc_client.go:28: RPC client connected to "Firefox Developer Edition" 18:13:07 actions_custom.go:86: invalid modifier for "tab_godoc" 18:13:07 feedback.go:468: Sent 1 result(s) to Alfred 18:13:07 workflow.go:404: ------------------- 11.66769ms ------------------- [18:13:07.889] Firefox Assistant[Script Filter] { "variables": { "AW_SESSION_ID": "IOVZPI25Z9TVGHASZJG0334I" }, "items": [ { "title": "Trello", "subtitle": "ext+container:name=Work\u0026url=https://trello.com/", "arg": "ext+container:name=Work\u0026url=https://trello.com/", "uid": "S1DQe4VEe6j_", "valid": true, "icon": { "path": "icons/bookmark.png" }, "variables": { "ACTION": "Open in Firefox", "CMD": "url", "TITLE": "Trello", "URL": "ext+container:name=Work\u0026url=https://trello.com/" }, "mods": { "alt": { "subtitle": "Open in Safari", "icon": { "path": "/Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Safari.icns" }, "variables": { "ACTION": "Open in Safari", "CMD": "url", "TITLE": "Trello", "URL": "ext+container:name=Work\u0026url=https://trello.com/" } }, "cmd": { "arg": "", "subtitle": "Other Actions…", "icon": { "path": "icons/more.png" }, "variables": { "ACTION": "Open in Firefox", "CMD": "actions", "TITLE": "Trello", "URL": "ext+container:name=Work\u0026url=https://trello.com/" } } } } ] } [18:13:09.351] Firefox Assistant[Script Filter] Processing complete [18:13:09.365] Firefox Assistant[Script Filter] Passing output 'ext+container:name=Work&url=https://trello.com/' to Debug [18:13:09.367] Firefox Assistant[Debug] . /------------------------\ query=ext+container:name=Work&url=https://trello.com/ variables={ ACTION = "Open in Firefox" AW_SESSION_ID = "IOVZPI25Z9TVGHASZJG0334I" CMD = "url" TAB_CTRL = "" TAB_GODOC = "" TITLE = "Trello" URL = "ext+container:name=Work&url=https://trello.com/ URL_DEFAULT = "Open in Firefox" URL_OPT = "Open in Safari" } \------------------------/ [18:13:09.368] Firefox Assistant[Debug] Processing complete [18:13:09.369] Firefox Assistant[Debug] Passing output 'ext+container:name=Work&url=https://trello.com/' to Conditional [18:13:09.370] Firefox Assistant[Conditional] Processing complete [18:13:09.371] Firefox Assistant[Conditional] Passing output 'ext+container:name=Work&url=https://trello.com/' to Hide Alfred [18:13:09.387] Firefox Assistant[Hide Alfred] Processing complete [18:13:09.388] Firefox Assistant[Hide Alfred] Passing output 'ext+container:name=Work&url=https://trello.com/' to Debug [18:13:09.389] Firefox Assistant[Debug] . /------------------------\ query=ext+container:name=Work&url=https://trello.com/ variables={ ACTION = "Open in Firefox" AW_SESSION_ID = "IOVZPI25Z9TVGHASZJG0334I" CMD = "url" TAB_CTRL = "" TAB_GODOC = "" TITLE = "Trello" URL = "ext+container:name=Work&url=https://trello.com/ URL_DEFAULT = "Open in Firefox" URL_OPT = "Open in Safari" } \------------------------/ [18:13:09.391] Firefox Assistant[Debug] Processing complete [18:13:09.392] Firefox Assistant[Debug] Passing output 'ext+container:name=Work&url=https://trello.com/' to Run Script [18:13:09.470] ERROR: Firefox Assistant[Run Script] 18:13:09 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A 🍺 18:13:09 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------ 18:13:09 actions.go:83: loaded URL action "Open in Default Application" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Default Application.sh" 18:13:09 actions.go:83: loaded URL action "Open in Firefox" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Firefox.sh" 18:13:09 actions.go:83: loaded URL action "Open in Safari" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Safari.sh" 18:13:09 actions.go:83: loaded URL action "Open in Chrome" from "~/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Chrome.sh" 18:13:09 client.go:402: running action "Open in Firefox" on URL "ext+container:name=Work&url=https://trello.com/" ... 18:13:09 rpc_client.go:28: RPC client connected to "Firefox Developer Edition" 18:13:09 scripts.go:164: ------------- [/Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/scripts/Open in Firefox.sh ext+container:name=Work&url=https://trello.com/] --------------- 18:13:09 scripts.go:165: The file /Users/pyrho/SynologyDrive/alfred_settings/Alfred.alfredpreferences/workflows/user.workflow.CCCFFD09-B571-499E-B8C4-B608C1FC116A/ext+container:name=Work&url=https:/trello.com/ does not exist. 18:13:09 scripts.go:166: ---------------------------------------------- 18:13:09 workflow.go:342: ------------------ FATAL ERROR ------------------- 18:13:09 workflow.go:343: exit status 1 : goroutine 1 [running]: runtime/debug.Stack(0xc00014fd00, 0x1, 0x1) /usr/local/opt/go/libexec/src/runtime/debug/stack.go:24 +0x9d github.com/deanishe/awgo.(*Workflow).Run.func2(0xc00013c000) /Users/daj/pkg/mod/github.com/deanishe/awgo@v0.22.1/workflow.go:343 +0xe7 panic(0x14953e0, 0xc0000b4b80) /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(0xc00013c000, 0x14d4a18) /Users/daj/pkg/mod/github.com/deanishe/awgo@v0.22.1/workflow.go:357 +0x2af main.main() /Users/daj/Code/Alfred/alfred-firefox-assistant/main.go:149 +0x39 18:13:09 workflow.go:344: ---------------- END STACK TRACE ----------------- 18:13:09 workflow.go:375: [ERROR] exit status 1 18:13:09 workflow.go:378: Get help at https://github.com/deanishe/alfred-firefox/issues 18:13:09 workflow.go:401: ------------------ 23.448532ms ------------------- ```

Let me know if you need more information ! Thanks.

deanishe commented 4 years ago

but it breaks when using this workflow.

The workflow just passes the URL to /usr/bin/open, and it’s not a URL scheme that the system recognises.

pyrho commented 4 years ago

Ah, too bad then :) Thanks.

deanishe commented 4 years ago

Ah, too bad then :)

I'll look into adding a workflow command to open a URL (which would probably be a better solution than using /usr/bin/open for a few reasons). But I'm not sure if it will work with such URLs: If I enter one in Firefox's URL bar, it treats it as a search query.

pyrho commented 4 years ago

Ah, too bad then :)

I'll look into adding a workflow command to open a URL (which would probably be a better solution than using /usr/bin/open for a few reasons). But I'm not sure if it will work with such URLs: If I enter one in Firefox's URL bar, it treats it as a search query.

It works for me, maybe you need the Multi-Account container extension explicitely enabled (I don't recall what the default state is).

deanishe commented 4 years ago

maybe you need the Multi-Account container extension explicitely enabled

If you mean this extension, then I do have it enabled.

Do you have a link to the documentation for the container-specific URLs?

EDIT: The feature is actually provided by this extension, isn't it?

pyrho commented 4 years ago

🤦

Indeed, I installed it long ago and didn't even remember.

Sorry for the noise.

vikaskedia commented 3 years ago

@deanishe any interst in supporting https://addons.mozilla.org/en-US/firefox/addon/open-url-in-container/ I will make a pull request if you are interested ?

BTW your alfred workflow is the reason I pay for alfred and left chrome