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

[messaging] using navigator serviceWorker #2497

Closed
wants to merge 2 commits into from
Closed

[messaging] using navigator serviceWorker #2497

wants to merge 2 commits into from

Conversation

hiepxanh
Copy link
Contributor

@hiepxanh hiepxanh commented Jun 13, 2020

Checklist

base on this solution #1904 (comment)

Description

fixing a bug because this.angularFireMessaging.messages not trigger new message any more

Code sample

nothing changes

Update new message source from serviceWorker instead of messaging observable
@hiepxanh
Copy link
Contributor Author

@yasinkocak I just push new code, that pass the Javis Test

Copy link
Member

@jamesdaniels jamesdaniels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, this should help. Approved. I'll play around with this a bit and then merge.

@jamesdaniels
Copy link
Member

It also seems a fix is coming upstream firebase/firebase-js-sdk#3221

@hiepxanh
Copy link
Contributor Author

perfect, I will update my PR once they complete that change @jamesdaniels

@khaledwalid
Copy link

khaledwalid commented Jun 25, 2020

@hiepxanh , can you Told me the right version of @angular/fire and firebasejs from gstatic because i have also the issue that when i'm not receiving an notification

@hiepxanh
Copy link
Contributor Author

"firebase": "^7.14.5", and "@angular/fire": "^6.0.0", sir @khaledwalid

@hiepxanh
Copy link
Contributor Author

it is imposible to fix this, some how big problem come from firebase-messaging-sw.js
image
some how my browser not update new version, so I try everything I can but still cannot receive notification in forground. Even update the latest @angular/fire or firebase (newest version with fix is Fix FCM rxjs Incompatibility
)

@hiepxanh
Copy link
Contributor Author

After research, the last firebase version auto add the firebase-messsaging-sw.js file for me. But when I update the firebase in package.json the firebase-messsaging-sw.js is just not update automaticly with the new version. Solution:
I have to create my own firebase-messaging-sw.js that matching to current firebase version:
image

@hiepxanh
Copy link
Contributor Author

Close since firebase release new version that fix this bug, I think we need to update the document, because I have serious trouble, the message in foreground is not fired if you have missmatch firebase version in firebase-messaging-sw.js

@hiepxanh hiepxanh closed this Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants