Closed crysman closed 7 years ago
Same probleme here at Xubuntu 16.04 with a fresh installed brave browser (0.15.314 rev 75ffa36)
Opening brave over the console, while a other instance of brave is running, the brave window is focused and the console is throwing
hbs@hbs-work:~$ brave [31406:31430:0606/180000.720364:ERROR:connection.cc(1954)] Web sqlite error 5, errno 0: database is locked, sql: PRAGMA auto_vacuum [31406:31430:0606/180000.720467:ERROR:connection.cc(1954)] Web sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = TRUNCATE
It's still not resolved in Brave 0.16.12 rev 72624a2
:/
What about you others? You don't have issues?
I have the same issue with the latest on Ubuntu 17.04
@crysman do you know if this used to work previously? What window manager are you using?
Brave 0.16.13 rev 7869803
Tested it on the following distributions and window managers:
Xubuntu 16.04 - XFCE - Problem exists Debian Testing - XFCE - Problem exists Ubuntu 16.04 - Mate - Problem exists Kubuntu 16.04 - KDE - Problem exists
Same problem here. Brave gets the focus, but no link is opened.
Ubuntu 16.04 with Gnome-shell. Brave 0.16.13 rev 7869803
I'm having this problem since the last 4 or 5 updates from the Brave Xenial repository, probably since version 0.14.something or 0.15.something.
cca 2 months ago it had been working, it's some 5 brave updates since...
Is it possible to open a new tab in Brave via the command line? e.g. "brave http://brave.com" ? So we could test whether that works.
@call-cc yes- you should be able to do something like:
brave -- "https://brave.com"
That should be the format that executables are calling Brave with. With Windows, some registry hacks were needed to make it work. I'm curious how Linux is calling it?
@call-cc > nope, it is not working :( in case brave is already running. see below:
myself@machine ~ 11:42:23
β± brave http://brave.com
[21171:21192:0623/235838.112647:ERROR:connection.cc(1954)] Web sqlite error 5, errno 0: database is locked, sql: PRAGMA auto_vacuum
[21171:21192:0623/235838.113052:ERROR:connection.cc(1954)] Web sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = TRUNCATE
this is what happens when brave is not running (it works):
myself@machine ~ 11:58:38
β± ps aux | grep -i brave | grep -v grep
1 myself@machine ~ 11:59:27
β± echo "(brave not running now)"
(brave not running now)
myself@machine ~ 11:59:43
β± brave http://brave.com
Crash reporting enabled
[21386:21386:0623/235953.983585:ERROR:CONSOLE(33239)] "(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", source: chrome://brave/usr/share/brave/resources/app.asar/app/extensions/brave/gen/app.entry.js (33239)
[21386:21386:0623/235953.988483:ERROR:CONSOLE(33239)] "(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", source: chrome://brave/usr/share/brave/resources/app.asar/app/extensions/brave/gen/app.entry.js (33239)
[21386:21411:0624/000024.039978:ERROR:service_manager.cc(158)] Connection InterfaceProviderSpec prevented service: content_browser from binding interface: content::mojom::Child exposed by: content_renderer
[21386:21411:0624/000024.040038:ERROR:service_manager.cc(158)] Connection InterfaceProviderSpec prevented service: content_browser from binding interface: IPC::mojom::ChannelBootstrap exposed by: content_renderer
[21386:21411:0624/000024.040145:ERROR:service_manager.cc(158)] Connection InterfaceProviderSpec prevented service: content_browser from binding interface: content::mojom::Child exposed by: content_renderer
[21386:21411:0624/000024.040191:ERROR:service_manager.cc(158)] Connection InterfaceProviderSpec prevented service: content_browser from binding interface: IPC::mojom::ChannelBootstrap exposed by: content_renderer
Name Version Brave 0.16.12 rev 72624a2
(I can confirm that
brave -- http://y99k.com/
works.)
I did some strace-ing and it seems that the problem is how gnome-terminal (or any other application) calls Brave:
10404 08:24:40.454225 execve("/usr/bin/brave", ["brave", "http://y99k.com/"...], [/* 74 vars */] <unfinished ...>
So, the first argument to Brave is the URL and not '--'. As I understand @bsclifton, Brave expects its first argument to be '--'.
This was working fine before, so I guess there was a change made to Brave.
Yes it had been working just fine before. It is a real pain now, I am even considering letting Brave go :(
Even using ubuntu-bug
tool is impossible with this bug, since it does not open any window in a browser to fill-in the bug details...
maybe due to muon/cr59 change?
putting a milestone in case.
I can confirm this on Kubuntu 14.04. Diverging from the standard browser https://url.here
will definitely hurt adoption of brave. I had to switch back to another browser because brave doesn't work as a default browser.
Same problem, running on Fedora 26, default Gnome 3 shell.
I have been fixing this issue myself with each new release by modifying the file at /usr/share/applications/brave.desktop
.
The Exec
line must be changed from Exec=brave %U
to Exec=brave -- %U
.
Could a temporary solution be as simple as shipping a modified brave.desktop
file?
@DivineOmega yes, it could definitely be that easy π Does Gnome consider that file when opening from Thunderbird, etc? If so, I think we have our fix π
@bsclifton I've not specifically tested Thunderbird, but it certainly works for all other external applications.
This issue seems very related to https://github.com/brave/browser-laptop/issues/7090.
@DivineOmega did you want to take a stab at this? I think if you submitted a PR, you'd knock out both issues π If not, maybe you can share your fix here and I can submit on your behalf?
@bsclifton I can submit a PR, but I'm struggling to find where the brave.desktop
file is located/generated. It doesn't seem to be part of the main browser-laptop
repo.
I imagine it is part of the release process which generates the .deb
file. Could you point me in the right direction?
@DivineOmega ah, yeah this appears to be a little more involved
A quick grep shows the files here:
./node_modules/electron-builder/templates/linux/desktop.tpl
./node_modules/electron-installer-debian/resources/desktop.ejs
./node_modules/electron-installer-redhat/resources/desktop.ejs
Which means we may have to upstream the change OR fork the repo and make the change there
Based on what you contributed to our wiki, I think that we would edit the file like this:
before: <% } %><% if (name) { %>Exec=<%= name %> %U
after: <% } %><% if (name) { %>Exec=<%= name %> -- %U
@crysman @Aninstance @LoveIsGrief can you please try adding --
to the part before the %U
in your desktop file? I believe this great suggestion by @DivineOmega will resolve the issue. If this works, I'd be more than happy to make the change π
@bsclifton I can confirm @DivineOmega solution fixes the issue for me. The external application in my case is the Buku bookmark manager. After adding the double hyphen as a command line option in the .desktop file, it works as expected.
I understand that some distros do not accept a double hyphen as a command line option in the .desktop file. Perhaps this config might be considered instead, which caters for that scenario (I confirm this also works for me on Fedora 26, Gnome 3 shell):
Exec=sh -c "brave -- %U"
@Aninstance this syntax worked great! π I'll wrap up a fix tomorrow and get a demo package up for everyone to try. We should be able to fix this next release
changing to
Exec=brave -- %U
does not help in my case :/
using Xubuntu 16.10 and Brave 0.17.19 rev 4e46480
It opens a new brave window only when brave has not been running already. Moreover, it opens a new window, not a new tab (The first window contains tabs left when I closed brave last time).
When brave is running already, the window manager focuses the existing brave window, but no new tab is opened :/
@crysman can you please try with this syntax? I'm hoping this works for you π
Exec=sh -c "brave -- %U"
@crysman @DivineOmega @Aninstance @LoveIsGrief here is a packaged build which has the fix if you'd like to preview it here and confirm: https://github.com/brave/browser-laptop/releases/tag/v0.18.15dev
During the install, the desktop file should get modified appropriately π
I've not tried the patched build, but the "sh -c" version does not work either :/ I believe I've got it right:
β± cat /usr/share/applications/brave.desktop
[Desktop Entry]
Name=Brave
Comment=Brave laptop and desktop browser
GenericName=Web Browser
Exec=sh -c "brave -- %U"
Icon=brave
Type=Application
StartupNotify=true
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
@crysman this does look correct βΉοΈ I'm curious why this wouldn't be used? Is the .desktop
entry cached? (ex: would you need to logout/login or restart X11?)
@crysman You could try logging what's actually being sent to brave with a bash script e.g
# Create the script
echo "#!/bin/bash
echo $@ | tee -a /tmp/brave_calls
brave $@ |& tee -a /tmp/brave_logs" > /tmp/brave
#Make it executable
chmod +x /tmp/brave
# Update the desktop file to use the new command
# Also backs it up
sudo sed -i=.bak -re "s@Exec=.*@Exec=/tmp/brave -- %U@" /usr/share/applications/brave.desktop
Then try and do whatever it is you were trying to do and check _/tmp/bravecalls ad well as _/tmp/bravelogs
Thanks to the comments above I've been able to get this working with 0.18.16 as my default browser on Kubuntu -- maybe this will be helpful?
I set my default web browser and http handler with xdg-settings
like so:
$ xdg-settings set default-web-browser brave.desktop
$ xdg-settings set default-url-scheme-handler http brave.desktop
And I set the default browser in the Default Applications module of the KDE system settings to brave -- %U
. (I think when Brave tries to set it itself it just sets it to brave
.)
Maybe you can find a similar dialogue in XFCE. xdg-settings
should be present and perform as expected on Xubuntu.
Should we reopen this issue, if https://github.com/brave/browser-laptop/pull/10215 did not solve the issue completely?
Yes, let's re-open until we can figure out the rest
After talking with @darkdh, maybe we should go with the solution proposed by @LoveIsGrief https://github.com/brave/browser-laptop/pull/9890
It sounds like Chromium args should always be in the form --paramName=value
and never in the form --paramName value
. If that is true, we're safe to accept the PR π
@LoveIsGrief your original PR couldn't be re-opened (since the branch was deleted)... Would you be able to create a new branch, cherry-pick in https://github.com/brave/browser-laptop/pull/9890/commits/c1d43aad017f2d1593d30df42622c3ce40e6b93a, and then submit a new PR? π
@bsclifton I still have the branch locally. Maybe a rebase onto the new master will do.
I am new to the Brave browser and have ran into exactly the same issue: Canβt open external Links (from Evolution, Telegram etc.) if the Brave browser is already running. - Very annoying :-1:
My System:
I was doing some research and I think I found an solution especially for XFCE desktop. The main problem seemed to me that Brave didn't come up in the Favorite Applications settings for setting it as the default browser. However, I was able to choose another installed browsers but not Brave itself.
So I compared the application starter files provided by Brave, Vivaldi and Google Chrome inside both /usr/share/applications/
and ~/.local/share/xfce4/helpers/
folders.
The XFCE compatible starter files contained four additional lines.
Type=X-XFCE-Helper
X-XFCE-Category=WebBrowser
X-XFCE-Commands=</path/to/binary>
X-XFCE-CommandsWithParameter=<command_to_execute_with_params>
My idea was to supplement these four lines to the original application starter file. But because I didn't want to edit the original file I copied the brave starter file to the user space.
cp /usr/share/applications/brave.desktop ~/.local/share/xfce4/helpers/brave.desktop
Then I adapted the latter two lines to conform to the installed Brave browser.
Now the Exec
and X-XFCE-CommandsWithParameter
entries look very similar.
Type=X-XFCE-Helper
X-XFCE-Category=WebBrowser
X-XFCE-Commands=/usr/bin/brave
X-XFCE-CommandsWithParameter=sh -c "brave -- %s"
After all these steps the Brave browser now comes up in the Favorite Applications settings. So finally I am able to set Brave as default browser AND external links successfully do open in an already running Brave insance :+1:
My complete Brave starter file looks like below
[Desktop Entry]
Name=Brave
Comment=Brave laptop and desktop browser
GenericName=Web Browser
Exec=sh -c "brave -- %U"
Icon=brave
Type=Application
StartupNotify=true
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
Type=X-XFCE-Helper
X-XFCE-Category=WebBrowser
X-XFCE-Commands=/usr/bin/brave
X-XFCE-CommandsWithParameter=sh -c "brave -- %s"
Hopefully someone will find this helpful...
cc @bsclifton @posix4e for this last comment
after invoking
xdg-settings set default-web-browser brave.desktop
I am opening links from Thunderbird successfully (using the same brave.desktop as here https://github.com/brave/browser-laptop/issues/9193#issuecomment-320704098)
Re-opening after reverting https://github.com/brave/browser-laptop/pull/10375 with https://github.com/bsclifton/browser-laptop/commit/027589c3053e4e0581a3c5508b75c6fd600659f4
Myself, @darkdh, and @bridiver noticed issues where launching in dev mode would always open file://usr/local/brave/browser-laptop-bootstrap/src/browser-laptop
The previous fix is still in place (the desktop file). This is a confirmed fix for multiple folks. It would be great to understand the remaining fix. It might be as easy as adding this to the desktop file:
Type=X-XFCE-Helper
X-XFCE-Category=WebBrowser
X-XFCE-Commands=/usr/bin/brave
X-XFCE-CommandsWithParameter=sh -c "brave -- %s"
Repos that would need updating: https://github.com/brave/electron-installer-debian https://github.com/brave/electron-installer-redhat
Closing this issue as the largest use-cases are resolved
For XFCE, I created the following issue: https://github.com/brave/browser-laptop/issues/10897 cc: @crysman, @MrksKwsnck, @imolein
It sounds like we may need to create a similar issue for KDE (per comment by @aliddell)
I'm having this problem on Elementary OS as well... I tried the latest beta and I still can't open links when the browser is already opened
Stumbled on this thread, still same issue on arch with generic binary, opens window but no tab no link.
EDIT: my workaround is calling a script instead of brave....
#!/bin/bash
brave -- $1
This problem still persists and tbh it's a bit hard to imagine it doesn't float to high priority bugs.
A simplified example. When I have this link displayed in my terminal: https://www.google.com/search?q=brave%20error
and I click on it, then brave opens following URL: https://www.google.com/search?q=brave
Firefox and Chrome handle these just fine.
The problem occurs also when opening links from Slack where this becomes annoying very quickly.
@smetj Have you tried this while one of our new brave-core builds set as your default browser? I suspect the issue is resolved there. We'll be upgrading users from the older Muon build in the near future.
@jonathansampson thanks for the quick reply. Indeed ... I have now switched to the brave dev version and ... the problem is gone.
I agree with the above - this is damaging to uptake - I can't get people to use Brave if they can't open a link from an external source :/ I'm running this on Stretch, and none of the above work for me - I can't even find a way to open a link from the command line without quoting the URL, and can't use a script to open as in @stephonarch approach.
I'd rather use a repo than build / install a brave-core builed (not even sure what that is!).
Sorry to be down - but would really like a solution that I can pass on to people to get Brave adopted.
Xubuntu 16.10 Brave 0.15.310 rev 6b5e4e2 os.platform linux os.release 4.8.0-53-generic os.arch x64
Issue: opening URL from external application (Thunderbird/LibreOffice) does not work any more. It works only when there is no Brave instance running yet. When Brave is running already, it focuses the Brave Window, but no tab is opened :/
Steps to reproduce:
Actual result: When Brave is running already, it focuses the Brave Window, but no tab is opened :/
Expected result: URL gets opened in Brave as before
Will the steps above reproduce in a fresh profile? If not what other info can be added? Do not know
Is this an issue in the currently released version? Yes
Can this issue be consistently reproduced? Yes, various restarts performed