Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BroadcastChannelNetworkAdapter causes repo.find to never resolve #408

Open
bigmistqke opened this issue Feb 4, 2025 · 1 comment
Open

Comments

@bigmistqke
Copy link

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.

bigmistqke added a commit to bigmistqke/automerge-monaco-repl that referenced this issue Feb 4, 2025
@pvh
Copy link
Member

pvh commented Feb 4, 2025

oh awesome. it shouldn't regress! we must be missing a test somewhere. a failing test would be a huge help but if you can write a short script which replicates this from the CLI that would be almost as good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants