René's URL Explorer Experiment


Title: Messaging: TypeError: this.onTokenRefreshInternal is not a function · Issue #1855 · angular/angularfire · GitHub

Open Graph Title: Messaging: TypeError: this.onTokenRefreshInternal is not a function · Issue #1855 · angular/angularfire

X Title: Messaging: TypeError: this.onTokenRefreshInternal is not a function · Issue #1855 · angular/angularfire

Description: Version info Angular: 6.0.9 Firebase: 5.4.1 AngularFire: 5.0.0-rc.12 How to reproduce these conditions const msg: AngularFireMessaging = this.msg; msg.tokenChanges.subscribe( (token) => console.log('@@@ tokenchange', token), (err) => con...

Open Graph Description: Version info Angular: 6.0.9 Firebase: 5.4.1 AngularFire: 5.0.0-rc.12 How to reproduce these conditions const msg: AngularFireMessaging = this.msg; msg.tokenChanges.subscribe( (token) => console.log...

X Description: Version info Angular: 6.0.9 Firebase: 5.4.1 AngularFire: 5.0.0-rc.12 How to reproduce these conditions const msg: AngularFireMessaging = this.msg; msg.tokenChanges.subscribe( (token) => console....

Opengraph URL: https://github.com/angular/angularfire/issues/1855

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Messaging: TypeError: this.onTokenRefreshInternal is not a function","articleBody":"### Version info\r\n\r\nAngular: 6.0.9\r\nFirebase: 5.4.1\r\nAngularFire: 5.0.0-rc.12\r\n\r\n### How to reproduce these conditions\r\n\r\n```\r\n            const msg: AngularFireMessaging = this.msg;\r\n            msg.tokenChanges.subscribe(\r\n                (token) =\u003e console.log('@@@ tokenchange', token),\r\n                (err) =\u003e console.log('@@@ tokenchange ERROR', err),\r\n            );\r\n```\r\n\r\n### Debug output\r\n\r\n** Errors in the JavaScript console **\r\n```\r\n@@@ tokenchange ERROR TypeError: this.onTokenRefreshInternal is not a function\r\n    at Observable.push../node_modules/@firebase/messaging/dist/index.esm.js.WindowController.onTokenRefresh [as _subscribe] (index.esm.js:1883)\r\n    at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe (Observable.js:42)\r\n    at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe (Observable.js:28)\r\n    at subscribeTo.js:21\r\n    at subscribeToResult (subscribeToResult.js:6)\r\n    at SwitchMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/switchMap.js.SwitchMapSubscriber._innerSub (switchMap.js:47)\r\n    at SwitchMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/switchMap.js.SwitchMapSubscriber._next (switchMap.js:40)\r\n    at SwitchMapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:54)\r\n    at angularfire2.js:59\r\n    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)\r\n```\r\n\r\n### Expected behavior\r\n\r\nNo error. Problem seems to be in messaging.ts: https://github.com/angular/angularfire2/blob/185943f60012d8c3dcf7cc26413e3278f9e426be/src/messaging/messaging.ts#L56\r\n```\r\n    const tokenChanges = this.messaging.pipe(\r\n      switchMap(messaging =\u003e new Observable(messaging.onTokenRefresh)),\r\n      runOutsideAngular(zone)\r\n    );\r\n```\r\n\r\nmessaging.onTokenRefresh is not bound. As a workaround I've done this myself and this fixes the issue:\r\n```\r\n                const _messaging = app.messaging();\r\n                _messaging.onTokenRefresh = _messaging.onTokenRefresh.bind(_messaging);\r\n\r\n```\r\n\r\nPS. other observables in messaging.ts seem to follow the same pattern and do not bind to this","author":{"url":"https://github.com/wvanderdeijl","@type":"Person","name":"wvanderdeijl"},"datePublished":"2018-09-05T10:34:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/1855/angularfire/issues/1855"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:87486ec5-0f33-81fa-386d-b3c1faa82475
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9F08:11ACF6:605BC3:82C557:6A5A7B0E
html-safe-nonce79cdedeb5e4f423347726439dfac9bcb36a08e8c2ff15e9906f0b1f2763cf1a6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjA4OjExQUNGNjo2MDVCQzM6ODJDNTU3OjZBNUE3QjBFIiwidmlzaXRvcl9pZCI6IjgyODM2MDA4MTg4MTA4MTMxOTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd8dfec1a78a8d699bfe20a0aa365865200b5c6ca9df4c093ae683dcad48e30a3
hovercard-subject-tagissue:357166890
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/1855/issue_layout
twitter:imagehttps://opengraph.githubassets.com/de90062f3147ae38d439a75e97e0783de21ba8c2765739240f3d2d40c716c695/angular/angularfire/issues/1855
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/de90062f3147ae38d439a75e97e0783de21ba8c2765739240f3d2d40c716c695/angular/angularfire/issues/1855
og:image:altVersion info Angular: 6.0.9 Firebase: 5.4.1 AngularFire: 5.0.0-rc.12 How to reproduce these conditions const msg: AngularFireMessaging = this.msg; msg.tokenChanges.subscribe( (token) => console.log...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamewvanderdeijl
hostnamegithub.com
expected-hostnamegithub.com
None922bdba685ea48400234d557977f0e32d9adbae6f5125725b4f48cacc6801106
turbo-cache-controlno-preview
go-importgithub.com/angular/angularfire git https://github.com/angular/angularfire.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id49453413
octolytics-dimension-repository_nwoangular/angularfire
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49453413
octolytics-dimension-repository_network_root_nwoangular/angularfire
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0437efb828a4041956ce45d1f7fe69fff38926c7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angularfire/issues/1855#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fissues%2F1855
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fissues%2F1855
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangularfire
Reloadhttps://github.com/angular/angularfire/issues/1855
Reloadhttps://github.com/angular/angularfire/issues/1855
Reloadhttps://github.com/angular/angularfire/issues/1855
Please reload this pagehttps://github.com/angular/angularfire/issues/1855
angular https://github.com/angular
angularfirehttps://github.com/angular/angularfire
Notifications https://github.com/login?return_to=%2Fangular%2Fangularfire
Fork 2.2k https://github.com/login?return_to=%2Fangular%2Fangularfire
Star 7.8k https://github.com/login?return_to=%2Fangular%2Fangularfire
Code https://github.com/angular/angularfire
Issues 295 https://github.com/angular/angularfire/issues
Pull requests 20 https://github.com/angular/angularfire/pulls
Discussions https://github.com/angular/angularfire/discussions
Actions https://github.com/angular/angularfire/actions
Projects https://github.com/angular/angularfire/projects
Security and quality 0 https://github.com/angular/angularfire/security
Insights https://github.com/angular/angularfire/pulse
Code https://github.com/angular/angularfire
Issues https://github.com/angular/angularfire/issues
Pull requests https://github.com/angular/angularfire/pulls
Discussions https://github.com/angular/angularfire/discussions
Actions https://github.com/angular/angularfire/actions
Projects https://github.com/angular/angularfire/projects
Security and quality https://github.com/angular/angularfire/security
Insights https://github.com/angular/angularfire/pulse
Messaging: TypeError: this.onTokenRefreshInternal is not a functionhttps://github.com/angular/angularfire/issues/1855#top
https://github.com/wvanderdeijl
wvanderdeijlhttps://github.com/wvanderdeijl
on Sep 5, 2018https://github.com/angular/angularfire/issues/1855#issue-357166890
https://github.com/angular/angularfire2/blob/185943f60012d8c3dcf7cc26413e3278f9e426be/src/messaging/messaging.ts#L56https://github.com/angular/angularfire2/blob/185943f60012d8c3dcf7cc26413e3278f9e426be/src/messaging/messaging.ts#L56
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.