Bug 241379

Summary: www/plasma5-plasma-browser-integration: Chromium extension not working
Product: Ports & Packages Reporter: Patricio Villar <patovm04>
Component: Individual Port(s)Assignee: kde
Status: Closed FIXED    
Severity: Affects Many People CC: grahamperrin, tcberner
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   

Description Patricio Villar 2019-10-20 20:10:53 UTC
Plasma Browser Integration extension reports "Unsupported operating system", "This extension is only supported on Linux and FreeBSD" after installing it on Chromium 76.0.3809.132
Although it does work perfectly on Firefox.
It happens at least with plasma5-plasma-browser-integration 5.17 as well as 5.16.5 AFAICT
Any ideas?
Comment 1 Patricio Villar 2019-11-27 01:13:48 UTC
Updated many apps as well as the OS. Now I'm using the following:
-FreeBSD 12.1-RELEASE-p1
-plasma5-plasma-browser-integration 5.17.3
-Chromium 78.0.3904.108
-Plasma Integration extension 1.7

Still wouldn't work, but the message displayed by the extension changed to:
"Failed to connect to the native host.
Make sure the 'plasma-browser-integration' package is installed correctly and that you are running Plasma 5.13 or later.
Specified native messaging host not found"

Doing a bit more of research I found a workaround:
Apparently Chromium was looking for:
/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json instead of:
/usr/local/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json

So I did this:
mkdir -p ~/.config/chromium/NativeMessagingHosts/ ;
ln -s /usr/local/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json ~/.config/chromium/NativeMessagingHosts/org.kde.plasma.browser_integration.json

And problem solved!
Comment 2 Tobias C. Berner freebsd_committer 2019-11-27 06:08:28 UTC
(In reply to patricio from comment #1)

Hi there, 

awesome -- thanks for the investigation. We will patch it to search in the correct location


mfg Tobias
Comment 3 Patricio Villar 2019-11-27 15:00:46 UTC
(In reply to Tobias C. Berner from comment #2)
Awesome! Thank you Tobias
Comment 4 commit-hook freebsd_committer 2019-11-28 17:40:42 UTC
A commit references this bug:

Author: tcberner
Date: Thu Nov 28 17:40:13 UTC 2019
New revision: 518595
URL: https://svnweb.freebsd.org/changeset/ports/518595

Log:
  www/plasma5-plasma-browser-integration: fix chrome integration

  The extension-file got installed into the wrong directory:
     etc/opt/chrome/
  instead of
     etc/chrome/
  and therefore was not found by chrome. Correct this.

  PR:		241379
  Reported by:	Patricio Villar <patovm04@gmail.com>

Changes:
  head/www/plasma5-plasma-browser-integration/Makefile
  head/www/plasma5-plasma-browser-integration/files/
  head/www/plasma5-plasma-browser-integration/files/patch-CMakeLists.txt
  head/www/plasma5-plasma-browser-integration/pkg-plist
Comment 5 Patricio Villar 2019-12-04 13:53:34 UTC
Can confirm this is solved in plasma5-plasma-browser-integration 5.17.3_1
Thanks for fixing the port ;)