Skip to content

Calling a method with the name handler inside a server function causes the app to crash. #3698

Closed

Description

@julianklumpers

Which project does this relate to?

Start

Describe the bug

Calling a method with the name handler inside a server function causes the app to crash.

Your Example Website or App

https://codesandbox.io/p/devbox/stupefied-rumple-7m233t?file=%2Fapp%2Froutes%2Findex.tsx%3A13%2C4

Steps to Reproduce the Bug or Issue

check routes/index.tsx

Expected behavior

As a user i expect the call methods with the name handler from other functions inside server functions

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome - Version 133.0.6943.127 (Official Build) (arm64)
  • Start version: 1.112.19

Additional context

No response

Activity

  1. changed the title [-]Calling a method with the handler inside a server function causes the app to crash.[/-] [+]Calling a method with the name handler inside a server function causes the app to crash.[/+] on Mar 8, 2025
  2. LadyBluenotes commented on Jul 11, 2026

    @LadyBluenotes
    Member

    Okay, sorry, this actually was caused by an older server-function compiler transform confusing a nested handler() method call with the outer createServerFn().handler(...) call. The compiler has since been changed and should now verifies that the handler belongs to a server-function chain before transforming it.

    With the current implementation and focused compiler tests, and a method named handler inside a server function is no longer treated as the server-function handler. I’m can actually close this as fixed.

    If you still see this on a current Start release, please share a small reproduction and we’ll take another look.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions