question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pushUpdates seems to be broken

See original GitHub issue

I tried to call const res = await template.pushUpdates(deviceToken) to send an APN which leads my app to close immediately.

I debugged the source and when I comment out the apn.unref(); command pushUpdates promise resolves. For me it feels apn.unref(); belongs to the http2 eventhandlers where promise rejects and resolves.

image

After my code change node process keeps running as the comment promises so I worked around with

	console.log('done')
	const res = await template.pushUpdates(deviceToken)
	console.log('done')
	template.apn.unref()

Very weird that apn.unref(); acts like process.exit() Can some one point me to what I am doing wrong here? Or is it a bug?

Best regards.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
s-acommented, May 27, 2020

Success would be status 200. I ve created a small module at https://www.npmjs.com/package/@s-a/simple-apn. Hope this helps 👍

1reaction
s-acommented, May 26, 2020

You need to init template object with your public and private key. I can post some code tomorrow which works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

STOP PUSHING BROKEN UPDATES!! : r/Windows10 - Reddit
I'm almost done with Windows 10. This *** keep pushing broken updates to me even if I disable the update completely. Every time...
Read more >
Tired of updates that break things - Microsoft Community
My software requires the updates. I have to install them as they are brought out. It seems like your review and QC department...
Read more >
Why is Windows update so broken? - Thurrott.com
<p>I think Windows Update has always been broken. I don't mean bad updates. I mean it doesn't seem that Windows is built with...
Read more >
File push order seems to be broken · Issue #624 · google/clasp
Update .clasp.json with script id from new project. Push project via clasp push . Open/refresh dupe(formerly blank) GAS project.
Read more >
How to Fix Problems Caused by Windows Updates - Lifewire
Computer slow or broken after a Windows update? Here's what to do ... This includes security updates that are pushed out on ​Patch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found