GithubHelp home page GithubHelp logo

Comments (15)

lukeredpath avatar lukeredpath commented on July 24, 2024

No, I'd expect the auth request failure to bubble up to the delegate instead. Looks like I'm not checking for failure before trying to parse the auth response.

from libpusher.

soffes avatar soffes commented on July 24, 2024

This is happening a decent amount in a beta build of one of my apps since I'm using Heroku with only one Dyno and it's timing out. I would really appreciate a fix :)

from libpusher.

lukeredpath avatar lukeredpath commented on July 24, 2024

I think this should be enough to fix the issue; it looks like the appropriate delegate method will be called if the auth operation fails (the underlying connection error will be available in the NSError passed to the delegate method in the userInfo, with the NSUnderlyingErrorKey).

I think the only problem was the attempt to try and parse the response data when the response was not successful, resulting in the crash you were getting.

I'll trigger a new nightly build for you to download and try.

from libpusher.

soffes avatar soffes commented on July 24, 2024

Thanks man! I'll test and verify as soon as you post it.

from libpusher.

soffes avatar soffes commented on July 24, 2024

Works great. Thanks!

from libpusher.

s5 avatar s5 commented on July 24, 2024

I'm getting this crash on the nightly build and in 1.4.

from libpusher.

lukeredpath avatar lukeredpath commented on July 24, 2024

Hi, are you able to provide a backtrace?

from libpusher.

s5 avatar s5 commented on July 24, 2024

It's identical to what the original poster provided above. Do you need any additional information?

On Wednesday, October 3, 2012 at 4:52 AM, Luke Redpath wrote:

Hi, are you able to provide a backtrace?


Reply to this email directly or view it on GitHub (#44 (comment)).

from libpusher.

s5 avatar s5 commented on July 24, 2024

Okay, I was finally able to build libPusher from source (whew!), and I added this quick fix to PTPusherChannelAuthorizationOperation.m

  if (responseData) {
      authorizationData = [[PTJSON JSONParser] objectFromJSONData:responseData];
  } else {
      authorizationData = nil;
  }

Without regard for matching your coding style or any other aspect of your code's logic (need to push an emergency update to the app store). Let me know if you'd like me to commit this fix.

The conditions are trying to authorize a private channel when the server is completely off and not even listening for connections.

from libpusher.

lukeredpath avatar lukeredpath commented on July 24, 2024

Thanks for this. If it works, please use it for our app. I will have a look at this tomorrow. The fix looks good, I'd just like to try and get a failing test case too. I plan to release a 1.4.1 release shortly so this will make it in.

from libpusher.

s5 avatar s5 commented on July 24, 2024

Great. Should I be attempting to push this over to you (getting 403 errors)?

from libpusher.

lukeredpath avatar lukeredpath commented on July 24, 2024

No need, thanks.

Sent from my iPad

On 3 Oct 2012, at 22:39, s5 [email protected] wrote:

Great. Should I be attempting to push this over to you (getting 403 errors)?


Reply to this email directly or view it on GitHub.

from libpusher.

teameh avatar teameh commented on July 24, 2024

I got the same error using the latest lib, is this not commited yet?

from libpusher.

lukeredpath avatar lukeredpath commented on July 24, 2024

For those having a problem with this, can you please try the latest HEAD (nightly build will be available tonight).

from libpusher.

jeffblake avatar jeffblake commented on July 24, 2024

This issue is still present. Hard to reproduce, but happens every so often for our clients

from libpusher.

Related Issues (20)

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.