pdf / kdeconnect-chrome-extension

A browser extension to send pages and content from your browser to connected KDE Connect devices.
https://chrome.google.com/webstore/detail/kde-connect/ofmplbbfigookafjahpeepbggpofdhbo
MIT License
234 stars 30 forks source link

Support for brave browser #30

Closed gmparker2000 closed 3 years ago

gmparker2000 commented 5 years ago

I would love to have this working in brave browser (https://brave.com/). The extension installs but cannot find any devices.

pdf commented 5 years ago

Works fine on Brave here, please provide the following:

gmparker2000 commented 5 years ago

That's great that it should work. When I ran the install I picked chromium. Details are:

OS DISTRIB_ID=ManjaroLinux DISTRIB_RELEASE=18.0.4 DISTRIB_CODENAME=Illyria DISTRIB_DESCRIPTION="Manjaro Linux"

Browser Brave Version 0.67.119 Chromium: 76.0.3809.72 (Official Build) unknown (64-bit)

kdeconnect-cli kdeconnect-cli 1.3.5

kdeconnect-cli devices

kdeconnect-chrome-extension version kdeconnect-chrome-extension version 0.1.3, built with go1.9.2

pdf commented 5 years ago

Please download this pre-release, extract it and run ./kdeconnect-chrome-extension -devices

gmparker2000 commented 5 years ago

Not working in the browser. I get this:

kdeconnect-cli --list-devices

pdf commented 5 years ago

@gmparker2000 can you please post the output from the native host from my last message (I made a test build of the native host with a flag to output the devices it sees)?

gmparker2000 commented 5 years ago

I grabbed the pre-release. I ran it and got:

./kdeconnect-chrome-extension --devices

Is this what you want?

pdf commented 5 years ago

Great thanks, so it looks like the native host can talk to DBUS/kdeconnect okay, but somehow the browser extension is not getting that information. The extension should display an error in that case, so I'm a little confused.

Can you right-click the extension icon, select Manage Extensions, enable Developer Mode top-left, then enable Collect Errors. Restart your browser, click the extension icon once, then right-click it and select Manage Extensions again. If there are any errors, there will be an extra section there where you can view them, please post them here if they exist.

Sorry for the long-winded troubleshooting, but I can't reproduce any problems here.

gmparker2000 commented 5 years ago

No error on the extension page. If I turn on developer tools and inspect the background page I see a bunch of errors on the console:

background.js:54 Missing message parameters {type: "typeVersion"}
postMessage @ background.js:54
onMessage @ background.js:70
(anonymous) @ browser-polyfill.min.js:1

and

Error in event handler: TypeError: Cannot read property 'postMessage' of null
    at postMessage (<URL>)
    at onMessage (<URL>)
    at <URL>

Happenning here:

function postMessage(msg) {
    if (!port || !msg || !msg.type) {
        console.error('Missing message parameters', msg);
    }
    port.postMessage(msg);
}
pdf commented 5 years ago

Seems to be having trouble talking to the native host in an unusual way. I'll try and make some time tonight to do some testing, but nothing obvious jumps out.

zany130 commented 5 years ago

same issue here

pdf commented 5 years ago

I'm struggling to reproduce, which makes this tough for me to diagnose. I'll have to try spinning up a VM to test in a clean environment, but I just haven't had the time recently.

hauweg commented 4 years ago

Yes, support for Brave please <3

pdf commented 4 years ago

Thing is, it works fine on Brave here, so it's confusing why it doesn't work for some other people with that browser.

malachy47 commented 4 years ago

I came across this thread via search as I too am having the same issue. KDE Connect works fine from the tray, but the Brave extension does not see any device. Running KDE Neon (Ubuntu 20 based).

pdf commented 4 years ago

Seems Brave messed something up in some versions wrt paths for native messaging hosts. Try choosing Chrome from the native host installer and see if that works.

https://github.com/brave/brave-browser/issues/5074

MatheusR42 commented 3 years ago

@malachy47 I managed to enable it. You need to follow the installation steps, select custom browser and add the Brave NativeMessagingHosts path. Mine is this:

/home/usrername/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts

My config: Kubuntu 20 kdeconnect-cli 1.4.0 Brave V1.21.74

manavdesai27 commented 3 years ago

@pdf I am facing the same issue. On running ./kdeconnect-chrome-extension -devices I get the following:

Redmi K20 Pro: efa2d98185289bc2 (paired: true; reachable: false)

Can you help me fix this. I need to be able to run this extension on brave.

pdf commented 3 years ago

Try with the v0.1.6 release just published, and choose Brave when installing, hopefully this works for Brave users on current versions - they've made quite a mess of the paths.