Skip to content

[Bug]: Editor crashes with RangeError: Position out of range after real-time sync #147

@danpiranesi

Description

@danpiranesi

Summary

Unable to create a new document due to client side error.

Steps to reproduce

  1. Go to docs.plus
  2. Click on create new document
  3. Observe client side error

Expected behavior

Editor view of a new document to open that I can begin editing.

Actual behavior

Skeleton loaders show along with progress indicator in bottom left reading "Syncing document" and then client side error screen shows.

A client-side exception is thrown immediately after ++onSynced is logged.

Environment

  • OS: MacOS Tahoe 26.3
  • Browser: Zen and Safari
  • Bun version:
  • Branch/commit:

Logs and screenshots

Console logs:
service-worker.js:7 [SW Extension] Push notification handlers loaded
service-worker.js:56 User status updated successfully!
_app-9e6f0e7f0d58a688.js:252 eventsHub initialized
tglymsfloxmouzjuoycu.supabase.co/rest/v1/workspaces?on_conflict=id&select=:1 Failed to load resource: the server responded with a status of 409 ()
tglymsfloxmouzjuoycu.supabase.co/rest/v1/workspaces?on_conflict=id&select=
:1 Failed to load resource: the server responded with a status of 409 ()
7582.475a015abbb000a6.js:40 ++onSynced Object
framework-1bb0447a255aff09.js:1 RangeError: Position 58 out of range
at b.resolve (42-6f81ed725cfe1034.js:10:26311)
at b.resolveCached (42-6f81ed725cfe1034.js:10:26678)
at S.resolve (42-6f81ed725cfe1034.js:10:30229)
at 7393-bd4bfc095880a511.js:52:41548
at 7393-bd4bfc095880a511.js:52:41697
at Object.placeholder (7393-bd4bfc095880a511.js:52:42155)
at u (7393-bd4bfc095880a511.js:1:51982)
at E.apply (7393-bd4bfc095880a511.js:1:52859)
at S.applyInner (42-6f81ed725cfe1034.js:1:9893)
at S.applyTransaction (42-6f81ed725cfe1034.js:1:9180)
op @ framework-1bb0447a255aff09.js:1
main-516c55c08c621003.js:1 RangeError: Position 58 out of range
at b.resolve (42-6f81ed725cfe1034.js:10:26311)
at b.resolveCached (42-6f81ed725cfe1034.js:10:26678)
at S.resolve (42-6f81ed725cfe1034.js:10:30229)
at 7393-bd4bfc095880a511.js:52:41548
at 7393-bd4bfc095880a511.js:52:41697
at Object.placeholder (7393-bd4bfc095880a511.js:52:42155)
at u (7393-bd4bfc095880a511.js:1:51982)
at E.apply (7393-bd4bfc095880a511.js:1:52859)
at S.applyInner (42-6f81ed725cfe1034.js:1:9893)
at S.applyTransaction (42-6f81ed725cfe1034.js:1:9180)
Q @ main-516c55c08c621003.js:1
main-516c55c08c621003.js:1 A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred

Additional context

Checklist

  • I searched existing issues before creating this report.
  • I included clear reproduction steps.
  • I included relevant logs/screenshots where possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions