Skip to content

Got an error stack after a successful follow, cannot repro #7

@mazz

Description

@mazz

Got this error stack once, but restarted iex and it didn't happen the second time.

I'm pretty sure this is a legit npub:

iex(4)> NostrApp.follow("npub15tmnw5709va4pgrzpn2kqnnuc2ejssm9a599262jwdpmvmwn9rmqawlkv7")
:ok
iex(5)>
11:11:34.204 [info] sent an follow command for npub15tmnw5709va4pgrzpn2kqnnuc2ejssm9a599262jwdpmvmwn9rmqawlkv7

11:11:34.479 [info] wss://relay.nostr.bg sent 2484cad4a61410b8ed3129b25fe050f13c7e5eb60fef1e99ea3c8160fa0218d0: true

11:11:34.585 [error] GenServer #PID<0.297.0> terminating
** (FunctionClauseError) no function clause matching in Nostr.Client.Workflows.Follow.handle_info/2
    (nostr 0.2.0) lib/nostr/client/workflows/follow.ex:50: Nostr.Client.Workflows.Follow.handle_info({"wss://relay.nostr.bg", "ea82e1640c5bbef5bb650dea2d48d245", %NostrBasics.Event{id: "2484cad4a61410b8ed3129b25fe050f13c7e5eb60fef1e99ea3c8160fa0218d0", pubkey: <<0x74c2d39896c2223815f8aea29793a007a0b2f02620aa9cd01a2fb0b5cc319f44::256>>, created_at: ~U[2023-11-10 16:11:34Z], kind: 3, tags: [["p", "a2f73753cf2b3b50a0620cd5604e7cc2b3284365ed0a5569527343b66dd328f6", ""]], content: "", sig: <<0xce610924b895dce172a20a0bcd8232f420df925c4b96b754b68a9c3cf96390e0b138e6bce862db333e0250f895025cefd315290ea5173f88b598d0dabe7d331b::512>>}}, %{follow_pubkey: <<162, 247, 55, 83, 207, 43, 59, 80, 160, 98, 12, 213, 96, 78, 124, 194, 179, 40, 67, 101, 237, 10, 85, 105, 82, 115, 67, 182, 109, 211, 40, 246>>, got_contact_list: true, owner_pid: #PID<0.272.0>, privkey: <<60, 162, 188, 98, 30, 233, 134, 172, 116, 214, 205, 239, 204, 102, 87, 222, 4, 145, 64, 51, 140, 170, 75, 144, 192, 149, 99, 26, 31, 8, 202, 74>>, relay_pids: [#PID<0.277.0>], subscriptions: [{#PID<0.277.0>, :ea82e1640c5bbef5bb650dea2d48d245}]})
    (stdlib 4.2) gen_server.erl:1123: :gen_server.try_dispatch/4
    (stdlib 4.2) gen_server.erl:1200: :gen_server.handle_msg/6
    (stdlib 4.2) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: {"wss://relay.nostr.bg", "ea82e1640c5bbef5bb650dea2d48d245", %NostrBasics.Event{id: "2484cad4a61410b8ed3129b25fe050f13c7e5eb60fef1e99ea3c8160fa0218d0", pubkey: <<0x74c2d39896c2223815f8aea29793a007a0b2f02620aa9cd01a2fb0b5cc319f44::256>>, created_at: ~U[2023-11-10 16:11:34Z], kind: 3, tags: [["p", "a2f73753cf2b3b50a0620cd5604e7cc2b3284365ed0a5569527343b66dd328f6", ""]], content: "", sig: <<0xce610924b895dce172a20a0bcd8232f420df925c4b96b754b68a9c3cf96390e0b138e6bce862db333e0250f895025cefd315290ea5173f88b598d0dabe7d331b::512>>}}
State: %{follow_pubkey: <<162, 247, 55, 83, 207, 43, 59, 80, 160, 98, 12, 213, 96, 78, 124, 194, 179, 40, 67, 101, 237, 10, 85, 105, 82, 115, 67, 182, 109, 211, 40, 246>>, got_contact_list: true, owner_pid: #PID<0.272.0>, privkey: <<60, 162, 188, 98, 30, 233, 134, 172, 116, 214, 205, 239, 204, 102, 87, 222, 4, 145, 64, 51, 140, 170, 75, 144, 192, 149, 99, 26, 31, 8, 202, 74>>, relay_pids: [#PID<0.277.0>], subscriptions: [{#PID<0.277.0>, :ea82e1640c5bbef5bb650dea2d48d245}]}

Here's how I initialized my iex:

.iex.local.exs:

relays = [
  "wss://relay.nostr.bg",
  "wss://relay.nostr.pro"
]

nsec = "nsec...lg"
{:ok, pkey} = NostrBasics.Keys.PrivateKey.from_nsec(nsec)
NostrApp.start_link(relays, pkey)

{:ok, pubkey} = NostrBasics.Keys.PublicKey.from_private_key(pkey)
NostrApp.timeline(pubkey)

from mix.lock:

  "nostr_basics": {:hex, :nostr_basics, "0.1.6", "dbbbef1a16645f6edb1102286d2576907785ef320115ebfd525da18e2c5f596d", [:mix], [{:bech32, "~> 1.0", [hex: :bech32, repo: "hexpm", optional: false]}, {:binary, "~> 0.0.5", [hex: :binary, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:k256, "~> 0.0.7", [hex: :k256, repo: "hexpm", optional: false]}], "hexpm", "ac8a4ac54c8956a5f435ddf9a2fe220c2f5e7167cbdca024986eeba0ab3b5377"},

Elixir:

Erlang/OTP 25 [erts-13.1.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.14.2 (compiled with Erlang/OTP 25)

Metadata

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