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
233 stars 29 forks source link

The KDE extension no longer connects to the native host. #40

Closed GeorgiKarapetrov closed 3 years ago

GeorgiKarapetrov commented 3 years ago

Describe the bug The KDE extension no longer connects to the native host.

To Reproduce Steps to reproduce the behavior:

  1. Click on 'the KDE app on firefox'
  2. See error

Expected behavior I expect to be able to push pages to my phone.

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

  1. I installed the native host with $ ./kdeconnect-chrome-extension --install
  2. I choose firefox.
  3. I don't have the kdeconnect-chrome-extension command even though the installation returns "Done".
  4. To get the extension version I ran $ ./kdeconnect-chrome-extension -version in the folder I downloaded the release.
  5. The output of ./kdeconnect-chrome-extension -devices is
    - M2007J17G: 46e375af63a1a84d (paired: true; reachable: false)
    - moto g(6) plus: d77def02f49fa64c (paired: true; reachable: true)

Please, let me know if I can provide some log or run some debug command for you or if we should move this to another issue.

I don't know if it is relevant but recently I reinstalled my OS instance on a fresh drive, keeping my home folder.

GeorgiKarapetrov commented 3 years ago

Sorry, I don't see that this is necessarily a bug but I can't change the label now, can I?

pdf commented 3 years ago

For 3, that is expected - the application is not installed on the path.

To confirm, firefox is installed from standard packages, not via flatpak or anything unusual?

Please provide the output for ls -al ~/.mozilla/native-messaging-hosts/.

You can also check for errors by opening the URL: about:devtools-toolbox?id=kde-connect%400xc0dedbad.com&type=extension in Firefox. Unfortunately that will show errors for all extensions, so doing this in a clean profile with only this extension installed would be ideal.

GeorgiKarapetrov commented 3 years ago

Thanks for your help.

Firefox is installed via a standard package.

The output of ls -al ~/.mozilla/native-messaging-hosts/ is

total 5340
drwxrwx--- 2 george george    4096 12 май 16:16 .
drwxrwx--- 6 george george    4096 13 апр 2020 ..
-rw-r--r-- 1 george george 5447398  9 юни 20:20 com.0xc0dedbad.kdeconnect_chrome
-rw-r--r-- 1 george george     253  9 юни 20:20 com.0xc0dedbad.kdeconnect_chrome.json
-rw-r--r-- 1 george george     171 12 май 16:16 com.samhh.bukubrow.json
-rw-r--r-- 1 george george     262 10 юни 12:22 org.keepassxc.keepassxc_browser.json

Now, opening about:devtools-toolbox?id=kde-connect%400xc0dedbad.com&type=extension in a clean profile with only KDEConnect showed that $HOME/.mozilla/native-messaging-hosts/com.0xc0dedbad.kdeconnect_chrome did not exist or was not executable.

It was not executable and making it executable fixed the KDEConnect extension.

To explain, during the recent re-installation of the OS instance, I kept the /home folder but I messed up its permissions. Then I changed them recursively to "read and write" for the owner and "read" permissions to everybody else. Since then I have been making scripts executable (and sensitive files non-readable) as the need appears.

Thanks again. I would not have known to look at about:devtools-toolbox?id=kde-connect%400xc0dedbad.com&type=extension on my own. Is there a neat way to generalize this "address" to non-kdeconnect related issues? What does it mean?

pdf commented 3 years ago

Glad it's sorted for you! Makes sense - the installer would overwrite the contents of the file, but would not alter the permissions of an existing file.

You can get to that interface via about:debugging -> This Firefox, and then inspecting any extension, as I say though - unfortunately Firefox does not filter output in this view to the extension you're looking at, so a clean profile limited to the extension you're interested in will give the best results.