browserpass / browserpass-legacy

Legacy Browserpass repo, development is now happening at:
https://github.com/browserpass/browserpass-extension
MIT License
999 stars 80 forks source link

Error: Attempt to postMessage on disconnected port #244

Closed turboMaCk closed 6 years ago

turboMaCk commented 6 years ago

General information

Hello, I'm having this issue on my Arch Linux machine ~but I know friend of mine is experiencing same problem on mac.~

Error: Attempt to postMessage on disconnected port

This applies to both chromium and firefox so I think it is probably related to native server.

This happend after some recent update (few weeks ago)

maximbaz commented 6 years ago

Hey, is it causing any actual issue though?

It's a warning in the console, meaning that while extension was doing something in the background, the popup was closed. For me it usually happens when I have to unlock my PGP key, a pin entry dialog appears and it closes the popup.

I just don't want to silence the errors, one day they might be useful.

turboMaCk commented 6 years ago

It does. This is the message rendered under input in the browser extension. Nothing works.

I'm unable to print screen it as the whole popup disappears when I hit print screen (I'm using light screen).

I think extension simply can't communicate with the native app at all due to this.

turboMaCk commented 6 years ago

I'll be happy to help with the investigation and potential fixes but the problem is that I'm not a go programmer (as I don't really like the language at all) and I don't have enough experience with extensions API.

turboMaCk commented 6 years ago

Just got the info that friend managed to fix it on macos by manually removing and reinstalling the native client - updating bug report.

maximbaz commented 6 years ago

Can you also try completely reinstall the host app? Have you ever installed it locally, for example from the sources? If you have any files in these locations? If yes - delete them.

https://github.com/dannyvankooten/browserpass/blob/22e8af03308ca489beeb51f6bf66714b14240740/install.sh#L34-L37

turboMaCk commented 6 years ago

yes, I did have it installed from source in past. I'll try it first thing when I get back home and let you know. Thanks!

turboMaCk commented 6 years ago

I can confirm that rm -rf of those configs have fixed the issue for all browsers I have installed :raised_hands:

Once again thank you very much.

maximbaz commented 6 years ago

Good! I think I need to mention this somewhere 🤔 Because in general these local configs take precedence, so you think you are updating browserpass when an update is pushed via AUR, but in fact you are still using the old browserpass from the time when you compiled it from sources and installed in the home folder.

turboMaCk commented 6 years ago

Frankly, I was even looking for something like this before posting an issue but I've failed to find those locations in a makefile. Now I see it's in the install.sh :/

anarcat commented 5 years ago

i had this problem while running Firefox from the "snap" repositories on Debian stretch: even with the webext-browserpass package installed to provide backend support, the error message would pop up, presumably because of the isolation provided by the "snap" system. Since Debian stretch switched to Firefox ESR 60 now, I do not have this problem anymore of course, as I stopped using the snap, but I figured I would document another possible source of failure for this.

Thanks for the great extension!

thanethomson commented 5 years ago

I'm getting this same problem now with Firefox v66.0.3 (64-bit), using browserpass 2.0.22 (macOS Mojave).

It worked just fine yesterday, and now today all of a sudden I'm getting a red error message in Firefox when I either click on the browserpass extension button in Firefox, or I hit Cmd+Shift+L.

I've tried completely re-installing browserpass, with no success.

erayd commented 5 years ago

@thanethomson Can you please confirm your extension version? V3 was released on Saturday, so you shouldn't still be seeing 2.0.22 unless you've manually installed it - and if you'd done that, you shouldn't be seeing this error.

Have you installed the v3 native host app yet?

thanethomson commented 5 years ago

I installed browserpass following these instructions, and after updating Homebrew and running brew info browserpass I get:

dustinwilson/tap/browserpass: stable 2.0.22
Native component for Chrome & Firefox password management add-on
https://github.com/browserpass/browserpass
/usr/local/Cellar/browserpass/2.0.22 (7 files, 3.7MB) *
  Built from source on 2019-04-14 at 16:24:29
From: https://github.com/dustinwilson/homebrew-tap/blob/master/browserpass.rb
==> Dependencies
Build: go ✔, dep ✔
Required: gnupg ✔, pinentry-mac ✔
==> Caveats
To complete installation of browserpass, do the following:

1. Install the browserpass-ce add-on in your browser.
    * Chrome: https://chrome.google.com/webstore/detail/browserpass-ce/naepdomgkenhinolocfifgehidddafch
    * Firefox: https://addons.mozilla.org/en-US/firefox/addon/browserpass-ce/
2. Run `browserpass-setup` to install browser-specific manifest files.

The addon will not work otherwise.

Running brew upgrade browserpass:

Error: dustinwilson/tap/browserpass 2.0.22 already installed

Is the new version available via Homebrew yet?

maximbaz commented 5 years ago

Yes, but since we couldn't reach Dustin, another user has contributed a formula for v3, check out the instructions here: https://github.com/browserpass/browserpass-native#install-via-package-manager

octomike commented 5 years ago

I am struggling to update from 2.x and I get this error as well. I reinstalled the extension 3.1.0 from addons.mozilla.org, wiped configs from my home, built browserpass-native with docker and even ran the dreaded sudo make install to have a global browserpass host app (3.0.6).

Still, nothing works. :(

maximbaz commented 5 years ago

Could you open a new issue in https://github.com/browserpass/browserpass-native describing in more details what you tried and what you are experiencing?

octomike commented 5 years ago

I think I was just a little hasty and messed up the building process. I cleaned everything and I thought the browser config was still in place. Running sudo make hosts-firefox again actually fixed it. Sorry for the complaint and thanks so much for your work!! :)