Skip to content

2.0.0-rc.8 latest read throws an owned-scope write error when an action resumes #3378

Description

@GabbeV

Describe the bug

Toggling a conditional JSX branch while an action is pending, then restoring it as the action resumes, throws REACTIVE_WRITE_IN_OWNED_SCOPE and halts reactivity.

The reactive setters are called from the event handler and action. The failing write is internal to Solid: syncCompanions -> setSignal updates the memo's latest companion.

Your Example Website or App

https://s.olid.uk/id/ac2B3KcWSk-Jko5Xf7I8og

Steps to Reproduce the Bug or Issue

  1. Open the repro.
  2. Click the button.
  3. After 400ms, the owned-scope write error occurs.

Expected behavior

The conditional branch displays Latest: 1 without throwing.

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Firefox

Additional context

Replacing latest(copy) with latest(count) avoids the error. Using Show instead of the JSX conditional also avoided it in the tested variant.

Reproduced against next at 344ed05 and #3337 at 20f3143.

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