open-in icon indicating copy to clipboard operation
open-in copied to clipboard

"open in chrome" for chromium is not working in firefox.

Open Jerrk opened this issue 4 years ago • 7 comments

Chromium Version: 89.0.4342.0 Firefox Version: 85.0a1 (nightly) Native client: 0.9.1

This works perfectly fine on my desktop but i am having issues on my laptop for some reason.

My chromium installation is in located in "C:\Program Files\Chromium\64\bin\chrome.exe" and is set as the Path in the extension without the quotes.

"check connection" is all green and announces the native client version as 0.9.1

"open in firefox" works perfectly fine from the chromium application.

i would really like some clarification on this point

If the path to the executable is correct and the native client is connected, you can debug the connection by enabling console logs in Chrome and Opera or Firefox.

not quite sure how to troubleshoot this issue.

Jerrk avatar Dec 02 '20 15:12 Jerrk

The path on the options page does not require quotations. To make sure the path is correct, close all Chromium instances and run the following command in cmd.exe and press the Enter key. If a new Chromium window opens, then we need to debug the extension.

"C:\Program Files\Chromium\64\bin\chrome.exe"

andy-portmen avatar Dec 03 '20 05:12 andy-portmen

The path on the options page does not require quotations. To make sure the path is correct, close all Chromium instances and run the following command in cmd.exe and press the Enter key. If a new Chromium window opens, then we need to debug the extension.

"C:\Program Files\Chromium\64\bin\chrome.exe"

there are no quotes in the options page.

closing all chromium instances and running the command in cmd works like normal and opens chromium with no issue.

Jerrk avatar Dec 03 '20 08:12 Jerrk

What do you get in the browser console (Ctrl + Shift + J) when the page opening is requested?

andy-portmen avatar Dec 03 '20 09:12 andy-portmen

I launched firefox in a new profile with nothing but the add-on installed and the path to chrome changed.

On https://www.youtube.com/ and clicking on "open in chrome" this is the output of the firefox console.

stderr output from native app com.add0n.node: C:\Users\Jerrk\AppData\Local\com.add0n.node\host.js:162
stderr output from native app com.add0n.node:     sp.stdout.on('data', data => stdout += data);
stderr output from native app com.add0n.node:               ^
stderr output from native app com.add0n.node: 
stderr output from native app com.add0n.node: TypeError: Cannot read property 'on' of undefined
stderr output from native app com.add0n.node:     at Transform.observe [as handler] (C:\Users\Jerrk\AppData\Local\com.add0n.node\host.js:162:15)
stderr output from native app com.add0n.node:     at Transform._transform (C:\Users\Jerrk\AppData\Local\com.add0n.node\messaging.js:107:8)
stderr output from native app com.add0n.node:     at Transform._read (_stream_transform.js:190:10)
stderr output from native app com.add0n.node:     at Transform._write (_stream_transform.js:178:12)
stderr output from native app com.add0n.node:     at doWrite (_stream_writable.js:415:12)
stderr output from native app com.add0n.node:     at writeOrBuffer (_stream_writable.js:399:5)
stderr output from native app com.add0n.node:     at Transform.Writable.write (_stream_writable.js:299:11)
stderr output from native app com.add0n.node:     at Input.ondata (_stream_readable.js:709:20)
stderr output from native app com.add0n.node:     at Input.emit (events.js:198:13)
stderr output from native app com.add0n.node:     at addChunk (_stream_readable.js:288:12)
null ExtensionCommon.jsm:742
    normalizeError resource://gre/modules/ExtensionCommon.jsm:742
    withLastError resource://gre/modules/ExtensionCommon.jsm:762
    wrapPromise resource://gre/modules/ExtensionCommon.jsm:833
    (Async: promise callback)
    wrapPromise resource://gre/modules/ExtensionCommon.jsm:815
    callAsyncFunction resource://gre/modules/ExtensionCommon.jsm:1093
    callAsyncFunction resource://gre/modules/ExtensionChild.jsm:720
    callAndLog resource://gre/modules/ExtensionChild.jsm:696
    callAsyncFunction resource://gre/modules/ExtensionChild.jsm:719
    stub resource://gre/modules/Schemas.jsm:2690
    exec moz-extension://1e55028c-f967-4188-85cb-d4563762af34/common.js:51
    open moz-extension://1e55028c-f967-4188-85cb-d4563762af34/common.js:105
    apply self-hosted:2644
    applySafeWithoutClone resource://gre/modules/ExtensionCommon.jsm:616
    applySafe resource://gre/modules/ExtensionCommon.jsm:599
    applySafe self-hosted:1161
    wrapPromise resource://gre/modules/ExtensionCommon.jsm:829
    (Async: promise callback)
    wrapPromise resource://gre/modules/ExtensionCommon.jsm:815
    callAsyncFunction resource://gre/modules/ExtensionCommon.jsm:1093
    callAsyncFunction resource://gre/modules/ExtensionChild.jsm:720
    callAndLog resource://gre/modules/ExtensionChild.jsm:696
    callAsyncFunction resource://gre/modules/ExtensionChild.jsm:719
    stub resource://gre/modules/Schemas.jsm:2690
    open moz-extension://1e55028c-f967-4188-85cb-d4563762af34/common.js:84
    <anonymous> moz-extension://1e55028c-f967-4188-85cb-d4563762af34/common.js:145
    apply self-hosted:2644
    applySafeWithoutClone resource://gre/modules/ExtensionCommon.jsm:616
    wrapPromise resource://gre/modules/ExtensionCommon.jsm:825
    (Async: promise callback)
    wrapPromise resource://gre/modules/ExtensionCommon.jsm:815
    callParentAsyncFunction resource://gre/modules/ExtensionChild.jsm:864
    callAsyncFunction resource://gre/modules/ExtensionChild.jsm:621
    stub resource://gre/modules/Schemas.jsm:2690
    <anonymous> moz-extension://1e55028c-f967-4188-85cb-d4563762af34/common.js:142
    apply self-hosted:2644
    applySafeWithoutClone resource://gre/modules/ExtensionCommon.jsm:616
    fire resource://gre/modules/ExtensionChild.jsm:806
    withHandlingUserInput resource://gre/modules/ExtensionCommon.jsm:119
    recvRunListener resource://gre/modules/ExtensionChild.jsm:809
    recvRunListener self-hosted:1161
    _recv resource://gre/modules/ConduitsChild.jsm:78
    receiveMessage resource://gre/modules/ConduitsChild.jsm:184
    (Async: JSActor query)
    _send resource://gre/modules/ConduitsChild.jsm:61
    _send resource://gre/modules/ConduitsParent.jsm:228
    _send self-hosted:1265
    listener resource://gre/modules/ExtensionParent.jsm:1001
    apply self-hosted:2644
    applySafeWithoutClone resource://gre/modules/ExtensionCommon.jsm:616
    applySafe resource://gre/modules/ExtensionParent.jsm:508
    sync resource://gre/modules/ExtensionCommon.jsm:2405
    listener chrome://browser/content/parent/ext-browserAction.js:667
    withPendingBrowser resource://gre/modules/ExtensionParent.jsm:489
    listener chrome://browser/content/parent/ext-browserAction.js:666
    emit resource://gre/modules/ExtensionCommon.jsm:326
    onViewShowing chrome://browser/content/parent/ext-browserAction.js:304
    aEventName resource:///modules/CustomizableUI.jsm:2863
    dispatchCustomEvent resource:///modules/PanelMultiView.jsm:197
    dispatchCustomEvent resource:///modules/PanelMultiView.jsm:1404
    _blockersPromise resource:///modules/PanelMultiView.jsm:231
    (Async: promise callback)
    dispatchAsyncEvent resource:///modules/PanelMultiView.jsm:229
    _openView resource:///modules/PanelMultiView.jsm:835
    _showMainView resource:///modules/PanelMultiView.jsm:801
    _openPopupPromise resource:///modules/PanelMultiView.jsm:537
    (Async: promise callback)
    openPopup resource:///modules/PanelMultiView.jsm:520
    openPopup resource:///modules/PanelMultiView.jsm:284
    showSubView chrome://browser/content/customizableui/panelUI.js:516
    handleWidgetCommand resource:///modules/CustomizableUI.jsm:1929
    handleWidgetCommand self-hosted:1265
Unchecked lastError value: Error: An unexpected error occurred common.js:51
    exec moz-extension://1e55028c-f967-4188-85cb-d4563762af34/common.js:51
stderr output from native app com.add0n.node: events.js:174
stderr output from native app com.add0n.node:       throw er; // Unhandled 'error' event
stderr output from native app com.add0n.node:       ^
stderr output from native app com.add0n.node: 
stderr output from native app com.add0n.node: Error [ERR_MULTIPLE_CALLBACK]: Callback called multiple times
stderr output from native app com.add0n.node:     at Transform.afterTransform (_stream_transform.js:85:31)
stderr output from native app com.add0n.node:     at Transform.observe [as handler] (C:\Users\Jerrk\AppData\Local\com.add0n.node\host.js:432:5)
stderr output from native app com.add0n.node:     at Transform._transform (C:\Users\Jerrk\AppData\Local\com.add0n.node\messaging.js:107:8)
stderr output from native app com.add0n.node:     at Transform._read (_stream_transform.js:190:10)
stderr output from native app com.add0n.node:     at Transform._write (_stream_transform.js:178:12)
stderr output from native app com.add0n.node:     at doWrite (_stream_writable.js:415:12)
stderr output from native app com.add0n.node:     at writeOrBuffer (_stream_writable.js:399:5)
stderr output from native app com.add0n.node:     at Transform.Writable.write (_stream_writable.js:299:11)
stderr output from native app com.add0n.node:     at Input.ondata (_stream_readable.js:709:20)
stderr output from native app com.add0n.node:     at Input.emit (events.js:198:13)
stderr output from native app com.add0n.node: Emitted 'error' event at:
stderr output from native app com.add0n.node:     at errorOrDestroy (internal/streams/destroy.js:107:12)
stderr output from native app com.add0n.node:     at Transform.onerror (_stream_readable.js:733:7)
stderr output from native app com.add0n.node:     at Transform.emit (events.js:198:13)
stderr output from native app com.add0n.node:     at Transform.afterTransform (_stream_transform.js:85:17)
stderr output from native app com.add0n.node:     at Transform.observe [as handler] (C:\Users\Jerrk\AppData\Local\com.add0n.node\host.js:432:5)
stderr output from native app com.add0n.node:     [... lines matching original stack trace ...]
stderr output from native app com.add0n.node:     at writeOrBuffer (_stream_writable.js:399:5)

Jerrk avatar Dec 03 '20 09:12 Jerrk

I have no idea what is wrong. From the log, it looks like that the NodeJS is not supporting stdout.on but you have already tried to use the extension on the same machine so the NodeJS works as expected. I first thought the std is blocked, but you've got the green confirmation which means that the extension sees the NodeJS executable just fine.

andy-portmen avatar Dec 03 '20 13:12 andy-portmen

We have already confirmed that the executable path is correct. Anyhow you can also set this path in the Chromium options page, and the extension should open a new tab in the same browser if everything is fine.

andy-portmen avatar Dec 03 '20 13:12 andy-portmen

~~this might be where an issue is~~

~~> We have already confirmed that the executable path is correct. Anyhow you can also set this path in the Chromium options page, and the extension should open a new tab in the same browser if everything is fine.~~

~~When i do this within my chromium browser it does not open a new tab with the same url, but it launches a new chromium instance within a different profile chrome://version corroborates this as well, i'll do some digging and see if this might be the issue.~~

i fixed an issue that had to do with the location of the chromium profile depending on how i started the browser, i.e some shortcut had a variable to choose a different profile location.

Having fixed that and it now opening the same tab in the same browser window within chromium, it still doesn't work when trying to open from firefox.

I also tried "open in chrome" within the edge browser, same issue as in firefox where nothing happens even with the correct path to chromium.

Jerrk avatar Dec 04 '20 03:12 Jerrk