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
Error when sending a push notification through the Docker Library #7
Comments
Hi @kdimitrov, It's the hard question for me. |
Hey Arthur, I tried to make the same request with wrong bundle ID and wrong team id but the error is persisting even with your docker image. I also tried to send a push notification using the node.js app in this example: https://eladnava.com/send-push-notifications-to-ios-devices-using-xcode-8-and-swift-3/ And it worked, which means that my details are correct. If you can give me any further advice I would be thankful. |
Are there any errors or just empty response? |
I don't see any errors except for the main one: Fuel\Core\PhpErrorException [ Notice ]:
Undefined offset: 1
/Users/l2l/Developer/Server/fuel/vendor/edamov/pushok/src/Client.php @ line 95
90 $responseCollection = [];
91 foreach ($handles as $handle) {
92 curl_multi_remove_handle($mh, $handle);
93 $result = curl_multi_getcontent($handle);
94
95 list($headers, $body) = explode("\r\n\r\n", $result, 2);
96 $statusCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
97 $responseCollection[] = new Response($statusCode, $headers, $body);
98 }
99
100 curl_multi_close($mh);
Backtrace
COREPATH/bootstrap.php @ line 103
/Users/l2l/Developer/Server/fuel/vendor/edamov/pushok/src/Client.php @ line 95
APPPATH/classes/lib/push/notifications.php @ line 68
APPPATH/classes/controller/api/base.php @ line 507
COREPATH/base56.php @ line 37
COREPATH/classes/controller/rest.php @ line 153
COREPATH/classes/request.php @ line 454
DOCROOT/index.php @ line 53``` |
Ok, I need some time to investigate this problem |
Thanks for your input. I highly appreciate it. If you need any other details from me just let me know. |
Seems I found the reason of the bug. I think it is the same error with my docker image and with your environment. |
Thanks for the heads up. I noticed that but unfortunately I am not able to install a stable version of lib-curl that is compiled with http/2 support on the distribution where my code is deployed (Amazon AWS Linux). Do you know if only lib-curl should be compiled with http/2 support or apache and php must be recompiled with that option as well ? Please let me know when the docker image is fixed. |
For me only recompiling lib-curl was helpful. |
I created new docker image with HTTP\2 support. So now it should work correct. |
Hey there,
First of all thank you for the library.
I've been doing some tests and because I couldn't get it to work on Amazon Linux AWS I deployed your docker machine but I still get an error.
The error is:
Undefined offset: 1 in vendor/edamov/pushok/src/Client.php on line 95
I've been checking what actually causes the error and it seems that this line:
$result = curl_multi_getcontent($handle);
returns and empty response.
My team id and certificate combination is correct.
If you can give me a heads up or any guidance how to fix this I will be more than grateful.
Thanks in advance.
The text was updated successfully, but these errors were encountered: