Skip to content

BroadcastChannelNetworkAdapter causes repo.find to never resolve #408

Open
@bigmistqke

Description

Using BroadCastChannelNetworkAdapter causes repo.find to not resolve, only when another tab runs repo.create it will resolve the initial repo.find. I have not noticed this issue before updating from 1.2.1 to 2.0.0-alpha.22.

minimal reproduction

Steps to reproduce:

  1. Install and run dev server pnpm install && pnpm dev
  2. open http:localhost:3000 in browser X
    • will use repo.create internally
    • will add an automerge-url as hash: http:localhost:3000#automerge:...
    • will add hallo, world to body
  3. open http:localhost:3000#automerge:... in browser Y
    • will use repo.find internally
    • 🐛 will not resolve handle and cause an empty page
  4. open http:localhost:3000 in browser Y in another tab
    • will add an automerge-url as hash: http:localhost:3000#automerge:...
    • will add hallo, world to body
    • now also the tab of 3. will be resolved and will show hallo, world

I will remove BroadCastChannelNetworkAdapter in my personal project, as I simply copy+pasted it from someone else and apparently it's only for testing purposes.

Activity

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

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