Jump to content

Firefox Assistant


Recommended Posts

I don't know exactly what this info implies, so I'm pasting the part from the log file that lists the first occurrence of the  "dial unix" error. That Firefox extension debugger is totally beyond me. Is there some info from it I should post to shed light on the error? Should I post more of the log file?

 

18:51:57 [warning] info.plist not found. Guessed: /Users/e/Documents/var/computing/MacOS/Alfred/GRAY16/Alfred.alfredpreferences/workflows/user.workflow.159A6778-728D-47CD-8977-213AB04106F0
18:51:57 ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------
18:51:57 loaded URL action "Open in Firefox" from "~/Documents/var/computing/MacOS/Alfred/GRAY16/Alfred.alfredpreferences/workflows/user.workflow.159A6778-728D-47CD-8977-213AB04106F0/scripts/Open in Firefox.sh"
18:51:57 loaded URL action "Open in Safari" from "~/Documents/var/computing/MacOS/Alfred/GRAY16/Alfred.alfredpreferences/workflows/user.workflow.159A6778-728D-47CD-8977-213AB04106F0/scripts/Open in Safari.sh"
18:51:57 loaded URL action "Open in Chrome" from "~/Documents/var/computing/MacOS/Alfred/GRAY16/Alfred.alfredpreferences/workflows/user.workflow.159A6778-728D-47CD-8977-213AB04106F0/scripts/Open in Chrome.sh"
18:51:57 loaded URL action "Open in Default Application" from "~/Documents/var/computing/MacOS/Alfred/GRAY16/Alfred.alfredpreferences/workflows/user.workflow.159A6778-728D-47CD-8977-213AB04106F0/scripts/Open in Default Application.sh"
18:51:57 7.14249s since last check for update
18:51:57 searching bookmarks for "wor" ...
18:51:57 [ERROR] dial unix /tmp/alfred-firefox.501.sock: connect: no such file or directory
18:51:57 ------------------ FATAL ERROR -------------------
18:51:57 Cannot Connect to Extension : goroutine 1 [running]:
runtime/debug.Stack(0xc00011d990, 0x1, 0x1)
	/usr/local/opt/go/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/deanishe/awgo.(*Workflow).Run.func2(0xc00014c000)
	/Users/daj/pkg/mod/github.com/deanishe/awgo@v0.22.1/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(0xc0000d2030, 0x0, 0x0, 0x0, 0x0)
	/Users/daj/Code/Alfred/alfred-firefox-assistant/client.go:249 +0xc1
github.com/peterbourgon/ff/ffcli.(*Command).Run(0x1831c40, 0xc0000d2030, 0x0, 0x0, 0x183a601, 0x2)
	/Users/daj/pkg/mod/github.com/peterbourgon/ff@v1.7.1-0.20200101221212-72e429b6ad42/ffcli/command.go:96 +0x248
github.com/peterbourgon/ff/ffcli.(*Command).Run(0x1832500, 0xc0000d2010, 0x3, 0x3, 0x14b6453, 0x9)
	/Users/daj/pkg/mod/github.com/peterbourgon/ff@v1.7.1-0.20200101221212-72e429b6ad42/ffcli/command.go:90 +0x1f1
main.run()
	/Users/daj/Code/Alfred/alfred-firefox-assistant/main.go:144 +0x191
github.com/deanishe/awgo.(*Workflow).Run(0xc00014c000, 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:51:57 ---------------- END STACK TRACE -----------------

 

Link to post
  • Replies 86
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Like Safari Assistant, but for Firefox.     Download from GitHub.   Search Firefox bookmarks Search Firefox browsing history Run bookmarklets Activa

Thanks! I don't have Developer Tools installed, but allowing individual workflows seems to have fixed the problem. It's great to finally see an Alfred workflow for Firefox! Much appreciated!

I think I’ve commented this before, but I’m pretty sure the “right-click and pick Open” method also works for binaries. It’s way faster and more straightforward than having to tun off Gatekeeper and g

Posted Images

32 minutes ago, JimmyTheSaint said:

I don't know exactly what this info implies

 

It means exactly what the Firefox extension is telling you: the extension is not connected to the workflow.

 

33 minutes ago, JimmyTheSaint said:

Is there some info from it I should post to shed light on the error?

 

The problem is at the Firefox/extension end, so that's where any useful error message will be.

Link to post

Can you help determine how to connect the extension to the workflow or what's preventing the extension from connecting to the workflow at the Firefox end? Not being a programmer, I don't have the first idea of what a stack trace is saying. I can follow instructions. I also have a second laptop set up almost identically, and it's got exactly the same error, so there's no new information there.

Link to post
14 minutes ago, JimmyTheSaint said:

Not being a programmer, I don't have the first idea of what a stack trace is saying

 

Not being psychic, I don't have the first idea what an error message I've never seen is saying.

 

If you're not going to open the open the Firefox extension debugger and tell me what it says, you're on your own.

Link to post

I was only guessing that a "stack trace" was important. I had no idea the extension debugger was the important one because when I opened it, it seemed to show a lot less information than the log. Now I see if I click on the part on the left side that says "JS alfred.js" it shows a lot of info. I'm pasting that info here:

/* global browser */

/**
 * Name of native application according to application manifest.
 * @var {string} appName
 */
const appName = 'net.deanishe.alfred.firefox';

const iconConnected = 'icons/bowler.svg';
const iconDisconnected = 'icons/bowler-red.svg';

/**
 * Tab object.
 * @param {tabs.Tab} tab - Native tab object to create Tab from.
 * @return {Object} - API Tab object.
 */
const Tab = tab => {
  let obj = {};

  tab = tab || {};

  obj.id         = tab.id          || 0;
  obj.windowId   = tab.windowId    || 0;
  obj.index      = tab.index       || 0;
  obj.title      = tab.title       || '';
  obj.url        = new URL(tab.url || '');
  // obj.favicon = tab.favIconUrl  || '';
  obj.active     = tab.active      || false;

  obj.toString = function() {
    return `#${this.id} (${this.windowId}x${this.index}) "${this.title}" - ${this.url}`;
  };

  return obj;
};

/**
 * Bookmark object.
 * @param {bookmarks.BookmarkTreeNode} bm - Native object to create Bookmark from.
 * @return {Object} - API Bookmark object.
 */
const Bookmark = bm => {
  let obj = {};
  bm = bm || {};

  obj.id       = bm.id       || 0;
  obj.index    = bm.index    || 0;
  obj.title    = bm.title    || '';
  obj.parentId = bm.parentId || 0;
  obj.type     = bm.type     || '';
  obj.url      = bm.url      || '';

  obj.toString = function() {
    return `#${this.id} "${this.title}" - ${this.url}`;
  };

  return obj;
};

/**
 * HistoryEntry object.
 * @param {history.HistoryItem} hi - Native object to create HistoryEntry from.
 * @return {Object} - API History object.
 */
const HistoryEntry = hi => {
  let obj = {};
  hi = hi || {};

  obj.id    = hi.id    || 0;
  obj.url   = hi.url   || '';
  obj.title = hi.title || hi.url;

  obj.toString = function() {
    return `#${this.id} "${this.title}" - ${this.url}`;
  };

  return obj;
};

/**
 * Download object.
 * @param {downloads.DownloadItem} di - Native object to create Download from.
 * @return {Object} - API Download object.
 */
const Download = di => {
  let obj = {};
  di = di || {};

  obj.id     = di.id       || 0;
  obj.path   = di.filename || '';
  obj.size   = di.fileSize || 0;
  obj.url    = di.url      || '';
  obj.mime   = di.mime     || '';
  obj.exists = di.exists   || false;
  obj.error  = di.error    || '';

  obj.toString = function() {
    return `#${this.id} "${this.path}" - ${this.url}`;
  };

  return obj;
};

/**
 * Extension application object.
 * @constructor
 */
const Background = function() {
  const self = this;

  self.port = null,
    self.nativePort = null,
    self.connected = false;

  self.onConnected = port => {
    self.port = port;
    port.onMessage.addListener(self.receive);
    console.debug('connected to popup');
  };

  self.send = msg => {
    self.port.postMessage(msg);
    console.debug('sent message', msg);
  };

  self.receive = msg => {
    console.debug('received message', msg);
    if ('command' in msg) {
      switch (msg.command) {
        case 'status':
          self.send({ status: self.connected ? 'connected' : 'disconnected' });
          return;
        case 'reconnect':
          console.debug('reconnecting to native app ...');
          self.connectNative();
          return;
        case 'reload':
          console.debug('reloading extension ...');
          browser.runtime.reload();
          return;
      }
    }
  };

  self.connectNative = () => {
    self.connected = false;

    let listener = payload => {
      if (!self.connected) {
        self.connected = true;
        // self.nativePort.onDisconnect.removeListener(self.connectNativeFailed);
        self.onConnectedNative();
      }
      self.receiveNative(payload);
    };

    self.nativePort = browser.runtime.connectNative(appName);
    self.nativePort.onMessage.addListener(listener);
    self.nativePort.onDisconnect.addListener(self.connectNativeFailed);
  };

  /**
   * Callback for connection failure.
   * Logs an error message to the console.
   */
  self.connectNativeFailed = port => {
    let msg = '';
    if (port.error) {
      msg = port.error.message;
    }
    self.connected = false;
    console.error(`native client connection failed: ${msg}`);
    browser.browserAction.setIcon({ path: iconDisconnected });
  };

  /**
   * Callback for successful connection to native application.
   * Logs a message to the console.
   */
  self.onConnectedNative = () => {
    console.log('connected to native client');
    browser.browserAction.setIcon({ path: iconConnected });
  };

  /**
   * Handle commands from native application.
   * @param {Object} msg - Data from native application.
   * @param {string} msg.id - Command/response ID.
   * @param {Object} msg.params - Arguments to command.
   */
  self.receiveNative = msg => {
    console.log(`received:`, msg);
    let p = null;
    if ('command' in msg) {
      switch (msg.command) {
        case 'ping':
          p = self.ping();
          break;
        // case 'all-windows':
        //   p = self.allWindows();
        //   break;
        // case 'current-window':
        //   p = self.currentWindow();
        //   break;
        case 'all-tabs':
          p = self.allTabs();
          break;
        // DEPRECATED - replaced by self.tab(); unused by newer
        // versions 0.2.0+ of workflow
        // Remove from future versions
        case 'current-tab':
          p = self.tab(0);
          break;
        case 'tab':
          p = self.tab(msg.params);
          break;
        case 'all-bookmarks':
          p = self.allBookmarks();
          break;
        case 'search-bookmarks':
          p = self.searchBookmarks(msg.params);
          break;
        case 'search-history':
          p = self.searchHistory(msg.params);
          break;
        case 'search-downloads':
          p = self.searchDownloads(msg.params);
          break;
        case 'activate-tab':
          p = self.activateTab(msg.params);
          break;
        case 'close-tabs-left':
          p = self.closeTabsLeft(msg.params);
          break;
        case 'close-tabs-right':
          p = self.closeTabsRight(msg.params);
          break;
        case 'close-tabs-other':
          p = self.closeTabsOther(msg.params);
          break;
        case 'execute-js':
          p = self.executeJS(msg.params);
          break;
        case 'run-bookmarklet':
          p = self.runBookmarklet(msg.params);
          break;
        case 'open-incognito':
          p = self.openIncognito(msg.params);
          break;
        default:
          console.error(`unknown command: ${msg.command}`);
          self.sendError(msg.id, 'unknown command');
          return;
      }
      p.then(payload => {
        self.sendNative({ id: msg.id, payload: payload });
      }).catch(err => {
        self.sendError(msg.id, err.message);
      });
    } else {
      self.sendError(msg.id, 'no command given');
    }
  };

  /**
   * Send response to native application.
   * @param {Object} msg - Data to send to native application.
   * @param {string} msg.id - Command/response ID.
   * @param {string|bool|Object} msg.payload - Actual response data.
   * @param {string} msg.error - Error message if command failed.
   */
  self.sendNative = msg => {
    if (self.nativePort) {
      self.nativePort.postMessage(msg)
        .then(resp => {
          console.log(`sent:`, msg);
          console.log(`response:`, resp);
        })
        .catch(err => {
          console.error(`send error: ${err.message}`);
      });
    }
  };

  /**
   * Send error respones to native application.
   * @param {string} id - Command/response ID.
   * @param {string} msg - Error message.
   */
  self.sendError = (id, msg) => {
    self.sendNative({ id: id, error: msg });
  };

  /**
   * Handle "ping" command.
   * @return {Promise} - Resolves to string "pong".
   */
  self.ping = () => {
    return new Promise(resolve => {
      resolve('pong');
    });
  };

  /**
   * Handle "all-tabs" command.
   * @return {Promise} - Resolves to array of Tab objects for all tabs.
   */
  self.allTabs = () => {
    return browser.tabs.query({}).then(tabs => {
      return tabs.map(t => Tab(t));
    });
  };

  /**
   * Handle "activate-tab" command.
   * @param {number} id - ID of tab to activate.
   */
  self.activateTab = id => {
    return browser.tabs
      .update(id, { active: true })
      .then(() => {
        return browser.tabs.get(id);
      })
      .then(tab => {
        return browser.windows.update(tab.windowId, { focused: true });
      });
  };

  /**
   * Handle "current-tab" command.
   * @return {Promise} - Resolves to Tab for current tab.
   * Throws an error if there is no current tab.
   */
  // self.currentTab = () => {
  //   return self.activeTab(null).then(t => {
  //     if (!t) throw 'no current tab';
  //     let tab = Tab(t);
  //     console.log(`[current-tab] ${tab}`);
  //     return tab;
  //   });
  // };

  /**
   * Handle "tab" command.
   * @param {number} tabId - ID of tab to return.
   * @return {Promise} - Resolves to Tab for current tab.
   * Throws an error if there is no current tab.
   */
  self.tab = tabId => {
    if (!tabId) {
      return self.activeTab(null).then(t => {
        if (!t) throw 'no current tab';
        let tab = Tab(t);
        console.log(`[current-tab] ${tab}`);
        return tab;
      });
    }

    return browser.tabs
      .get(tabId)
      .then(t => {
        return Tab(t);
      })
  };

  /**
   * Handle "all-bookmarks" command.
   * @return {Promise} - Resolves to array of Bookmark objects for all bookmarks
   * and folders.
   */
  self.allBookmarks = () => {
    let bookmarks = [];
    let addBookmarks = node => {
      if (node.url) bookmarks.push(Bookmark(node));
      if (node.children) node.children.map(n => addBookmarks(n));
    };

    return browser.bookmarks.getTree().then(root => {
      addBookmarks(root[0]);
      return bookmarks;
    });
  };

  /**
   * Handle "search-bookmarks" command.
   * @param {string} query - Search query.
   * @return {Promies} - Resolves to array of Bookmark objects matching query.
   */
  self.searchBookmarks = query => {
    return browser.bookmarks.search(query).then(nodes => {
      let bookmarks = nodes.filter(n => n.url).map(n => Bookmark(n));
      console.debug(`${bookmarks.length} bookmark(s) for "${query}"`);
      return bookmarks;
    });
  };

  /**
   * Handle "search-history" command.
   * @param {string} query - Search query.
   * @return {Promies} - Resolves to array of History objects matching query.
   */
  self.searchHistory = query => {
    return browser.history.search({ text: query, startTime: 0 }).then(items => {
      let history = items.filter(it => it.url).map(it => HistoryEntry(it));
      console.debug(`${history.length} history item(s) for "${query}"`);
      return history;
    });
  };

  /**
   * Handle "search-downloads" command.
   * @param {string} query - Search query.
   * @return {Promise} - Resolves to array of Download objects matching query.
   */
  self.searchDownloads = query => {
    return browser.downloads
      .search({
        query: [query],
        exists: true,
      })
      .then(items => {
        console.debug(`${items.length} download(s) for "${query}"`);
        return items.map(it => Download(it));
      });
  };

  /**
   * Handle "close-tabs-left" command.
   * @param {number} tabId - ID of tab whose neighbours to close.
   * @return {Promise} - Result of browser.tabs.remove()
   */
  self.closeTabsLeft = tabId => {
    console.debug(`closing tabs to left of tab #${tabId} ...`);
    let activeTab = null;
    return browser.tabs
      .get(tabId)
      .then(tab => {
        if (!tab) throw 'no current tab';
        activeTab = tab;
        return browser.tabs.query({ windowId: tab.windowId });
      })
      .then(tabs => {
        let ids = tabs.filter(t => t.index < activeTab.index).map(t => t.id);
        return browser.tabs.remove(ids);
      });
  };

  /**
   * Handle "close-tabs-right" command.
   * @param {number} tabId - ID of tabs whose neighbours to close.
   * @return {Promise} - Result of browser.tabs.remove()
   */
  self.closeTabsRight = tabId => {
    console.debug(`closing tabs to right of tab #${tabId} ...`);
    let activeTab = null;
    return browser.tabs
      .get(tabId)
      .then(tab => {
        if (!tab) throw 'no current tab';
        activeTab = tab;
        return browser.tabs.query({ windowId: tab.windowId });
      })
      .then(tabs => {
        let ids = tabs.filter(t => t.index > activeTab.index).map(t => t.id);
        return browser.tabs.remove(ids);
      });
  };

  /**
   * Handle "close-tabs-other" command.
   * @param {number} tabId - ID of window to close tabs in.
   * @return {Promise} - Result of browser.tabs.remove()
   */
  self.closeTabsOther = tabId => {
    console.debug(`closing other tabs in window of tab #${tabId} ...`);
    let activeTab = null;
    return browser.tabs
      .get(tabId)
      .then(tab => {
        activeTab = tab;
        return browser.tabs.query({ windowId: tab.windowId });
      })
      .then(tabs => {
        let ids = tabs.filter(t => t.id !== activeTab.id).map(t => t.id);
        return browser.tabs.remove(ids);
      });
  };

  /** Handle "execute-js" command. */
  // self.executeJS = js => {
  //   return browser.tabs.executeScript({ code: js }).then(results => {
  //     console.debug(`js=${js}, results=`, results);
  //   });
  // };
  /**
   * Handle "execute-js" command.
   * @param {Object} params - Tab and bookmarklet IDs.
   * @param {number} params.tabId - ID of tab to execute JS in.
   * If tabId is 0, JS is executed in the active tab.
   * @param {string} params.js - JavaScript to execute.
   */
  self.executeJS = params => {
    console.debug(`execute-js`, params);
    var p;
    if (params.tabId) {
      p = browser.tabs.executeScript(params.tabId, { code: params.js });
    } else {
      p = browser.tabs.executeScript({ code: params.js });
    }
    return p.then(result => {
      return JSON.stringify(result);
    });
  };

  /**
   * Handle "run-bookmarklet" command.
   * @param {Object} params - Tab and bookmarklet IDs.
   * @param {number} params.tabId - ID of tab to execute bookmarklet in.
   * If tabId is 0, bookmarklet is executed in the active tab.
   * @param {string} params.bookmarkId - ID of bookmarklet to execute.
   */
  self.runBookmarklet = params => {
    console.debug(`run-bookmarklet`, params);
    return browser.bookmarks.get(params.bookmarkId).then(bookmarks => {
      if (!bookmarks.length) throw 'bookmark not found';
      let bm = bookmarks[0];
      if (!bm.url.startsWith('javascript:')) throw 'not a bookmarklet';
      let js = decodeURI(bm.url.slice(11));
      if (params.tabId) browser.tabs.executeScript(params.tabId, { code: js });
      else browser.tabs.executeScript({ code: js });
    });
  };

  /**
   * Handle "open-incognito" command.
   * @param {string} url - URL to open in a new Incognito window.
   * @return {Promise} - Promise that resolves to null.
   */
  self.openIncognito = url => {
    console.debug(`open-incognito ${url}`);
    return browser.windows.create({ incognito: true, url: url });
  };

  /**
   * Return active tab.
   * @param {number} winId - ID of window to get active tab of.
   * If 0 or null, current window is used.
   * @return {Promise} - Promise resolves to null or a tabs.Tab.
   */
  self.activeTab = winId => {
    winId = winId || browser.windows.WINDOW_ID_CURRENT;
    return browser.tabs
      .query({
        active: true,
        windowId: winId,
      })
      .then(tabs => {
        if (tabs.length) return tabs[0];
        return null;
      });
  };

  browser.runtime.onConnect.addListener(self.onConnected);
  self.connectNative();
  console.log(`started`);
};

browser.browserAction.setIcon({ path: iconDisconnected });
new Background();

 

Link to post
1 minute ago, JimmyTheSaint said:

I'm pasting that info here

 

That's not "info", that's the source code of the extension. It's useless.

 

2 minutes ago, JimmyTheSaint said:

it seemed to show a lot less information than the log

 

Open the debugger, then open the extension to make it actually do something. Then post what’s in the “Console” tab of the debugger.

Link to post
5 hours ago, deanishe said:

Open the debugger, then open the extension to make it actually do something. Then post what’s in the “Console” tab of the debugger.

Here's what was generated in the "Console" tab when I opened the extension:

 

[popup] started popup.js:36:11
connected to popup alfred.js:118:13
received message 
Object { command: "status" }
alfred.js:127:13
sent message 
Object { status: "disconnected" }
alfred.js:123:13
[popup] status=disconnected popup.js:14:15
received message 
Object { command: "status" }
alfred.js:127:13
sent message 
Object { status: "disconnected" }
alfred.js:123:13
received message 
Object { command: "reconnect" }
alfred.js:127:13
reconnecting to native app ... alfred.js:134:19
[popup] status=disconnected popup.js:14:15

native client connection failed: alfred.js:172:13
received message 
Object { command: "status" }
alfred.js:127:13
sent message 
Object { status: "disconnected" }
alfred.js:123:13
received message 
Object { command: "reconnect" }
alfred.js:127:13
reconnecting to native app ... alfred.js:134:19
[popup] status=disconnected popup.js:14:15

native client connection failed: 

 

Link to post

I did those two things, but there is no change, with the console listing the same sequence of messages.

 

When I ran ffass, Alfred showed the message, "Registered. Re-open Firefox extension to connect."

When I did the alternative method, I got this stuff posted in the terminal:

Last login: Thu Jul 23 23:54:23 on console
e@GRAY ~ % /Users/e/Documents/var/computing/MacOS/Alfred/GRAY16/Alfred.alfredpreferences/workflows/user.workflow.159A6778-728D-47CD-8977-213AB04106F0/alfred-firefox ; exit;
panic: invalid Workflow environment: alfred_workflow_bundleid is not set, alfred_workflow_cache is not set, alfred_workflow_data is not set

goroutine 1 [running]:
github.com/deanishe/awgo.NewFromEnv(0x0, 0x0, 0xc0001260c0, 0x3, 0x3, 0xc0001260c0)
	/Users/daj/pkg/mod/github.com/deanishe/awgo@v0.22.1/workflow.go:159 +0xbe3
github.com/deanishe/awgo.New(0xc0001260c0, 0x3, 0x3, 0xc0001260a0)
	/Users/daj/pkg/mod/github.com/deanishe/awgo@v0.22.1/workflow.go:149 +0x47
main.init()
	/Users/daj/Code/Alfred/alfred-firefox-assistant/main.go:53 +0x360

[Process completed]



 

Link to post
46 minutes ago, JimmyTheSaint said:

When I did the alternative method, I got this stuff posted in the terminal

 

That's fine. The instructions literally say that you'll get an error:

 

Quote

Finder will probably try to run the binary in Terminal.app and it will throw an error. This is expected.

 

47 minutes ago, JimmyTheSaint said:

I did those two things, but there is no change, with the console listing the same sequence of messages.

 

I don’t know then. There’s nothing in the console log that gives me any clue. There should be some message in there about the native application, and without one I can’t help.

Link to post
  • 4 weeks later...
  • 1 month later...

Hello,

 

I have been using Safari Assistant workflow but lately, I start using Firefox for my main browser. However, I couldn't make Firefox Assistant work. I have been having the same issues and results with JimmyTheSaint. Firefox browser console gives the output below if it is useful. Is there any way to fix it or are there any info that I can provide to solve the issue?

 

I use Mac OS 10.15.6 and Alfred 4.1.1.

 

stderr output from native app net.deanishe.alfred.firefox: /bin/zsh: can't open input file: /Users/Ceyhun/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A/server.sh
stderr output from native app net.deanishe.alfred.firefox: /bin/zsh: can't open input file: /Users/Ceyhun/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A/server.sh

 

On 7/24/2020 at 9:37 AM, deanishe said:

 

That's fine. The instructions literally say that you'll get an error:

 

 

 

I don’t know then. There’s nothing in the console log that gives me any clue. There should be some message in there about the native application, and without one I can’t help.

 

Link to post
1 hour ago, JJJJ said:

Yes I can find server.sh in the same location.

 

/Users/Ceyhun/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A/server.sh

 

What happens when you run that script (you can just paste the path into Terminal/iTerm)?

Link to post
58 minutes ago, deanishe said:

 

What happens when you run that script (you can just paste the path into Terminal/iTerm)?

This is what I get when I run the path in the Terminal.

 

Last login: Tue Sep 22 18:24:05 on ttys000
Ceyhun@Ceyhun-MacBook-Pro ~ % /Users/Ceyhun/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A/server.sh
18:30:54 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/Ceyhun
🍺
18:30:54 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------
18:30:54 server.go:83: signalling existing server 10163 to stop ...
[11082] 18:30:54 server.go:112: couldn't parse app name from ""
[11082] 18:30:54 server.go:129: browser="Firefox"
[11082] 18:30:54 workflow.go:342: ------------------ FATAL ERROR -------------------
[11082] 18:30:54 workflow.go:343: listen unix /tmp/alfred-firefox.501.sock: bind: address already in use : goroutine 1 [running]:
runtime/debug.Stack(0xc000129d00, 0x1, 0x1)
    /usr/local/opt/go/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/deanishe/awgo.(*Workflow).Run.func2(0xc00013a000)
    /Users/daj/pkg/mod/github.com/deanishe/awgo@v0.22.1/workflow.go:343 +0xe7
panic(0x144ef40, 0xc0000b03c0)
    /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(0xc00013a000, 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
[11082] 18:30:54 workflow.go:344: ---------------- END STACK TRACE -----------------
listen unix /tmp/alfred-firefox.501.sock: bind: address already in use[11082] 18:30:54 workflow.go:375: [ERROR] listen unix /tmp/alfred-firefox.501.sock: bind: address already in use
[11082] 18:30:54 workflow.go:378: Get help at https://github.com/deanishe/alfred-firefox/issues
[11082] 18:30:54 workflow.go:401: ------------------ 74.866879ms -------------------
Ceyhun@Ceyhun-MacBook-Pro ~ % /Users/Ceyhun/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A/server.sh
18:30:57 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/Ceyhun
🍺
18:30:57 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------
[11093] 18:30:57 server.go:112: couldn't parse app name from ""
[11093] 18:30:57 server.go:129: browser="Firefox"
[11093] 18:30:57 rpc_server.go:291: serving RPC on "/tmp/alfred-firefox.501.sock" ...
4{"id":"1600788657.1","command":"ping","params":null}[11093] 18:30:57 firefox.go:137: sent command #1600788657.1 - "ping"
[11093] 18:31:02 util.go:57: 5.004087466s ⧗ ping
[11093] 18:31:02 server.go:149: [ERROR] timeout: "1600788657.1"

 

 

 

Link to post
3 hours ago, JJJJ said:

This is what I get when I run the path in the Terminal.

 

Looks more or less correct. It's running, in any case.

 

Could you try:

cd /Users/Ceyhun/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A && env -i ./server.sh

 

Link to post
11 hours ago, deanishe said:

 

Looks more or less correct. It's running, in any case.

 

Could you try:

 


cd /Users/Ceyhun/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A && env -i ./server.sh

 

 

 

Browser extension is still disconnected. This is what I get from Terminal when I run it.

 

Ceyhun@Ceyhun-MacBook-Pro ~ % cd /Users/Ceyhun/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A && env -i ./server.sh
10:09:16 workflow_paths.go:143: [warning] info.plist not found. Guessed: /Users/Ceyhun/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A
🍺
10:09:16 workflow.go:327: ----- Firefox Assistant/0.2.1 (AwGo/0.20.2) ------
10:09:16 actions.go:83: loaded URL action "Open in Chrome" from "~/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A/scripts/Open in Chrome.sh"
10:09:16 actions.go:83: loaded URL action "Open in Default Application" from "~/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A/scripts/Open in Default Application.sh"
10:09:16 actions.go:83: loaded URL action "Open in Firefox" from "~/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A/scripts/Open in Firefox.sh"
10:09:16 actions.go:83: loaded URL action "Open in Safari" from "~/Documents/Alfred.alfredpreferences/workflows/user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A/scripts/Open in Safari.sh"
10:09:16 server.go:83: signalling existing server 11178 to stop ...
[11403] 10:09:16 scripts.go:164: ------------- [lsappinfo info -only name #11389] ---------------
[11403] 10:09:16 scripts.go:165:
[11403] 10:09:16 scripts.go:166: ----------------------------------------------
[11403] 10:09:16 server.go:107: [ERROR] couldn't get app info for pid 11389: exec: "lsappinfo": executable file not found in $PATH
[11403] 10:09:16 server.go:129: browser="Firefox"
[11403] 10:09:16 workflow.go:342: ------------------ FATAL ERROR -------------------
[11403] 10:09:16 workflow.go:343: listen unix /tmp/alfred-firefox.501.sock: bind: address already in use : goroutine 1 [running]:
runtime/debug.Stack(0xc000123d00, 0x1, 0x1)
    /usr/local/opt/go/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/deanishe/awgo.(*Workflow).Run.func2(0xc00014a000)
    /Users/daj/pkg/mod/github.com/deanishe/awgo@v0.22.1/workflow.go:343 +0xe7
panic(0x144ef40, 0xc0001ac140)
    /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(0xc00014a000, 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
[11403] 10:09:16 workflow.go:344: ---------------- END STACK TRACE -----------------
listen unix /tmp/alfred-firefox.501.sock: bind: address already in use[11403] 10:09:16 workflow.go:375: [ERROR] listen unix /tmp/alfred-firefox.501.sock: bind: address already in use
[11403] 10:09:16 workflow.go:378: Get help at https://github.com/deanishe/alfred-firefox/issues
[11403] 10:09:16 workflow.go:401: ------------------ 26.920563ms -------------------
Ceyhun@Ceyhun-MacBook-Pro user.workflow.8B4F305C-811B-43B3-A0D6-0767A3919E2A %

 

Edited by JJJJ
Link to post
1 hour ago, deanishe said:

 

Okay, this is weird.

 

What's your $PATH?

I am not sure if that's what you mean but when I run echo $PATH in Terminal, this is what I get.

 

Ceyhun@Ceyhun-MacBook-Pro ~ % echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin

Edited by JJJJ
Link to post
1 hour ago, deanishe said:

Don’t know what’s going on there. The workflow should be able to find lsappinfo.


In any case, could you try killall alfred-firefox in Terminal, and see if that fixes it.

 

 

killall alfred-firefox command returns as "No matching processes belonging to you were found". So I tried pkill alfred-firefox but it also didn't fix it.

 

Thank you for your interest, perhaps in the next version or smth, it will fix itself somehow.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...