Bug 212925

Summary: www/chromium: chrome.runtime.getPlatformInfo is broken
Product: Ports & Packages Reporter: nE0sIghT <ykonotopov>
Component: Individual Port(s)Assignee: Carlos J. Puga Medina <cpm>
Status: Closed FIXED    
Severity: Affects Many People CC: cpm
Priority: --- Keywords: patch, patch-ready
Version: LatestFlags: cpm: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch none

Description nE0sIghT 2016-09-23 16:30:15 UTC
Trying to use chrome.runtime.getPlatformInfo Chromium API call [1] I get error in terminal:
----
[2564:416779264:0923/191125:ERROR:linux_util.cc(122)] Not implemented reached in std::string base::GetLinuxDistro()
----

Also this javascript error is thrown in Chromium:
----
Error in response to runtime.getPlatformInfo: TypeError: Cannot read property 'os' of undefined

Error
Unchecked runtime.lastError while running runtime.getPlatformInfo: Platform information unavailable.
----

Chromium on FreeBSD should return some well known and documented by Google value - "linux" or "openbsd" [2].

This error is prevents GNOME Shell integration for Chrome [3] to work on FreeBSD.

[1] https://developer.chrome.com/extensions/runtime#method-getPlatformInfo
[2] https://developer.chrome.com/extensions/runtime#type-PlatformOs
[3] https://wiki.gnome.org/Projects/GnomeShellIntegrationForChrome
Comment 1 Carlos J. Puga Medina freebsd_committer 2017-05-10 17:16:10 UTC
(In reply to nE0sIghT from comment #0)

Is this bug still relevant? I cannot reproduce the issue.
Comment 2 nE0sIghT 2017-05-19 18:54:14 UTC
This is still issue with latest Chromium on FreeBSD 11.
Although there is no error message in terminal runtime.getPlatformInfo still not works.
Comment 3 Carlos J. Puga Medina freebsd_committer 2017-05-21 03:08:17 UTC
Created attachment 182769 [details]
patch
Comment 4 nE0sIghT 2017-05-23 19:05:08 UTC
Comment on attachment 182769 [details]
patch

Attached patch is fixed error, however recent version of chrome-gnome-shell will not work with introduced platform value since this is not documented.
I will add support for "freebsd" value in next chrome-gnome-shell version.
Comment 5 Carlos J. Puga Medina freebsd_committer 2017-05-24 22:26:59 UTC
(In reply to nE0sIghT from comment #4)

I'll commit the patch over the weekend.

Thanks!
Comment 6 commit-hook freebsd_committer 2017-06-01 12:03:45 UTC
A commit references this bug:

Author: cpm
Date: Thu Jun  1 12:02:42 UTC 2017
New revision: 442282
URL: https://svnweb.freebsd.org/changeset/ports/442282

Log:
  - Fix runtime.getPlatformInfo on FreeBSD [1]
  - Don't use the PDFium bundle freetype [2]
  - Bump PORTREVISION

  PR:		212925 [1], 219448 [2]
  Submitted by:	Jan Kokemueller <jan.kokemueller@gmail.com> [2]
  Reported by:	Yuri Konotopov <ykonotopov@gmail.com> [1]

Changes:
  head/www/chromium/Makefile
  head/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc
  head/www/chromium/files/patch-extensions_common_api_runtime.json
  head/www/chromium/files/patch-third__party_pdfium_pdfium.gni
Comment 7 Carlos J. Puga Medina freebsd_committer 2017-06-01 12:05:02 UTC
Committed!

Thanks