Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

FCM subscription fails with Polymer build js: minify=true #210

@ackushiw

Description

@ackushiw

Description

When using polymerfire's <firebase-messaging> in a production bundle with minified JavaScript FCM registration fails.

Expected outcome

Registration token for using FCM

Actual outcome

Error in console

code: "messaging/token-subscribe-failed"
message: "Request contains an invalid argument."

Steps to reproduce

follow setup guide for polymerfire messaging
With polymer.json configured

{
    "name": "unbundled",
    "addServiceWorker": true,
    "swPrecacheConfig": "sw-precache-config.js",
    "js": {"minify": true},
    "css": {"minify": true},
    "html": {"minify": true}
  }

in terminal polymer serve build/unbundled

in browser enable notifications and check console for errors

Temporary Solution

in polymer.json
set "js": {"minify": false}

Browsers Affected

  • Chrome
  • Android Chrome
  • Opera
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions