Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'firebase-messaging' element causes an error on-message when combined with the 'share-menu' element #307

Open
fredmanders opened this issue Nov 21, 2017 · 0 comments

Comments

@fredmanders
Copy link

Description

I have the firebase-messaging element from polymerfire and the share-menu element in the same element in my app. When I receive a Firebase Cloud message in the foreground, the on-message event is fired. I think the widgets.js from Twitter also intercepts this event, resulting in an error.

Expected outcome

The firebase-messaging elements on-message event is handled without any errors.

Actual outcome

An error occurs:

Uncaught TypeError: Cannot read property 'twttr.button' of undefined at o (widgets.js:formatted:4740) at s._onMessage (widgets.js:formatted:4772) at widgets.js:formatted:694 at HTMLElement.fire (legacy-element-mixin.html:372) at firebase-messaging.html:114 at Array.forEach (<anonymous>) at Object.next (firebase-messaging.html:112) at firebase-app.js:3453 at firebase-app.js:3453 at <anonymous> o @ widgets.js:formatted:4740 _onMessage @ widgets.js:formatted:4772 (anonymous) @ widgets.js:formatted:694 fire @ legacy-element-mixin.html:372 (anonymous) @ firebase-messaging.html:114 (anonymous) @ firebase-messaging.html:112 (anonymous) @ firebase-app.js:3453 (anonymous) @ firebase-app.js:3453 Promise resolved (async) e.sendOne @ firebase-app.js:3453 e.forEachObserver @ firebase-app.js:3453 e.next @ firebase-app.js:3453 (anonymous) @ firebase-messaging.js:1618

Steps to reproduce

  1. Put a firebase-messaging element in the page.
  2. Put a share-menu element in the page.
  3. Open the page in a web browser.
  4. Receive a Firebase Cloud message with the page in the foreground.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant