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.

unexpected end of stream on Connection{api.push.apple.com:443, proxy=DIRECT hostAddress=api.push.apple.com

See original GitHub issue

It dose not work when I code like this,and I found a problem,it seems that initialization is slow and the responese is “…unexpected end of stream on Connection…”

		String distr = "C:\\Users\\KY\\Desktop\\tmp\\my_distr_apns_180205.p12";

				 String token = "4e13279f3ae16874717afcb5399b706f16a03cf9ceda4c51de702df986099e47";


		FileInputStream cert = new FileInputStream(distr);
		final ApnsClient client = new ApnsClientBuilder()
				.withProductionGateway()
				.inSynchronousMode()
				.withCertificate(cert)
				.withPassword("mypwd")
				.withDefaultTopic("topic")
				.build();

		Notification n = new Notification.Builder(token)
				.alertBody("hello").build();

		NotificationResponse response = client.push(n);
		System.out.println(response);

but I use this https://github.com/notnoop/java-apns, it dose work.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Ja0ck5commented, Feb 9, 2018

Sorry about that.

0reactions
judepereiracommented, Apr 5, 2018

Closing due to inactivity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem using new APN api.push.apple.com - Apple Developer
We get a positive response from the APN servers (Connected to APNS Message successfully delivered 456) but the push does not arrive on...
Read more >
If your Apple devices aren't getting Apple push notifications
Learn what to do if your Apple devices don't see Apple push notifications when connected to a network.
Read more >
api.development.push.apple.com times out
My push server code recently intermitently stopped working for developer notifications at https://api.development.push.apple.com:443/3/device/.
Read more >
Connecting to APNS from push server via 443
I'm wondering about statement in article https://developer.apple.com/ ... or has anybody tried to send Push Notifications via api.push.apple.com:443 ?
Read more >
what are those network connections to push.apple.com
I"ve notices that when I am at work behind a http proxy, my OSX Lion is making a huge amout of HTTPS connections...
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