aclap-dev / vdhcoapp

Companion application for Video DownloadHelper browser add-on
GNU General Public License v2.0
1.72k stars 280 forks source link

Keeping showing "Verifying Companion App..." on Linux #39

Closed kuanyui closed 3 years ago

kuanyui commented 5 years ago

First, thanks for developing this awesome Firefox plugin.

I encounter a phenomenon similar to #4 , after cloning, building & installing (without root privilege) vdhcoapp, restarting Firefox, and Video DownloadHelper hangs at Verifying Companion App... like this: screenshot_20181004_215501 I checked the executable path & permission in ~/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json, but it seems no problem...? screenshot_20181004_220232

I cannot see any error message or logs about it. What can I do to find out where the problem is? Thanks.

mi-g commented 5 years ago

The companion app on the github repository is the one we compile and distribute, so i am reasonably confident that the overall system is working. You may want to recheck all possible manifest locations so that you don't have left a corrupted manifest somewhere, try on Chrome as you may have a more explicit error/warning message in the browser console, ...

kuanyui commented 5 years ago

I just tested on Chrome & Chromium:

  1. They also keep hanging at Verifying Companion App..., but after clicking Recheck many times, it said `
    Companion App not installed
    Checking companion app returned: Native host has exited.

    screenshot_20181005_094351 screenshot_20181005_094540

  2. Console of the browsers shows nothing.
  3. ~/.config/google-chrome/NativeMessagingHosts looks like this: screenshot_20181005_095045

You may want to recheck all possible manifest locations so that you don't have left a corrupted manifest somewhere

BTW, what is the expected output after executing net.downloadhelper.coapp-linux-64 ? I run it without ARGV, it hangs without any output. (Surely I can see VdhCoApp: VdhCoApp is ready to be used if with install argument)

mi-g commented 3 years ago

The problem has not been reported for 2 years. Closing the issue.

ctrlcctrlv commented 1 year ago

I'm having this issue today.

image

kuanyui commented 1 year ago

Provide some hints to debug such issue under Linux + Firefox. Though this time the error message I've encountered is An unexpected error occurred instead of Verifying Companion App.., but may be still helpful for somebody.

According to MDN https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests

Steps:

  1. check if the following files exist:
    /usr/lib/mozilla/native-messaging-hosts/<name>.json
    ~/.mozilla/native-messaging-hosts/<name>.json   # ATTENTION: This one has higher priority.
  2. Check the content of these json files.
    // $ cat /usr/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json 
    {
    "name": "net.downloadhelper.coapp",
    "description": "Video DownloadHelper companion app",
    "path": "/usr/bin/vdhcoapp",
    "type": "stdio",
    "allowed_extensions": [
        "weh-native-test@downloadhelper.net",
        "{b9db16a4-6edc-47ec-a1f4-b86292ed211d}"
    ]
    }

    And try to run the executable in path to test if it's no problem.

@mi-g Sorry for trouble you, just curious that when running /usr/bin/vdhcoapp, is it on purpose that no any error message, log, diagnostic info or help message on stdout? If so, wondering that some log may be easier for those who needs troubleshooting, at least can confirm that vdhcoapp itself is everything ok. Thanks.

paulrouget commented 1 year ago

when running /usr/bin/vdhcoapp, is it on purpose that no any error message, log, diagnostic info or help message on stdout?

Yes, it is on purpose. The reason is that the coapp is "passive" and controlled by your browser. They communicate via stdin/stdout, so the coapp can't just print anything, as its stdout is used as a communication socket.

Now thinking about it … we could show some info via stderr. I filed an issue: #170.