Polyfill-service: Polyfill 3.17.0 service update - Electron detection not working properly

Created on 16 Mar 2017  路  7Comments  路  Source: Financial-Times/polyfill-service

Hello,

I've moved this into a separate issue from my initial comment here.

At some point yesterday, my electron app started having issues with Polyfill.io due to it loading the Element polyfill, as I have my unknown policy set to polyfill. While it had worked fine until yesterday, it suddenly started detecting electron as an unknown/unsupported browser. The exact comment at the top is:

/* Polyfill service v3.17.0
 * For detailed credits and licence information see https://github.com/financial-times/polyfill-service.
 * 
 * UA detected: electron/1.4.0 (unknown/unsupported; using policy `unknown=polyfill`)
 * Features requested: Array.prototype.find,Array.prototype.findIndex,Array.prototype.includes,Date.now,String.prototype.endsWith,String.prototype.includes,String.prototype.startsWith,console.error,console.info,fetch,performance.now
 * 
 * - Object.defineProperty, License: CC0 (required by "Array.prototype.find", "Array.prototype.findIndex", "Array.isArray", "Promise", "fetch", "Event", "XMLHttpRequest")
 * - Array.prototype.find, License: CC0
 * - Array.prototype.findIndex, License: CC0
 * - Array.prototype.includes, License: CC0
 * - Date.now, License: CC0 (required by "performance.now")
 * - String.prototype.endsWith, License: CC0
 * - String.prototype.includes, License: CC0
 * - String.prototype.startsWith, License: CC0
 * - Window, License: CC0 (required by "console.error", "console.info", "console", "console.log", "Event", "Promise", "fetch", "XMLHttpRequest")
 * - console, License: CC0 (required by "console.error", "console.info", "console.log")
 * - console.log, License: CC0 (required by "console.error", "console.info")
 * - console.error, License: CC0
 * - console.info, License: CC0
 * - Array.prototype.forEach, License: CC0 (required by "fetch")
 * - Object.getOwnPropertyNames, License: CC0 (required by "fetch")
 * - setImmediate, License: CC0 (required by "Promise", "fetch")
 * - Array.isArray, License: CC0 (required by "Promise", "fetch")
 * - Document, License: CC0 (required by "Event", "Promise", "fetch", "XMLHttpRequest", "Element")
 * - Element, License: CC0 (required by "Event", "Promise", "fetch", "XMLHttpRequest")
 * - Event, License: CC0 (required by "Promise", "fetch", "XMLHttpRequest")
 * - Promise, License: MIT (required by "fetch")
 * - XMLHttpRequest, License: CC0 (required by "fetch")
 * - fetch, License: MIT
 * - performance.now, License: CC0 */

All 7 comments

What's the User-Agent string?

On Mac: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) WELLMessenger/1.1.0 Chrome/53.0.2785.143 Electron/1.4.13 Safari/537.36"
On Windows: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) WELLMessenger/1.1.0 Chrome/53.0.2785.143 Electron/1.4.13 Safari/537.36"

@rubencodes do you know what browser/family we were previously detecting this UA as?

I'm not sure to be honest 馃槙 Given Electron is just a wrapped up Chromium build, probably something in that family, but I don't know for certain.

It looks like if we remove the Electron/X.Y.Z tag, it detects your UAs as Chrome 53. Would that be appropriate for Electron?

That would be perfect!

See #1147

Was this page helpful?
0 / 5 - 0 ratings

Related issues

romainmenke picture romainmenke  路  5Comments

kentcdodds picture kentcdodds  路  5Comments

EECOLOR picture EECOLOR  路  3Comments

dcherman picture dcherman  路  7Comments

b-strauss picture b-strauss  路  6Comments