Comments (8)
what redis client do you use ?
from apnmachine.
bundle list shows "redis (2.2.2)".
from apnmachine.
where do you get the error ? in rails or the server process ?
from apnmachine.
On the apnmachined log. I'm not running as a daemon.
I'm trying to send the notification from the Rails console.
from apnmachine.
Ok, then. How do you start the server?
On 11 juil. 2012, at 17:37, Phill Kenoyer
[email protected]
wrote:
On the apnmachined log. I'm not running as a daemon.
Reply to this email directly or view it on GitHub:
#7 (comment)
from apnmachine.
I have tried with and without bundle exec
bundle exec apnmachined --pem config/certs/apn_production.pem
Here is the full console output:
deploy@staging$ bundle exec apnmachined --pem config/certs/apn_production.pem I, [2012-07-12T17:00:00.035131 #20145] INFO -- : Connecting to Apple Servers I, [2012-07-12T17:00:00.076611 #20145] INFO -- : Starting APN Server on Redis I, [2012-07-12T17:00:00.105656 #20145] INFO -- : Connection to Apple Servers completed <SSL_incomp>I, [2012-07-12T17:00:00.311641 #20145] INFO -- : Connection closed D, [2012-07-12T17:00:25.926670 #20145] DEBUG -- : TOKEN:[removed for privacy] | ALERT:{"aps"=>{"alert"=>"hello"}} E, [2012-07-12T17:00:25.926873 #20145] ERROR -- : Reconnecting connection to APN D, [2012-07-12T17:00:25.928521 #20145] DEBUG -- : Sending notification to APN E, [2012-07-12T17:00:25.928826 #20145] ERROR -- : Unable to handle: undefined local variable or method `host' for #<ApnMachine::Server::Client:0x00000001d76da0> I, [2012-07-12T17:00:25.968099 #20145] INFO -- : Connection to Apple Servers completed <SSL_incomp>I, [2012-07-12T17:00:26.131432 #20145] INFO -- : Connection closed
I was using APN Sender and it was nice except they were monkey patching rails and breaking things. It uses Resque.
I switched to Rapns and it runs fine but I don't like it polling the DB.
So I know that sending notifications works fine. I just don't know if I'm doing something wrong or if there is a bug in apnmachine. I have tried on my Mac and also my Debian staging server on Linode.
PS, I just now noticed the SSL_incomp in the log output. Same on my server.
from apnmachine.
Found the error.
In client.rb line 22
Config.logger.debug "#{Time.now} [#{host}:#{port}] New notif"
host and port do not exist. I think they should be apn_host and apn_port. I changed it to that and my notifications work now.
from apnmachine.
Strange, it's already fixed in master.
Changed my Gemfile to read:
gem 'apnmachine', git: 'https://github.com/jnak/apnmachine.git', branch: 'master'
Now I'm all set.
from apnmachine.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apnmachine.