-
Notifications
You must be signed in to change notification settings - Fork 52
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
darwin64 install issues #43
Comments
downloaded source and built myself and reran commands as noted on here and get the same errors for both, just FYI. I have latest 1.12.3 GO installed on latest macOS. |
Hey, thanks for testing! I don't own a mac, so you are the first person to try 😄 Could you please try something for me? First, run this command: Then remove the unarchived If this works, I'll add this to README. |
Nope, ran, brew install coreutils, it said there was no changes and completed. I then delete the unpack folder and extracted from archive fresh, then ran this command in the folder, make BIN=browserpass-darwin64 configure, received the same error as before and noted below. See the bold below, is that correct or a typo in the code somewhere? xxxx:browserpass-darwin64-3.0.4 xxxx$ make BIN=browserpass-darwin64 configure |
Also, from before on the second command and the error, install -Dm755 -t "/usr/bin/" browserpass-darwin64 the -D says not valid, only -d and should m755 be together or separated from each other and from the - d argument? |
cc @erayd, do you have experience with Mac? I was reading up on Could you manually edit Makefile in sections I'm just guessing here, but if this works, we might actually be able to do something like this in Makefile:
These are not typos in Makefile, it's just a difference in commands, both Linux and Mac apparently have the commands that are named identically, but they are not compatible, i.e. And |
did that, error below, no gsed xxxx:browserpass-darwin64-3.0.4 xxxxx$ make BIN=browserpass-darwin64 configure |
I have coreutils 8.31 installed too |
Hmmmmmmmmm.... we need to find how to execute I found this command to list files in a package, please paste the output:
If sed is not in that list, it might be in another package, I've seen some blog recommends this, try:
|
nothing in coreutils for sed or gsed, installed gnu-sed, sed and gsed there, but still errors on the configure and install commands. Listing for gnu-sed lmba:browserpass-darwin64-3.0.4 larrybeck$ brew ls -v gnu-sed When using gsed and ginstall in makefile configure command: install command: when changing makefile back to sed and install, the following error on configure command: |
So Cool, now we need to find where to get the proper |
no, ginstall is listed in coreutils, but not gnu-sed /usr/local/Cellar/coreutils/8.31/bin/ginstall |
Oh, nevermind, I saw that Or do you want to install browserpass in some other folder, not in |
Could you please try the attached Makefile to make sure it works properly, before I push it in the repo? |
Copied the new makefile, tried running both configure and install with sudo and no sudo, below are the results, neither work correctly for install, one appears to work and one not for configure commands. Non-sudo: lmba:browserpass-darwin64-3.0.4 larrybeck$ make BIN=browserpass-darwin64 configure lmba:browserpass-darwin64-3.0.4 larrybeck$ make BIN=browserpass-darwin64 install sudo: lmba:browserpass-darwin64-3.0.4 larrybeck$ sudo make BIN=browserpass-darwin64 configure lmba:browserpass-darwin64-3.0.4 larrybeck$ sudo make BIN=browserpass-darwin64 install |
So gsed from gnu-sed seemed to help, right, there are no errors? To verify, open browser-files/chromium-host.json and it should contain /usr/bin/browserpass-darwin64, does it? Yes, this had that line added to json file |
You need to run Let's try to install in You will need to remove the Finally run these commands:
|
I think it worked, is this what we need to see: lmba:browserpass-darwin64-3.0.4 larrybeck$ make BIN=browserpass-darwin64 PREFIX=/usr/local configure lmba:browserpass-darwin64-3.0.4 larrybeck$ sudo make BIN=browserpass-darwin64 PREFIX=/usr/local install |
Think so! Try to install the latest browser extension now from browserpass-extension repo, and let me know if everything works! Don't close this issue yet, I'll use it to improve Makefile and README. |
when i run this, sudo make hosts-chromium, i get the following: lmba:browserpass-darwin64-3.0.4 larrybeck$ sudo make hosts-chromium |
i have manually installed extension for Chromium from that repo, restarted Chromium, it shows but gives me the following error in the toolbar. Error: Error: Specified native messaging host not found. |
Try this: |
lmba:browserpass-darwin64-3.0.4 larrybeck$ sudo make hosts-chromium -f /usr/local/lib/browserpass/Makefile |
Oops, my bad, let's try again:
The other errors are weird, but they don't seem to really affect the behavior. Let's see if this works. |
Is this what we need: lmba:browserpass-darwin64-3.0.4 larrybeck$ sudo make PREFIX=/usr/local hosts-chromium -f /usr/local/lib/browserpass/Makefile |
Yep! The file
Must be a correct symlink, open this file and you should see And extension must be working now, is it? |
Extension still shows this error after I installed it and restarted browser. Error: Error: Specified native messaging host not found. |
json file is not in that directory at all |
To confirm, do you mean that |
correct, that symlink error above must be saying it was not created as it is not in the usr/lib folder either |
Could you please try this? Just some wild idea, want to make sure we are not impacted by another issue.
|
I have another Mac to test this on if you think that all the fixes are in that need to be there. This other Mac only has v2 installed, so it will be sort of fresh without having to manually remove things that could taint the final touches for verifying the install works correctly for a normal user. Please confirm that you feel the native install is complete and I will attempt the install for v3 on that laptop. |
Where is the old v2 json file stored for Brave Browser as I have it working correctly in my present install but I cannot find the json file as I see for Chromium or Firefox in the same folder as the v3 one for each of them? I have checked the following which only contains the v3 json that I am trying to get working now. /Users/larrybeck/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts |
There must be something not right with the extension for Chromium working with Brave Browser, my reasoning is this:
Anyone else have any thoughts, I have done everything we did to get Chromium version working, verified all items as before and nothing works, so I think something might not be right with the Chromium extension working with Brave, or something along those lines? |
@larry-beck i'm not sure, but I seem to remember the installation for v2 browserpass going under @maximbaz do you have a way of creating a update: The extension works for me using Brave browser.
i tried both the btw rough formula added to my tap. I'll add instructions for it to the PR. |
I do not see anything in either place mentioned, I know it is somewhere as I have v2 still running in Brave and I cannot find the json file it is using. |
@Amar1729 I have something better: native.pl and PROTOCOL.md. The simplest request is:
UPDATE: ah, you need to for an automated test in your tap, I'll prepare a UPDATE 2: request.hex.txt
@larry-beck the old json is named @Amar1729 do you confirm that you used @larry-beck yes you can try from this release archive and README from #44 (rendered: README). |
@maximbaz thanks for the request i'll update the test for the brewfile. @larry-beck for brave I tested the extension two ways:
And to install the native:
p.s. |
I have Brave release version installed, json file is in NativeMessagingHosts folder, /Users/larrybeck/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts, file links to json file, /usr/local/lib/browserpass/hosts/chromium/com.github.browserpass.native.json, and that json file reads the following contents: { The extension is installed, but gives the following error as in the beginning with the Chromium issue we dealt with yesterday, Error: Error: Specified native messaging host not found. Let me know what else to look at, should work as Chromium started yesterday when we made changes, but it does not, Firefox and Chromium are working fine, no issues. |
If you're getting Can you do
to make sure the file is there and executable? also: you can use backtics for code formatting (single ` surrounding a line, or triple ``` surrounding a code block) |
lmba:browserpass larrybeck$ ls -lh /usr/local/bin/browserpass-darwin64 |
Well, because it's a symlink, and because @larry-beck has it working in Chromium, the contents of the json file as well as the binary itself is definitely correct. The only thing I can think of is that for some reason your @larry-beck version of Brave browser does not respect a json file located in the following location:
Are you running exactly the same version of Brave browser as @Amar1729 described, "installed |
That is very strange. The native host works for me both in brave
I've got no idea why it's not working for you though. edit: yeah this is the full path of the json file for me (for both
|
@Amar1729 can you confirm that both locations are correct on macOS? /Users/larrybeck/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/com.github.browserpass.native.json /Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/com.github.browserpass.native.json To test, remove both files, check that you get an error, add one of them, check that Browserpass is working again. |
Oh this is weird -
|
Gents, here is what I don't understand about Brave, there is no com.dannyvankooten.browserpass.json file to be found in any BraveSoftware and/or Brave-Browser folder for v2 as there is being created for v3, see attached photos showing my Chromium folder with both v2 and v3 json files for browserpass and the Brave folder with only the v3 json file. Also see the screenshot showing that in Brave v2 and v3 extensions are installed, v2 is working, but v3 is not. Something is missing here from v2 to v3. |
Bingo, when I copy the /usr/local/lib/browserpass/hosts/chromium/com.github.browserpass.native.json file to /Users/larrybeck/Library/Application Support/Google/Chrome/NativeMessagingHosts, Brave works correctly now with v3. See attached to confirm. What do we need to do to fix this as I don't even have Google Chrome installed any longer, that was a previous installed before I stopped using Google Chrome, I only use the Chromium browser now and others will have the same type issue is not using Google Chrome too. |
Linking the chrome docs:
I tried the Chromium directory, but Brave doesn't read that - it only seems to find the json if it's under the Either way, I guess the makefile for Edit @maximbaz - regarding system-wide install, Brave browser does NOT read the json file under chrome, it needs the Chromium directory for a system-wide. It does not work at all in the
@larry-beck if you're worried about a fix, I don't think there's a need to be concerned - the file will live under |
I can confirm too that Brave release, beta and developer all work as long as the v3 json file is in the /Users/larrybeck/Library/Application Support/Google/Chrome/NativeMessagingHosts folder, but not without it being in there, the /Users/larrybeck/Library/Application Support/BraveSoftware/Brave-Browser does not matter if the v3 json file is there, right now anyway. Also, if you have more than release of Brave installed on macOS, you will have three folders where the json file will need to be located as they create three different folder structures for each version of browser installed on macOS, see below what I mean.
There will need to be a NativeMessagingHosts folder created in the Beta and Dev folders structures with the json file for each of those to work when the final fix is in and Brave is not looking in the Chrome folders. |
Sounds fine to me as long as the install creates those Google Chrome directories and files if someone does not even have Google Chrome installed, else they will have issues with v3 working for them in Brave. |
Let me know when complete updated install files and directions are done for macOS and I will test fresh on my other Mac laptop that has Firefox and Brave on it to make sure everything "just works" for the normal user per se. |
@maximbaz this is the patch I have for the Makefile (since I can't edit #44 ): diff --git a/Makefile b/Makefile
index c5ae0a6..e7222a4 100644
--- a/Makefile
+++ b/Makefile
@@ -191,9 +191,9 @@ hosts-brave:
ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "/etc/opt/brave/native-messaging-hosts/$(APP_ID).json"; \
[ -e "/etc/opt/brave/native-messaging-hosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
;; \
- Darwin) mkdir -p "/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/"; \
- ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/$(APP_ID).json"; \
- [ -e "/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
+ Darwin) mkdir -p "/Library/Application Support/Chromium/NativeMessagingHosts/"; \
+ ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "/Library/Application Support/Chromium/NativeMessagingHosts/$(APP_ID).json"; \
+ [ -e "/Library/Application Support/Chromium/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
;; \
*) echo "The operating system $(OS) is not supported"; exit 1 ;; \
esac
@@ -205,9 +205,9 @@ hosts-brave-user:
ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/$(APP_ID).json"; \
[ -e "${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
;; \
- Darwin) mkdir -p "${HOME}/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/"; \
- ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/$(APP_ID).json"; \
- [ -e "${HOME}/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
+ Darwin) mkdir -p "${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts/"; \
+ ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts/$(APP_ID).json"; \
+ [ -e "${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
;; \
*) echo "The operating system $(OS) is not supported"; exit 1 ;; \
esac
Tested the user and system-wide target after deleting all other hosts files, they both work for Brave. |
Wow, thanks guys! What a mess. So, to summarize, here's a situation for Brave:
|
I've just pushed to #44, could you please have a final look if everything looks alright? |
Tested user and systemwide for Google Chrome and Brave, both work! |
@larry-beck 3.0.5 is ready for your testing 😉 If you experience more issues, just post here, I'll reopen the ticket if there are more changes I can/need to do on my side. |
Been slammed, will try to test install on other Mac late tonight and report back. |
I have downloaded from github the pre-compiled darwin64 files and try to follow your install directions for macos as follows but I get errors on first line.
xxxx:browserpass-darwin64-3.0.4 XXXX$ ls -la
total 8360
drwxr-xr-x@ 8 xxxx staff 256 Apr 9 12:26 .
drwx------+ 30 xxxx staff 960 Apr 9 12:21 ..
-rw-r--r--@ 1 xxxx staff 8196 Apr 9 12:26 .DS_Store
-rw-r--r--@ 1 xxxx staff 757 Mar 12 17:39 LICENSE
-rw-r--r--@ 1 xxxx staff 20669 Apr 9 11:32 Makefile
-rw-r--r--@ 1 xxxx staff 13398 Apr 8 18:24 README.md
drwxr-xr-x@ 5 xxxx staff 160 Apr 4 04:43 browser-files
-rwxr-xr-x@ 1 xxxx staff 4219128 Apr 9 11:58 browserpass-darwin64
xxxxx:browserpass-darwin64-3.0.4 XXXX$ make BIN=browserpass-darwin64 configure
sed -i "s|%%replace%%|/usr/bin/browserpass-darwin64|" browser-files/chromium-host.json
sed: 1: "browser-files/chromium- ...": undefined label 'rowser-files/chromium-host.json'
make: *** [configure] Error 1
xxxx:browserpass-darwin64-3.0.4 XXXX$ sudo make BIN=browserpass-darwin64 install
install -Dm755 -t "/usr/bin/" browserpass-darwin64
install: illegal option -- D
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make: *** [install] Error 64
With both these errors running the commands as you request, I cannot proceed, if an error on my end, please do tell and I will correct, otherwise, please advise on next steps to resolve and get browserpass installed correctly.
The text was updated successfully, but these errors were encountered: