Skip to content

[2.0.0-rc.19] errors disposing createRenderEffect in a microtask after creation. #4444

Closed as not planned

Description

@mizulu

Describe the bug

import { createSignal, createOwner, createRenderEffect, runWithOwner } from 'solid-js';

const cb = () => { }
const o = createOwner()
runWithOwner(o, () => {
  createRenderEffect(() => { }, cb, { schedule: true })
  queueMicrotask(o.dispose)
})


 Uncaught TypeError: Cannot read properties of undefined (reading '_flags')

Your Example Website or App

https://mizulu.users.s.olid.uk/solid2-bug-4444/

Steps to Reproduce the Bug or Issue

repro

Expected behavior

no error

Screenshots or Videos

No response

Platform

.

Additional context

No response

Activity

  1. ryansolid commented on Oct 30, 2026

    @ryansolid
    Member

    Closing as not planned. createOwner was never meant as application API (Solid 1.x had none), and as of #4515 (61bb177) it's typed only through solid-js/internal for the renderers. Its dispose is a method, so a detached call throws by design. To host a scope you can dispose from anywhere, use createRoot((dispose) => …); its dispose is a plain function, so queueMicrotask(dispose) works. Re-enter the scope with runWithOwner(getOwner(), …) captured inside it.


    Generated by Claude Code

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