Skip to content

Subscribe function not executing #5

Open
@shlokspeare

Description

Have gone through comments in previous issues.

A ) Tried this code snippet, but subscribe function hangs the terminal. Pls suggest way forward.

Last login: Wed Apr 15 00:44:28 on ttys000
homes-MacBook-Air:epubnub Shlok$ ./rebar3 compile
===> Verifying dependencies...
===> Compiling epubnub
homes-MacBook-Air:epubnub Shlok$ ./rebar3 shell
===> Verifying dependencies...
===> Compiling epubnub
Erlang/OTP 17 [erts-6.3] [source-f9282c6] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.3 (abort with ^G)
1> observer:start().
ok
2> application:ensure_all_started(epubnub).
{ok,[jsx,idna,hackney,epubnub]}
3> epn_example_client:start_link().
{ok,<0.862.0>}
4> epn_basic_examples:publish().
{[1,<<"Sent">>,<<"14290398150714966">>],#Ref<0.0.0.5323>}
5> epn_basic_examples:history().
** exception error: bad argument
in function bit_size/1
called as bit_size("10")
in call from epubnub:'-bin_join/2-lbc$^0/2-0-'/3 (/Users/N-Exchanges/dropbox/gito/epubnub_chat/deps/epubnub/src/epubnub.erl, line 252)
in call from epubnub:bin_join/2 (/Users/N-Exchanges/dropbox/gito/epubnub_chat/deps/epubnub/src/epubnub.erl, line 252)
in call from epubnub:request/3 (/Users/N-Exchanges/dropbox/gito/epubnub_chat/deps/epubnub/src/epubnub.erl, line 241)
6> epn_basic_examples:time().

** exception error: bad argument
in function hd/1
called as hd({[14290398465791471],#Ref<0.0.0.5363>})
in call from epubnub:time/1 (/Users/N-Exchanges/dropbox/gito/epubnub_chat/deps/epubnub/src/epubnub.erl, line 212)
7> epn_basic_examples:publish().
{[1,<<"Sent">>,<<"14290398904564684">>],#Ref<0.0.0.5412>}
8> epn_basic_examples:subscribe().
<< Hanged >>

B ) Secondly, shouldn't init( [EPN] ) in line 47/48 in -module(epn_example_client) be <<"hello_world">> instead of "hello_world"?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions