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
brotab install apparently failed to set the appropriate registry key, and did not detect this issue #64
Comments
Thanks for documenting this, it's what I needed to get brotab running. I can confirm even running with admin rights does not get those reg entries set. |
Thank you for confirming that, and I'm glad documenting it helped! I decided to search again for the reason why winreg saw the changes that should have been made to the registry, while I didn't see them in regedit (until I put them there myself). Edit: I believe it would be good to have brotab check whether |
I'm not 100% sure, but I would have intentionally installed Python from the windows store. Perhaps the easiest workaround would be to have it generate the registry files, and have to use your manually run those. Or shell execute a reg add The documentation also wasn't quite clear I didn't realize I needed to do BT install. |
I am running windows 11. The user I am logged in as is not an admin. I am not sure if this is related.
By manually modifying my registry, I was able to get it to work. What follows is the steps I took.
When I ran brotab install, it said
I had the firefox browser extension installed, and restarted firefox. running
bt clients
did not output anything (except an empty line) before finishing.I looked at the extension debug tools (in about:debugging) and saw that the extension logged that the connection had been closed.
I also noted that the code lisening for disconnects did not manage to find the error message.
The code
gave me only "lastError is undefined".
(aside : I'm not especially familiar with js stuff. Is that variable
chrome
there specific to the browser called "chrome", and that's why thechrome.runtime.lastError
is null for me, or is that variable present regardless of which browser? I'm guessing the latter?)Looking at the object
port
returned by theruntime.connectNative
call, I found that it had an error field saying that the application didn't exist (sorry, I no longer have the exact error message available, didn't think to document this until after I got it working)I found https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#manifest_location and tried to find whether any of those registry keys had been set.
In regedit, I did not find any of them, neither in
HKEY_CURRENT_USER
nor inHKEY_LOCAL_MACHINE
Creating a registry entry
Computer\HKEY_CURRENT_USER\Software\Mozilla\NativeMessagingHosts\brotab_mediator
with the content (in my case)C:\Users\madaco\.mozilla\native-messaging-hosts\brotab_mediator.json
(which is whatbt install
claimed to set it to, and where I had previously confirmed that the file referred to there exists), seems to have solved the problem.suggested changes to make this easier to debug in the future:
brotab install
is unable to set the proper registry, it would be good if it would say so. Initially I thought that it had just set one in the wrong place, but I could not find any of the registry entries it claimed to create.Or, I have not tracked down the reason why the registry entry was not created, so maybe the problem isn't that it couldn't create it?
Side note : It also did not work in chrome when installing the extension on chrome, though I have not tested the registry entry fix on chrome.
Sorry if I'm being presumptuous. Part of this is just that I want what problem I had + the solution, documented, in case others have the same issue.
Edit: I tried looking at the values the python module winreg gives when trying to access those values, and it sees the values as being set. This to me seems very strange, because they do not appear when using regedit. I have no explanation for this.
The text was updated successfully, but these errors were encountered: