Getting error Could not resolve host: push-notifications.nextcloud.com when trying to call someone

When I call other person from my iphone , I can see this error happen imidiately in the nextcloud.

{
	"reqId":"YR1NUh1C79ugcicIZfOR3wAAAAs",
	"level":3,
	"time":"2021-08-18T18:11:32+00:00",
	"remoteAddr":"192.168.1.31",
	"user":"vitachaos",
	"app":"notifications",
	"method":"POST",
	"url":"/nextcloud/ocs/v2.php/apps/spreed/api/v3/call/w2obyzg3",
	"message":{"Exception":"GuzzleHttp\\Exception\\ConnectException",
	"Message":"cURL error 6: Could not resolve host: push-notifications.nextcloud.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://push-notifications.nextcloud.com/notifications",
	"Code":0,
	"Trace":[
	{
		"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
		"line":158,
		"function":"createRejection",
		"class":"GuzzleHttp\\Handler\\CurlFactory",
		"type":"::"
	},
	{
		"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
		"line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory",
		"type":"::"
	},
	{
		"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php",
		"line":47,
		"function":"finish",
		"class":"GuzzleHttp\\Handler\\CurlFactory",
		"type":"::"
	},
	{
		"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php",
		"line":28,
		"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},
	{
		"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php",
		"line":48,
		"function":"GuzzleHttp\\Handler\\{closure}",
		"class":"GuzzleHttp\\Handler\\Proxy",
		"type":"::",
		"args":["*** sensitive parameters replaced ***"]
	},
	{
		"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php",
		"line":64,
		"function":"GuzzleHttp\\Handler\\{closure}",
		"class":"GuzzleHttp\\Handler\\Proxy",
		"type":"::",
		"args":["*** sensitive parameters replaced ***"]
	},
	{
		"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,
		"function":"__invoke",
		"class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},
	{
		"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php",
		"line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::",
		"args":["*** sensitive parameters replaced ***"]
	},
	{
		"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
		"line":63,
		"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware",
		"type":"->"},
		{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}",
		"class":"GuzzleHttp\\Middleware",
		"type":"::",
		"args":["*** sensitive parameters replaced ***"]
		},
		{
			"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
			"line":331,
			"function":"__invoke",
			"class":"GuzzleHttp\\HandlerStack","type":"->"
		},
		{
			"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
			"line":168,
			"function":"transfer",
			"class":"GuzzleHttp\\Client","type":"->"
		},
		{
			"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
			"line":187,
			"function":"requestAsync",
			"class":"GuzzleHttp\\Client","type":"->"
		},
		{
			"file":"/var/www/html/nextcloud/lib/private/Http/Client/Client.php",
			"line":307,
			"function":"request","class":"GuzzleHttp\\Client",
			"type":"->"
		},
		{
			"file":"/var/www/html/nextcloud/apps/notifications/lib/Push.php",
			"line":298,
			"function":"post",
			"class":"OC\\Http\\Client\\Client","type":"->"
		},
		{
			"file":"/var/www/html/nextcloud/apps/notifications/lib/Push.php",
			"line":121,
			"function":"sendNotificationsToProxies",
			"class":"OCA\\Notifications\\Push","type":"->"
			},
			{
				"file":"/var/www/html/nextcloud/apps/notifications/lib/App.php",
				"line":95,
				"function":"flushPayloads",
				"class":"OCA\\Notifications\\Push",
				"type":"->"
			},
			{
				"file":"/var/www/html/nextcloud/lib/private/Notification/Manager.php",
				"line":238,
				"function":"flush",
				"class":"OCA\\Notifications\\App","type":"->"},
			{
				"file":"/var/www/html/nextcloud/apps/spreed/lib/Notification/Listener.php",
				"line":265,
				"function":"flush",
				"class":"OC\\Notification\\Manager","type":"->"},
			{
				"file":"/var/www/html/nextcloud/apps/spreed/lib/Notification/Listener.php",
				"line":102,
				"function":"sendCallNotifications",
				"class":"OCA\\Talk\\Notification\\Listener","type":"->"},
			{
				"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
				"line":251,
				"function":"OCA\\Talk\\Notification\\{closure}",
				"class":"OCA\\Talk\\Notification\\Listener","type":"::",
				"args":["*** sensitive parameters replaced ***"]
			},
			{
				"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,
				"function":"callListeners",
				"class":"Symfony\\Component\\EventDispatcher\\EventDispatcher",
				"type":"->"
			},
			{
				"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
				"line":86,
				"function":"dispatch",
				"class":"Symfony\\Component\\EventDispatcher\\EventDispatcher",
				"type":"->"
			},
			{
				"file":"/var/www/html/nextcloud/apps/spreed/lib/Service/ParticipantService.php",
				"line":494,
				"function":"dispatch",
				"class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},
			{
				"file":"/var/www/html/nextcloud/apps/spreed/lib/Controller/CallController.php",
				"line":163,
				"function":"changeInCall","class":"OCA\\Talk\\Service\\ParticipantService",
				"type":"->"
				},
			{
				"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
				"line":218,
				"function":"joinCall",
				"class":"OCA\\Talk\\Controller\\CallController","type":"->"},
			{
				"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
				"line":127,
				"function":"executeController",
				"class":"OC\\AppFramework\\Http\\Dispatcher",
				"type":"->"
				},
			{
				"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php",
				"line":157,
				"function":"dispatch",
				"class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"
			},
			{
				"file":"/var/www/html/nextcloud/lib/private/Route/Router.php",
				"line":302,
				"function":"main",
				"class":"OC\\AppFramework\\App",
				"type":"::"
			},
			{
				"file":"/var/www/html/nextcloud/ocs/v1.php",
				"line":63,
				"function":"match","class":"OC\\Route\\Router","type":"->"
			},
			{
				"file":"/var/www/html/nextcloud/ocs/v2.php",
				"line":24,
				"args":["/var/www/html/nextcloud/ocs/v1.php"],
				"function":"require_once"
			}]
			,
			"File":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php",
			"Line":210,
			"CustomMessage":"--"},
			"userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v12.1.0",
			"version":"21.0.3.1",
			"id":"611d4d950c593"
			}

I have formatted stacktrace for engineers to easy understand.

If I do the same in then web interface the chat window collapses. please help fix this issue if it can be fixed.

also why if I have self hosted nextcloud sending push notification to nextcloud.com

Please make sure your server can connect to push-notifications.nextcloud.com.

Unluckily this is required to be able to send the push notifications for mobile apps. See https://github.com/nextcloud/notifications/blob/master/docs/push-v2.md for some details and the tech description. I can ensure you that the content is encrypted in a way that nextcloud.com can not see the actual content of the notification. The subject inside the notification is encrypted with the users key unknown to us. At the same time the notification itself needs to be sent with a developer certificate unknown to the nextcloud, as otherwise any nextcloud could attempt to spam any push/mobile device.

1 Like

That seems to be not working , how and what needs to be fixed ? I don’t even know what to torubleshoot for nextcloud server to be connected ?