aclap-dev / vdhcoapp

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

When running coapp from command line, show some feedback and diagnostic #170

Closed paulrouget closed 1 year ago

paulrouget commented 1 year ago

We could do that on stderr.

kuanyui commented 1 year ago

Or maybe not on stderr. How about "when an option like --help, --version or --diagnose (...etc) existed, just print message and exit immediately"?

paulrouget commented 1 year ago

There's already --help and --version. We could add a --diagnose that does some checks. But I think we should print something if the app is started without options.

Wondering what the diagnostic function could do though. 99% of the problems come from the browser's sandbox, which can't be debugged from within the coapp.

kuanyui commented 1 year ago

There's already --help and --version. We could add a --diagnose that does some checks. But I think we should print something if the app is started without options.

I asked this because I've tried --help and --version but hanged and nothing outputted... Built and installed from AUR in 2023/08/02. Screenshot_20230927_130637

Screenshot_20230927_130554

Wondering what the diagnostic function could do though. 99% of the problems come from the browser's sandbox, which can't be debugged from within the coapp.

I'm also wondering this. What I was thinking is just printing some simplest message like:

vdhcoapp is running successfully.
Notice: this is not intended to be used directly from command line. You should press Ctrl+C to exit.
---
If your browser is unable to detect this coapp, please check these files manually:

[Firefox]
~/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json
/usr/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json

[Chrome]
(omitted)

And ensure the field "path" is matched with the executable path of `vdhcoapp`

I don't sure if this would be helpful for others though, but it seems the wrong path in native manifest is the major problem at least in my personal experience (on Linux only).

paulrouget commented 1 year ago

The wrong-path issue, and the command line option missing, it's all fixed in the upcoming version.

I will add a message inspired to what you just wrote here. Thanks!

paulrouget commented 1 year ago

Fixed in v2.0.2