Skip to content
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

[Client App] Can't install for Brave on Linux #116

Closed
PoorPocketsMcNewHold opened this issue Oct 1, 2019 · 6 comments
Closed

[Client App] Can't install for Brave on Linux #116

PoorPocketsMcNewHold opened this issue Oct 1, 2019 · 6 comments
Labels

Comments

@PoorPocketsMcNewHold
Copy link

System

             ............                pm@Velvet4Renaissance 
         .';;;;;.       .,;,.            --------------------- 
      .,;;;;;;;.       ';;;;;;;.         OS: Deepin 15.11 x86_64 
    .;::::::::'     .,::;;,''''',.       Model: MS-7918 1.0 
   ,'.::::::::    .;;'.          ';      Kernel: 5.3.1-xanmod1 
  ;'  'cccccc,   ,' :: '..        .:     Uptime: 11 minutes 
 ,,    :ccccc.  ;: .c, '' :.       ,;    Packages: 1984 
.l.     cllll' ., .lc  :; .l'       l.   Shell: bash 4.4.12 
.c       :lllc  ;cl:  .l' .ll.      :'   Resolution: 3440x1440 
.l        'looc. .   ,o:  'oo'      c,   DE: Deepin 
.o.         .:ool::coc'  .ooo'      o.   WM: KWin 
 ::            .....   .;dddo      ;c    Theme: Deepin [GTK2/3] 
  l:...            .';lddddo.     ,o     Icons: Deepin [GTK2/3] 
   lxxxxxdoolllodxxxxxxxxxc      :l      Terminal: deepin-terminal 
    ,dxxxxxxxxxxxxxxxxxxl.     'o,       CPU: Intel i7-4790 (8) @ 4.0GHz 
      ,dkkkkkkkkkkkkko;.    .;o;         GPU: NVIDIA GeForce GTX 1060 6GB 
        .;okkkkkdl;.    .,cl:.           Memory: 5003MB / 32055MB 
            .,:cccccccc:,.                
                                         ████████████████████████ 
                                          
  • OS name: [e.g. Windows, Ubuntu] deepin (Debian Based)
  • OS version: [e.g. 10] 15.11
  • Browser name: [e.g. Chrome, Firefox] Brave-browser-beta
  • Browser version: [e.g. 60] Version 0.70.104 Chromium: 77.0.3865.90

Extension

buster-client-setup-v0.2.0-linux-amd64
* Extension version: [e.g. 1.0.0]

* User input simulation: [e.g. yes, no]

* Client app version: [e.g. 1.0.0]
* Client app installed successfully: [e.g. yes, no]

Bug description
The client app seems to not being able to distinguish between Brave browser and chromium, suggesting by default to install in what would be the chromium install directory (Which is inexistant btw)

Logs

Browser: Brave Browser Beta 0.70.104

// REPLACE WITH LOGS
Something went wrong
The installation has failed. Check the browser console for more details, and open an issue on GitHub if this error persists.

script.js:1 Error: Attempting to use a disconnected port object
// REPLACE WITH LOGS

A way to fix this, outside of making the client app able distinguish between the two, is to replace the Chromium directory, to this following one :
/home/USER/.config/BraveSoftware/Brave-Browser(Or add ¨-Beta¨ or ¨-Nightly¨)/NativeMessagingHosts

@dessant
Copy link
Owner

dessant commented Oct 1, 2019

@PoorPocketsMcNewHold, thanks for the detailed bug report, and for sharing a workaround!

@dessant dessant pinned this issue Oct 1, 2019
@dessant dessant changed the title [Client App] Can´t seems to tell the difference between Chromium and Brave. [Client App] Can't install for Brave on Linux and macOS Oct 1, 2019
@PoorPocketsMcNewHold
Copy link
Author

Just to clarify, Buster can be installed on Brave, and does work perfectly (Despite all the previous issues with it since). It just that the Brave Client installer doesn't detect the correct folder to install itself, on the Brave browser.

@PoorPocketsMcNewHold
Copy link
Author

Alright, so finally, I've been wrong. The google-chrome folder proposed by Buster does exist, and its remains of a preinstalled Google Chrome on my Linux distribution (deepin).
After installing that system and setting it up for the fourth time since the beginning of October (Yeah, I've broken it multiples times by trying to fiddle it with Debian things), I've noticed that this folder was actually still present, even after Google Chrome being removed.
Capture d'écran Deepin_dde-desktop_20191002163423
The client app still seems to make the same mistake after that google-chrome folder being completely removed, but it might be due to cache maybe.
Also, note that, When removing any versions of the brave browser (The deepin store serves older versions, so i've added the Debian Brave repo manually) Those configs folders still remains as their dedicated Brave folders.

@dessant dessant unpinned this issue Oct 4, 2019
@PoorPocketsMcNewHold
Copy link
Author

Little precision, I’ve changed my distribution, to OpenSUSE, and during the install of the buster client, it did make the assumption that it was Google Chrome, despite the following google-chrome folder not being existent on this distribution.

@dessant
Copy link
Owner

dessant commented Feb 6, 2020

There is no good way for the browser extension to detect that it is running in Brave, because Brave does not support the runtime.getBrowserInfo API, and the user agent is taken from Chrome.

Brave currently reads Chrome's native messaging registry key on Windows, and they check Chrome's native messaging manifest on macOS.

brave/brave-browser#5272

Brave should either do the same on Linux, or give extensions a way to detect the browser they're running in. I'd suggest to open a bug report for this on the Brave issue tracker.

@dessant dessant closed this as completed Feb 6, 2020
@dessant dessant changed the title [Client App] Can't install for Brave on Linux and macOS [Client App] Can't install for Brave on Linux Feb 6, 2020
@dessant
Copy link
Owner

dessant commented Feb 9, 2020

To summarize, the workaround to install the client app for Brave on Linux is to copy or move the manifest file created by the client app installer for Chrome. After the installer shows an error, run this command from your terminal:

cp ~/.config/google-chrome/NativeMessagingHosts/org.buster.client.json ~/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants