woodruffw / ff2mpv

A Firefox/Chrome add-on for playing URLs in mpv.
https://addons.mozilla.org/en-US/firefox/addon/ff2mpv/
Other
492 stars 51 forks source link

[Help] NativeMessagingHosts in Vivaldi Windows? #103

Closed bachig26 closed 7 months ago

bachig26 commented 11 months ago

I couldn't able to find the NativeMessagingHosts in the Windows version of Vivaldi Browser.

Example: the directory HKEY_CURRENT_USER\SOFTWARE\Vivaldi\NativeMessagingHosts is not available.

I need help in finding it or anyway where I can added the .json to the Registry.

woodruffw commented 11 months ago

Thanks for opening an issue. Could you please fill out the bug report template? That template contains useful information to help us triage your report; without it, we won't be able to help.

woodruffw commented 11 months ago

Also: did you use the installation script? That script is currently the only "official" way to install ff2mpv; doing a manual installation is not recommended.

If you did you the script and got an error, please paste the entire error.

bachig26 commented 11 months ago

Also: did you use the installation script? That script is currently the only "official" way to install ff2mpv; doing a manual installation is not recommended.

If you did you the script and got an error, please paste the entire error.

I didn't get any error, and also installed via ps script but it doesn't work for me.

    .\install.ps1 chrome

    Registry key found with value:
    C:\ff2mpv\ff2mpv-viv_win.json
    Overriding with: C:\ff2mpv\ff2mpv\ff2mpv-windows-chrome.json

    Hive: HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\NativeMessagingHosts

    Name                           Property
    ----                           --------
    ff2mpv                         (default) : C:\ff2mpv\ff2mpv\ff2mpv-windows-chrome.json

    Found "py" launcher

    Creating JSON for chrome browser...

    DONE!    
woodruffw commented 11 months ago
.\install.ps1 chrome

This is probably incorrect -- you probably need to pass in custom-chromium, since that's what Vivaldi is.

It looks like the right registry path is Software\Vivaldi\NativeMessagingHosts under HKCU. You may need to create that subkey if it doesn't already exist; I'm not sure how Vivaldi does things.

From a quick look online, it looks like Vivaldi has had some bugs in the past with using the wrong registry subkeys (and that other people have struggled to get native messaging to work correctly in it). Do other native extensions work for you?

bachig26 commented 11 months ago
.\install.ps1 chrome

This is probably incorrect -- you probably need to pass in custom-chromium, since that's what Vivaldi is.

It looks like the right registry path is Software\Vivaldi\NativeMessagingHosts under HKCU. You may need to create that subkey if it doesn't already exist; I'm not sure how Vivaldi does things.

the Vivaldi doesn't have registry path for NativeMessagingHosts uder HKCU, I heard that it may use the NativeMessagingHosts from the Software\Google\Chrome\NativeMessagingHosts, so I added the key there.

and I ran the .\install.ps1 chrome chrome cmd instead of a custom cmd.

From a quick look online, it looks like Vivaldi has had some bugs in the past with using the wrong registry subkeys (and that other people have struggled to get native messaging to work correctly in it). Do other native extensions work for you?

yes, other's work fine.

woodruffw commented 11 months ago

yes, other's work fine.

Okay. Are you able to see which registry subkey those show up under? Are they under the Software\Google\Chrome subkey?

bachig26 commented 11 months ago

yes, other's work fine.

Okay. Are you able to see which registry subkey those show up under? Are they under the Software\Google\Chrome subkey?

Computer\HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\NativeMessagingHosts\ff2mpv

ffmpv.zip

i don't if this what you're referring to?

woodruffw commented 11 months ago

i don't if this what you're referring to?

Nope, I meant the other native extensions you have installed, not ff2mpv. Can you see which subkey those are recorded under?

bachig26 commented 11 months ago

i don't if this what you're referring to?

Nope, I meant the other native extensions you have installed, not ff2mpv. Can you see which subkey those are recorded under?

oh yes, i didn't see the question clearly... my mind is completely blank, couldn't think properly.

i'll let you know as soon as i found them. thanks.

bachig26 commented 11 months ago

i don't if this what you're referring to?

Nope, I meant the other native extensions you have installed, not ff2mpv. Can you see which subkey those are recorded under?

i couldn't able to find them, but I found the extensions with their identifier under HKEY_CURRENT_USER\SOFTWARE\Vivaldi\PreferenceMACs\Default\extensions.settings but they aren't clear on subkey that we need.

woodruffw commented 11 months ago

Okay, thanks for checking. I'm not a Windows user, so I'm now officially out of ideas 🙂. I'll leave this open, and we'll see if some of the other Windows users/contributors have thoughts.

DanSM-5 commented 9 months ago

I install Vivaldi in windows 11 and I can confirm ff2mpv works using the Google Chrome registry entry.

yes, other's work fine.

Okay. Are you able to see which registry subkey those show up under? Are they under the Software\Google\Chrome subkey?

Computer\HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\NativeMessagingHosts\ff2mpv

ffmpv.zip

i don't if this what you're referring to?

So, the reg key you uploaded has the following

[HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\NativeMessagingHosts\ff2mpv]
@="C:\\ff2mpv\\ff2mpv-viv_win.json"

The name ff2mpv-viv_win.json isn't a filename that the scripts can generate. If that's the value that you have setup in the registry entry, it is likely to be the reason why it doesn't work.

For Chrome the filename should be ff2mpv-windows-chrome.json. You can verify this by running this command in powershell

Get-Item 'Registry::HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\NativeMessagingHosts\ff2mpv'

One more thing that could cause issues is the path for the registry key. The install script assumes that your browser creates the appropriate entries in the registry and it only creates NativeMessagingHosts and ff2mpv if they don't exists. However if you plan to install for Chrome without having Chrome, then you need to manually create the entries in HKEY_CURRENT_USER\SOFTWARE for Google\Chrome if those doesn't exist.

woodruffw commented 7 months ago

Closing as likely solved. Thanks for helping debug here @DanSM-5.