andy-portmen / native-client

Native Messaging component for Windows, Linux, and Mac OS that is written in NodeJS.
https://add0n.com/open-in.html
Mozilla Public License 2.0
727 stars 474 forks source link

Opera fails to run #29

Open GreenWoodie opened 7 years ago

GreenWoodie commented 7 years ago

I have the External Application Button running as an extension of Firefox. I can use the extension to open Firefox, Chrome, Carnary, Edge and Internet Explorer but it fails to open Opera for some reason. Looking at the task manager as I click the button, the first time Opera loads but terminates immediately. On subsequent attempts the node.exe terminates before Opera starts. Further attempts result in or either cmd.exe or conhost.exe terminating almost immediately. This happens in both flavours of Firefox, Stable v55.02 and Nightly v57.01a. (I do admit I run them under Windows 10 Insider build 16273)

Anyway, excellent (web)extension and happy to use your product but curious why Opera is failing.

Also, any chance you will allow us to change the order of the applications after they have been entered?

Thanks

andy-portmen commented 7 years ago

I am using the this method in my "open-in-opera" add-on

  windows: {
    name: 'cmd',
    args: ['/s/c', 'start /d "" opera "%url;"'],
    prgfiles: '%ProgramFiles%\\Opera\\launcher.exe'
  }

Have you tried it?

Also, any chance you will allow us to change the order of the applications after they have been entered?

It should be simple, though I need to think a way to implement this on the options page. I am going to add this into my to-do-list.

GreenWoodie commented 7 years ago

Sorry for the delay acknowledging your response. I have now installed the External Application Button in Chrome and Canary. In both these browsers Opera can be called without problem. In Firefox and Nightly Opera fails to run. As I said, Opera is the only browser that cannot be called from within Firefox.

The entry for Opera is exactly the same in both Chrome and Firefox, added via the Extensions Options Menu in the host browsers. I would say that Opera doesn't have a registry entry pointing to the native client but, there again, neither does Edge or IE, they can both be called without problems. The only problem I have is calling Opera from within Firefox.

I'm not sure how and where to apply the code you have quoted in your earlier reply so any additional suggestions would be appreciated.

andy-portmen commented 7 years ago

The only problem I have is calling Opera from within Firefox.

This is a problem in WebExtension implementation in Firefox. So the native client calls Opera just fine, but when the node executable exists, Opera is being terminated (Opera is a child process of the node and when the parent executable exits, Windows terminates all the child processes). I couldn't find a way to fix this!

GreenWoodie commented 7 years ago

Thanks for the feedback. I will eagerly await a stable Firefox v57 by when, hopefully, API issues will will have resovled and my particular problem fixed. It is a minor annoyance but I use the built in VPN of Opera when I come across websites that have geographic restrictions in Firefox.