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

Installation issue on my second PC #106

Closed JoseHidalgo closed 8 months ago

JoseHidalgo commented 9 months ago

Hi everyone. You may remember me.

A while ago, I have successfully installed ff2mpv on my main rig. Works perfectly with both Firefox and Brave Browser. Now I'm trying to install it on my laptop, to work with Firefox.

All required apps and files were installed, MPV folder was added to Windows PATH, and the .\install.ps1 firefox command went smoothly and without issues. Unfortunately, ff2mpv doesn't work yet: nothing happens when clicking on the ff2mpv icon. However, Firefox console says this:

Screenshot - 16_09_2023 , 23_15_58

Any hints? Thank you.

woodruffw commented 9 months ago

Hello again 🙂

Looks like this is probably a regression with the install.ps1 script; the most recent change was #102. Could you try checking out a copy of install.ps1 before that was merged and seeing if it works?

woodruffw commented 9 months ago

(Also: please remember to fill out the bug report issue template next time. It makes my job much easier when it comes to triaging these reports.)

JoseHidalgo commented 9 months ago

Oh, sorry about not filling out the template. My bad. I need to be more careful with these things. :(

About install.ps1 , I have replaced the install.ps1 file on my laptop with the install.ps1 file from my main rig, which I know worked for me a while ago. Here's the file from my main rig (I have added the .txt suffix to be able to upload it here).

install.ps1.txt

Then of course I have executed the the .\install.ps1 firefox command again. No issues either.

Unfortunately the issue on Firefox remains exactly the same, even after a fresh Firefox restart. Same console error.

JoseHidalgo commented 9 months ago

No hints? Is there anything I could do to give you more info? Thank you.

woodruffw commented 9 months ago

Sorry, no hints from me -- I don't use Windows and the install.ps1 script was contributed by someone else, so I don't have any good tips for debugging here.

CCing @DanSM-5, who might have some ideas here.

DanSM-5 commented 9 months ago

The error in firefox says it couldn't parse a path. It may be either a wrong registry key value or the ff2mpv.bat (encoding issue when it is updated).

@JoseHidalgo could you mention the following:

Could you try this in powershell to get the registry key stored?

Get-Item 'Registry::HKEY_CURRENT_USER\SOFTWARE\Mozilla\NativeMessagingHosts\ff2mpv'

Could you delete the file ff2mpv.bat and manually create it with the following content?

@echo off
call python ff2mpv.py
JoseHidalgo commented 9 months ago

Thank you Dan :) I'm currently on the road with my laptop, so I'll try to report back ASAP. Stay tuned! ;)

JoseHidalgo commented 8 months ago

Hi. Sorry about the delay, it was a 1 month trip with little Internet access. :(

I have Windows 7 / Firefox 115 (one of the latest ones I guess) / Powershell 1.0 (yes, unbelievable... and I've spent 30 min trying to update it, without success).

The requested ff2mpv registry key exists. Inside there's a string, and its value is \ff2mpv-windows.json

I've recreated the ff2mpv.bat file.

Unfortunately the console error remains the same. \ff2mpv-windows.json seems to be an unrecognized path. I don't get it.

ff2mpv is installed at C:\users\USERNAME\ff2mpv\

DanSM-5 commented 8 months ago

You first posted that the script worked

and the .\install.ps1 firefox command went smoothly and without issues

But

I have Windows 7 / Firefox 115 (one of the latest ones I guess) / Powershell 1.0 (yes, unbelievable... and I've spent 30 min trying to update it, without success).

The script may have completed but I'm sure it didn't work correctly. From my own test on windows 7 I know for a fact that the script fails there. For updating I don't know if that's possible as I believe some versions came with updates of windows and powershell core may not work in windows 7.

I'm unsure if changing the script location detection to something compatible with powershell 2 could fix it entirely (currently using $PSScriptRoot) but I know that's one of the things that fail.

The requested ff2mpv registry key exists. Inside there's a string, and its value is \ff2mpv-windows.json

I believe this is your issue. The value of the registry key should be C:\users\USERNAME\ff2mpv\ff2mpv-windows.json.

I'd suggest to try updating it manually.

JoseHidalgo commented 8 months ago

THAT SOLVED IT!!! :D

So yes, it was most probably an installation error due to an obsolete Powershell version. A manual regedit fix did the trick.

Many thanks for an impeccable help here. :)