Skip to content

bug: ERROR loading NDKInstance if relay is unreachable #4

@theborakompanioni

Description

@theborakompanioni

If one of the given relays in NDKProvider.relayUrls is not reachable, an error is thrown:

ERROR loading NDK NDKInstance undefined

Expected behaviour

NDK can be used without a connection to the defunct relay.

Actual behaviour

NDK cannot be used at all and is undefined.

How to reproduce

Add wss://non-existing-relay.example.com to the NDKProvider:

<NDKProvider
  relayUrls={[
    "wss://non-existing-relay.example.com",
    "wss://relay.damus.io",
    "wss://relay.snort.social",
    "wss://purplepag.es",
  ]}
>
   [...]
</NDKProvider>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions