GithubHelp home page GithubHelp logo

Comments (14)

hpopp avatar hpopp commented on May 20, 2024 4

Funny you bring this up, this is the last major thing to address before v1.0. I'm still deciding on the best way to go about it-- either implementing chatterbox as the HTTP2 client or fully fleshing out the custom one I've already written. My plan is to have something like this in the next release.

from pigeon.

idyll avatar idyll commented on May 20, 2024

That's fantastic. If you need help testing/benchmarking, let us know. I'd be super interested in your thoughts on chatterbox for this, even if you don't decide to use it.

from pigeon.

hpopp avatar hpopp commented on May 20, 2024

I'm thoroughly impressed with chatterbox. Didn't take very long to get it working, and it handles async responses like a champ. It also made fetching the apns-id from the response headers trivial, so I went ahead and added support for it in the APNS.Notification struct.

I pushed a branch of the new changes to play with (not refactored in the slightest). I still haven't read through chatterbox's source thoroughly enough to understand how it behaves with concurrent stream ids, but I'm guessing it should play nice with Apple's servers. From my basic testing so far I've had no problems sending pushes and getting proper responses.

from pigeon.

nathany avatar nathany commented on May 20, 2024

Thanks for working on this. I upgraded to Pigeon 0.8.0 but I'm seeing the following error when running my tests:

** (Mix) Could not start application pigeon: Pigeon.start(:normal, []) returned an error: shutdown: failed to start child: :apns_worker
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function :h2_client.start_link/3 is undefined (module :h2_client is not available)

Am I missing a dependency?

from pigeon.

nathany avatar nathany commented on May 20, 2024

I guess that's Chatterbox -- I don't know how to get it and don't see anything in the readme.

from pigeon.

nathany avatar nathany commented on May 20, 2024
{:chatterbox, ">= 0.0.0", git: "[email protected]:joedevivo/chatterbox.git"},

okay. 👍

from pigeon.

nathany avatar nathany commented on May 20, 2024

It's pretty speedy now. Thanks Henry.

Since chatterbox isn't on hex and isn't a dependency of Pigeon, it could use some documentation for adding it to mix.exs.

There's no recent tag so I'm just using the latest commit for now:

{:chatterbox, ">= 0.0.0", github: "joedevivo/chatterbox", ref: "a01a71bc2713921a60430522cf7323cfa99ffc0e"},

/cc @joedevivo

from pigeon.

joedevivo avatar joedevivo commented on May 20, 2024

There's a 0.3.0 tag that's pretty recent

from pigeon.

hpopp avatar hpopp commented on May 20, 2024

Does mix not auto install github dependencies or am I missing something here? Chatterbox 0.3.0 is listed in the mix.exs

from pigeon.

nathany avatar nathany commented on May 20, 2024

@hpopp: I guess not, as I had to add it to our mix.exs to install it.

Thanks.

from pigeon.

Douvi avatar Douvi commented on May 20, 2024

Sorry to open this issue again, but I got the same error when I try to start a second time the server.

here my conf:

def application do
    [...
     applications:[..., :pigeon]]
  end

defp deps do
    [...
     {:pigeon, "~> 0.9.0"},
     {:chatterbox, "~> 0.3.0-15-g401cef6", github: "joedevivo/chatterbox"},
    ...]
  end

I did not succeed to user "0.3.0"

Steps:
1 - mix deps.clean --all
2 - mix deps.get
3 - mix phoenix.server "Ok the server work perfectly and I can send push on iOS"
4 - control c to kill the server
5 - mix phoenix.server I got the error below

** (Mix) Could not start application pigeon: Pigeon.start(:normal, []) returned an error: shutdown: failed to start child: :apns_worker
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value: {:error, :eaddrinuse}
            src/h2_connection.erl:148: :h2_connection.init/1
            (stdlib) gen_fsm.erl:325: :gen_fsm.init_it/6
            (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

from pigeon.

nathany avatar nathany commented on May 20, 2024

Probably better to open a new issue since this one is closed and might get lost.

eaddrinuse is a slightly different error -- I wonder which address is in use -- did control-c not shutdown cleanly perhaps?

❯ ps aux | grep phoenix

from pigeon.

hpopp avatar hpopp commented on May 20, 2024

Do you have apns_2197: true in your config?

from pigeon.

Douvi avatar Douvi commented on May 20, 2024

Ok I will create a new issue and send to you all info I have

from pigeon.

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.