Giter Club home page Giter Club logo

safari-push-notifications's People

Contributors

connorlacombe avatar dturton avatar surrealroad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

safari-push-notifications's Issues

No check after send push

Hello,
I have problem, i have some message error to significate not all push are send.

And i see the server have not check after send push and if the connection fail/bug between two push all rest of push are ignored..

If you have solution,
Thanks,
Martin

Is SSL obligatory?

I'm pushing notifications to iOS apps without SSL. Are Safari notifications somehow different or is it uniquely this script that requires an SSL cert?

You have denied this website permission to send push notifications.

Its always says: "You have denied this website permission to send push notifications."
and there is nothing inside logs folder, I believe the problem is in the config.php file

1- I upload all the files into https://domain.com/push
so on the WEBSERVICE_URL and ALLOWED_DOMAINS and URL_FORMAT
it should be 'https://domain.com/push' or just 'https://domain.com' ?

2- on CERTIFICATE_PATH
it should be './push/cert.p12' or './push/cert.p12' or just './cert.p12' ?

How to use it?

Hello,

I need help here
1)how to create pushpackage? what will be the URL to create push package?
i am using https://www.domain.com/safari/index.php/pushPackages
and changed code and set $function = $path[2];
but here whats the $version = $path[0] ?
$body = json_decode($body, true); is empty
$userid = $body["id"]; is empty too
2)how to use log?

Requests must be mapped to /v1/request (for example https://push.yoursite.com/v1/pushPackages must be a valid URL) - the included .htaccess file should do this for you if you upload the files to the server root

My using now https://www.domain.com/safari/index.php/v1/pushPackages
$version = $path[2];
$function = $path[3];
so now have query here:
$body = json_decode($body, true); is empty
$userid = $body["id"]; is empty too

so what to do here?
please help me

in website.json getting token like:
"authenticationToken": "authenticationToken_",

No pushs, no registration and errors in logs

Hello,

Since today, I do not get the push on my website. Registration not work either.

I installed the patch to tls Friday and it worked fine until today.

My certificate has not expired but I see it in the logs :

[Mon Oct 27 14:26:10 2014] [error] [client xx.xxx.xx.xx] PHP Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:\nerror:14094415:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate expired in /home/XXX/domains/XXX/private_html/kg/index.php on line 197
[Mon Oct 27 14:26:10 2014] [error] [client xx.xxx.xx.xx] PHP Warning: stream_socket_client(): Failed to enable crypto in /home/XXX/domains/XXX/private_html/kg/index.php on line 197
[Mon Oct 27 14:26:10 2014] [error] [client xx.xxx.xx.xx] PHP Warning: stream_socket_client(): unable to connect to tls://gateway.push.apple.com:2195 (Unknown error) in /home/XXX/domains/XXX/private_html/kg/index.php on line 197
[Mon Oct 27 14:26:10 2014] [error] [client xx.xxx.xx.xx] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /home/XXX/domains/XXX/private_html/kg/index.php on line 133
[Mon Oct 27 14:26:10 2014] [error] [client xx.xxx.xx.xx] PHP Warning: Missing argument 4 for connect_apns(), called in /home/XXX/domains/XXX/private_html/kg/index.php on line 134 and defined in /home/XXX/domains/XXX/private_html/kg/index.php on line 192
[Mon Oct 27 14:26:10 2014] [error] [client xx.xxx.xx.xx] PHP Warning: Missing argument 5 for connect_apns(), called in /home/XXX/domains/XXX/private_html/kg/index.php on line 134 and defined in /home/XXX/domains/XXX/private_html/kg/index.php on line 192
[Mon Oct 27 14:26:10 2014] [error] [client xx.xxx.xx.xx] PHP Notice: Undefined variable: passphrase in /home/XXX/domains/XXX/private_html/kg/index.php on line 195
[Mon Oct 27 14:26:10 2014] [error] [client xx.xxx.xx.xx] PHP Notice: Undefined variable: caFile in /home/XXX/domains/XXX/private_html/kg/index.php on line 196

For information, Debian no longer accepts SSLv3

I'm trying to change the index.php to something else

I changed the index.php to push.php
and changed the .htaccess from:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

to:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ push.php/$1 [L]

it worked perfect..

but now the 404 error page is not working, it redirect the visitors to push.php instead of 404 error page.

Is there any way to fix that with .htaccess?

Not Getting Request Dialog

I have set everything up via the directions provided and I am getting the following issues:

  1. On one machine it says "You have denied this website permission to send push notifications." If i click the I changed my mind option is just refreshes to show the same thing.
  2. On a second machine it just constantly says "requesting permission" but the dialog box never shows up.

site in question is: https://tchpush.thechipkahouse.com

It is worth noting I have tested the cert and key files on apples production server and they will make and hold a connection through telnet.

Apple Error Console is showing an error on live 8 of the bootstrap.min.js file

Error is TypeError: 'undefined' is not a function (evaluating 'a')

I also enabled the error display on the index page as you suggested to andrebazaglia and I am getting the following error there: Undefined offset: 1 in /home/azchipka/public_html/tchpush/index.php on line 33

which is reference to : $function = $path[1];

Kinda playing the trial and error game at this point. Thinking this problem is related to the certificate since that is such an annoying process in this whole thing.

I ran the command openssl s_client -connect gateway.push.apple.com:2195 -CAfile apns-cert.pem which generated the following error: verify error:num=20:unable to get local issuer certificate
verify return:0

The big problem I am encountering here is that your directions say to use: openssl x509 -in website_aps_production.cer -inform der -out apns-cert.pem -nodes -clcerts to which I am being told by terminal -nodes is an unknown option.

Using the directions referenced from your site for certificate creation found here (http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1) the certs make and pass the test presented and hold the connection to the server.

Also when I use the testing code provided by apple openssl s_client -connect gateway.push.apple.com:2195 -cert tch.pem -debug -showcerts -CAfile tchpushercert.pem the connection reports fine with no errors.

Thanks in advance for any help you can provide.

Sign Package with AppleWWDCA

openssl_pkcs7_sign("$package_dir/manifest.json", $signature_path, $cert_data, $private_key, array(), PKCS7_BINARY | PKCS7_DETACHED);

Download AppleWWDRCA.cer

Convert to PEM

openssl x509 -inform der -in AppleWWDRCA.cer -out AppleWWDRCA.pem

and change line to

openssl_pkcs7_sign("$package_dir/manifest.json", $signature_path, $cert_data, $private_key, array(), PKCS7_BINARY | PKCS7_DETACHED,"AppleWWDRCA.pem");

Denied permission

I fulfill all the requirements like using SSL (valid certificate), uploading files to the root folder etc. But the only message I get is "You have denied this website permission to send push notifications". If I log the request_uri to the error_log, the path remains "/". I also uploaded the .htaccess file to my /var/www/html (root). The function variable remains empty thus. If i replace this with a string "pushPackages", like the function name, it goes into that block successfully for downloading the push package. But in my browser instead of showing me the permission dialog, it downloads the file to my Download folder. I can see the animation from the Safari download button to my Download folder. Should this happen?

Not possible to add new tokens in the database if the user is not connected

I just noticed that for months, there are no new mac added to the database. I just understand why.

If you are a user logged on to the site and you sign up to receive pushs -> your mac is saved in the database

If you do not have an account on the site (ie "userID": "0") ->
no new mac added to the database

Send Notifications by Packages

Hello,

Firstly thank you for your work.

Is it possible to send notifications by packages? because currently only the first 2000 registered devices receive push (approximately). the others receive nothing.

Why not send per 1000 tokens:

-> Sending 1000
-> We close the connection with Apple
-> Another 1000
-> We close
-> ...

I currently have 17,000 registered Mac, 15000 not receive anything. the problem is present in all users of your code.

Regards

You have denied this website permission to send push notifications.

Hello

I generated the certificate, pen file etc.. etc..``
but when i visit the push server

i have
"You have denied this website permission to send push notifications."

I take more hours for search why it's display this but I don't found?

How can i use this service ?

PHP Warning: openssl_x509_read

Hi!

The push notification has been working for about a year, then the certificate expired.
I made another certificate but whenever I tried to subscribe it says "You have denied this website permission to send push notifications"
and the error log is:
PHP Warning: openssl_x509_read() [function.openssl-x509-read]: supplied parameter cannot be coerced into an X509 certificate! in createPushPackage.php on line 80
PHP Warning: openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error getting cert in createPushPackage.php on line 82
PHP Warning: file_get_contents(/tmp/pushPackage1426701463/signature) [function.file-get-contents]: failed to open stream: No such file or directory in createPushPackage.php on line 85
PHP Warning: file_get_contents(/tmp/pushPackage1426701463.zip) [function.file-get-contents]: failed to open stream: No such file or directory in index.php on line "echo file_get_contents($package_path);"
PHP Warning: unlink(/tmp/pushPackage1426701463.zip) [function.unlink]: No such file or directory in index.php on line "unlink($package_path);"

Doesn't send any push notification!

I get the permission and the device token saved to the DB, but when I try to send a push notification nothing happen!

I tried to convert the cer to pem as it describe on the README
"openssl x509 -in website_aps_production.cer -inform der -out apns-cert.pem -nodes -clcerts"
but I got an error which says: "-nodes is an unknown option."
so I tried the ways described here:
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
which is:
openssl x509 -in website_aps_production.cer -inform der -out apns-cert.pem

but when I tried to test it, it says:
"verify error:num=20:unable to get local issuer certificate"

then I saw on this website it says that error is just fine!
http://lessons.runrev.com/m/4069/l/53405

so I tried another way which convert the ,p12 also to pem them combined them into new .pem as it described on the both up websites, but same thing I'm not getting any push notification!

I also tried the Demo on this website: https://kandutech.net and it's working just fine! but on my website I didn't get any notification.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.