2011-06-07

00:45 <Wraithan> tjgillies: the payment gateway we use at work, when it fails hard, it sends back html 404/500. It is not XHTML so it makes the XML parser I used go fuckin nuts :(
00:45 <Loqi> aww, cheer up
02:45 aaronpk joined #geoloqi
08:53 <aaronpk> Wraithan: lol that sucks. check the request status code or something
09:10 MarkDilley joined #geoloqi
09:33 caseorganic-m joined #geoloqi
09:48 AgentOO7 joined #geoloqi
09:50 <AgentOO7> Aaron, I got my iOS app to authenticate to the geoloqi service and register its APN token, but now broadcasting doesn't work with both the permanent and temporary OAuth token, unfortunately.
09:51 <aaronpk> ok, let me check it out
09:51 <AgentOO7> Thanks. I do get the push notifications sent from UrbanAirship's website.
09:52 <aaronpk> looks like it found the right UA account to use now
09:52 <aaronpk> and I see a push went out to two devices. can you check your UA logs to see if there are errors there?
09:54 <AgentOO7> Well, I have been getting warnings about the same inactive device token: Skipped inactive device token: E24F04E8FF221133E8FC3B46571DDCD9 382007FFA25E25DB17B1AB52EC935924 Original Message: {"aps": {"alert": {"body": "Help 33.765106201171875 -84.38817596435547", "action-loc-key": null}}, "geoloqi": {"type": "message"}}
09:56 <AgentOO7> Let me try clearing out all my device tokens from UrbanAirship's website.
09:57 <aaronpk> I only see two devices registered with your client_id, they are 5d8... and 615...
09:57 <aaronpk> don't bother trying it with the permanent access token, that will only send out a push through the geoloqi app
09:58 <aaronpk> and make sure you're sending the account/set_apn_token method of the geoloqi api
09:59 <AgentOO7> Yup, I call set_apn_token within the registerForPushNotification method.
09:59 <aaronpk> ok great, so I see two tokens that were set that way
09:59 <aaronpk> an iphone and an ipad
10:00 <tjgillies> aaronpk: are you gonna add iMessage to geoloqi? ;)
10:00 <aaronpk> tjgillies: I haven't read the developer docs about imessage yet, do they have apis?
10:01 <aaronpk> AgentOO7: I saw two pushes attempted to go out through your account
10:01 <tjgillies> aaronpk: not sure im assuming they do, now im curious
10:01 <tjgillies> goes to look at docs
10:02 <AgentOO7> Aaron, yeah, I just tried re-registering my device tokens after clearing them from my UrbanAirship account and then attempted to send another broadcast, but still nothing :-(
10:03 <aaronpk> hmm, I didn't see an error from UA this time
10:03 <AgentOO7> And, I made sure I had my geoloqi app running in the background and checking in my location in high-res mode.
10:04 <aaronpk> ah I have another thought
10:04 <aaronpk> one sec
10:05 <aaronpk> ok found the problem, give me a minute
10:08 <tjgillies> 1 minute until aaronpk done
10:08 <Loqi> I added a countdown scheduled for 6/7 10:09am
10:09 <Loqi> aaronpk done
10:09 <AgentOO7> ;-)
10:09 <aaronpk> damn
10:09 <Loqi> hehe
10:18 <AgentOO7> goes to make himself a cup of sweet tea
10:18 <aaronpk> nice. almost done.
10:42 <AgentOO7> has returned
10:45 <aaronpk> great timing. give it another shot
11:07 aaronpk joined #geoloqi
11:09 _aaronpk joined #geoloqi
11:16 aaronpk joined #geoloqi
11:21 <aaronpk> AgentOO7: looks like it tried to send to the right account this time, did you get the push to your ipad?
11:21 <aaronpk> device token starts with 5d886...
11:22 <AgentOO7> Nope :-( Let me try one more time just to be sure....
11:22 <AgentOO7> Hmmm...still nothing.
11:23 <aaronpk> strange, that looks like it should be working now. Can you verify the device token you get when you register for notifications? I'm getting "5d886..." from you now for the ipad
11:23 <AgentOO7> Ok lemme check
11:24 <AgentOO7> Yeah, here's one device token: 5D886A8BE0D40C3182DC57DD03A56B412A26B629416181DF6DD04B5FC5BCEB21
11:24 <aaronpk> ok and when you send a test push from UA's console to that token you get it?
11:25 <AgentOO7> Yep, push notifications from UA's console works.
11:26 <aaronpk> ooh question -- has your app been in the foreground when you're sending these messages?
11:26 <AgentOO7> Nope
11:27 <AgentOO7> Well, the app my iPhone that's sending the broadcast, yes. But not for the app on my iPad2, which is receiving the broadcast
11:27 <aaronpk> k
11:30 <aaronpk> i'm going to try a few things
11:30 <AgentOO7> I don't know if this helps, but when I try to send a broadcast from my *iPad*, I got a 403 error: access denied to this layer
11:32 <aaronpk> hmm, the message/broadcast method only allows sending broadcasts to layers that the authenticating user owns
11:33 <AgentOO7> Doh. I had assumed that subscribers to a layer can send broadcasts to anyone else subscribed to that layer...
11:35 <aaronpk> ah, that is an interesting use case we hadn't considered
11:35 <AgentOO7> Well, I don't want to break your security model, Aaron.
11:36 <aaronpk> well the way around that is by having your mobile clients make a request to your server, where your server can then make a request to Geoloqi with your app's authentication
11:36 <AgentOO7> But I was hoping my "good samaritan" app would let people send requests for help to and for anyone subscribed to the layer.
11:36 <AgentOO7> Ah, true.
11:37 <AgentOO7> Alright, I'm gonna come back to it. Gonna take a break. Thanks again for all your help!
11:38 <AgentOO7> takes a break
11:38 <aaronpk> ok great. i'll see if i can figure out the UA problem in the mean time
11:38 <AgentOO7> Ok cool
11:52 <Wraithan> aaronpk: the soap lib I was using didn't give me the option to check, it did the request and everything itself... there is a reason I wont ever use SUDS again.
11:52 <Wraithan> er
11:52 <Wraithan> suds
11:52 <aaronpk> aha
11:55 <aaronpk> that is unfortunate
11:59 <Wraithan> yeah, I just do it myself for the most part now, isn't that hard to construct soap objects and send them off.
12:03 <tjgillies> soap?
12:03 <tjgillies> heh soap is of the devil
12:03 <Wraithan> agreed.
13:37 MarkDilley joined #geoloqi
14:31 caseorganic-m joined #geoloqi
16:48 MarkDilley_ joined #geoloqi
17:11 <Loqi> [[API/link/create]] http://geoloqi.org/wiki/index.php?diff=716&oldid=427&rcid=747 * Aaronpk * (+490)
20:27 MarkDilley joined #geoloqi
23:54 AgentOO7 joined #geoloqi