-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use it on Windows Chrome #19
Comments
Changes to make Move work under Windows : Changes on inout.py
B)
|
Thanks for the great and detailed write up! Your suggestions definitely need to be merged when I have a bit more time.
That was and is a huge pain point for me. It was so inconvenient to check extension's logs in a browser given that I work mostly in command-line. I'll try that and I wish there were simple and reliable way to do the same in Firefox. |
Another change in api.py : Just add an slash, in line
Else Flask server makes a 308 permanent redirect to that url, that urlopen cannot handle. |
brotab_mediator.py Added is_port_accepting_connections() from inout.py
Changed main() in order to check the port is not open
|
I have no results from any query, and the error message on log is : Background.js It's posible that query methods are wrong? BrowserTabs Class
FirefoxTabs Class
ChromeTabs
BrowserTabs has 2 parameters, but FF and Chrome have 3. And Chrome seem a copy/paste from firefox. Edit: |
I've made a pull request in order to aggregate these things : #21 It lacks the changes on brotab_mediator.json (Path to bt_mediator.EXE entry must have double ) and the creation of the Registry Key. |
Added all your changes from the pull request and also implemented these two. Now Windows support should be much better. |
First to thank you for this great tool.
It's Awesome!!
I managed to use it on Windows-Chrome.
That's are the changes i've done.
Change SIGPIPE
On windows there's no SIGPIPE signal.
I've seen on the python docs that they advise to catch the exception BrokenPipeError:
From https://docs.python.org/3.7/library/signal.html#note-on-sigpipe
Changes on main function of brotab_mediator.py
def main():
#signal.signal(signal.SIGPIPE, signal_pipe)
monkeypatch_socket_bind()
disable_click_echo()
I think this way is compatible with all OS.
How to Configure for Chrome on Windows
A) Changes on brotab_mediator.json:
Path entry must have double \
Example:
"path": "D:\\Python-3.7.6.0\\Envs\\BroTab\\Scripts\\bt_mediator.EXE",
B) Create a Registry Key
From https://developer.chrome.com/extensions/nativeMessaging#native-messaging-host-location
On Windows, the manifest file can be located anywhere in the file system. The application installer must create registry key HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.my_company.my_application or HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.my_company.my_application, and set default value of that key to the full path to the manifest file.
For example, using the following command:
REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.my_company.my_application" /ve /t REG_SZ /d "C:\path\to\nmh-manifest.json" /for using the following .reg file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Google\Chrome\NativeMessagingHosts\com.my_company.my_application]
@="C:\path\to\nmh-manifest.json"
In this case i've used :
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\NativeMessagingHosts\brotab_mediator]
@="[PathWhereManifestFileIs]\brotab_mediator.json"
Enable Logging on Chrome
Just a quick note if you want to see what's happenning on Chrome side...
From https://www.chromium.org/for-testers/enable-logging
To enable logging, launch Chrome with these command line flags:
--enable-logging=stderr --v=1 # Linux (newer instructions for Linux: here)
--enable-logging --v=1 # Windows
--enable-logging=stderr --v=1 > log.txt 2>&1 # Windows, seems to capture more output
Hope to get time to make it work on FF.
Edit :
I cannot get any response from query command, in any of its variations.
Always returns b'[]'
Any clue?
The text was updated successfully, but these errors were encountered: