pushd
pushd copied to clipboard
crash at second HTTP POST /subscribers
Bonjour,
so I'm posting to /subscribers like so :+1:
NSString* dToken = [[[deviceToken description]
stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]]
stringByReplacingOccurrencesOfString:@" "
withString:@""];
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
NSDictionary *parameters = @{@"proto": @"apns", @"token":dToken};
[manager POST:@"http://<myserveurplease>/subscribers" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSString* id = [responseObject valueForKey:@"id"];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
- The first time I got a deviceId.
- without changing one line of code, I rerun the app
- crash (the server)
Here's the log output :
/pushd_server/node_modules/redis/index.js:563
throw callback_err;
^
TypeError: Cannot read property '0' of undefined
at /pushd_server/lib/subscriber.coffee:147:20
at Command.callback (/pushd_server/node_modules/redis/index.js:1105:17)
at RedisClient.return_error (/pushd_server/node_modules/redis/index.js:559:25)
at HiredisReplyParser.
j'ai créé une pull request : https://github.com/rs/pushd/pull/63
... in the hope this will help someone
hmmm ok I think there's an issue with my redis install.
I'm getting this kind of error when subscribing to an event.
Damn my saturday morning :(