Native Messaging through Firefox launches GUI
jerinphilip opened this issue · 1 comments
I have translateLocally instances spawned all over when trying to use benchmark.
[jerin@thinkpad bergamot-translator]$ ps ax | grep translateLocally
105888 ? Sl 0:01 /usr/bin/translateLocally /home/jerin/.mozilla/native-messaging-hosts/translatelocally.json {c9cdf885-0431-4eed-8e18-967b1758c951}
106231 ? Sl 0:01 /usr/bin/translateLocally /home/jerin/.mozilla/native-messaging-hosts/translatelocally.json {c9cdf885-0431-4eed-8e18-967b1758c951}
107096 pts/0 S+ 0:00 grep translateLocally
translateLocally/src/cli/CLIParsing.h
Lines 52 to 58 in cd02f39
Edit: wait so it pops up the GUI? Oh noes, I must have messed up the argument parsing in the last pull request. Yep, that regex doesn't match firefox linux "native-messaging-hosts/translatelocally.json". Nor does it match any of them on Windows.
That's a bug in the benchmarking code in the extension. It should close the connection to the native messaging client.
It is also expected that you'd have multiple instances open on the benchmark page as it uses its own instance, not the one that the add-on uses for translating webpages. Under normal circumstances you'd only have a single instance running (at least, only one started by Firefox.)
