Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Can't post on habla.news #21

@Giszmo

Description

@Giszmo

Using the nos2x-fox plugin I cannot publish on habla.news. It crashes in onPublish() with an undefined error.

My debugging is yielding weird data and I'm not sure if this is normal react-stuff or a hint at the bug.

ev should probably be a JSON object and is claimed to be a function:

Screenshot from 2023-04-21 22-15-13

sign() doesn't throw but returns undefined.

relays resolves to undefined which lets the next line throw ... I guess. When it does throw, error is undefined and I see this probably not helpful stacktrace:

onerror nostr.mjs:326
    enter event-loop.js:83
    _pauseAndRespond thread.js:938
    pauseAndRespond thread.js:1126
    _makeOnPop thread.js:1000
    Babel 9
    le Editor.js:147
    onClick Editor.js:115
    onClick Editor.js:264
    React 11
    bind_applyFunctionN self-hosted:1382
    Wt self-hosted:1345
    React 3
    forEach self-hosted:4394
    React 2
    <anonymous> index.js:7
    <anonymous> index.js:17
    <anonymous> index.js:17

Running c4e5dcc locally allowed me to publish normally.

I did a git bisect and that ended in:

$ git bisect bad
379446445c555143f62a7fae344af9ea8e7dd8c4 is the first bad commit
commit 379446445c555143f62a7fae344af9ea8e7dd8c4
Author: Alejandro Gomez <alejandro@strike.me>
Date:   Wed Apr 12 17:41:24 2023 +0200

    feat: update nostr-tools

 package.json |  2 +-
 yarn.lock    | 47 +++++++++++++++++++++++------------------------
 2 files changed, 24 insertions(+), 25 deletions(-)

Debugging on Chrome looks much better. ev is fine. signed also. Crash appears to happen in pool.ensureRelay()

I did not bisect using Chromium but feat: update nostr-tools looks like a plausible candidate for introducing this kind of crash.

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