Skip to content

A missing app-package __init__.py (myapp/myapp/__init__.py) makes the compiled frontend and the backend disagree on the root state name; every event is silently dropped with only a browser console error #7258

Closed

Description

@masenf

Describe the bug

Without the app package's __init__.py, the compiler names the root state reflex___state____state.<app>___<app>____state (written into .web/utils/context.jsx) while the backend worker emits deltas for reflex___state____state.<app>____state. The page renders, no server-side error is logged, no request fails; the only signal is one browser console error per page load:

Cannot process state update: no dispatch function for substate(s) ...

and every state update is dropped, so the app looks frozen. reflex init skips writing the file when the app directory already exists (for example when the app module was created before running reflex init), so this is easy to hit and hard to diagnose.

To Reproduce

rm <app>/<app>/__init__.py && rm -rf <app>/.web/build
reflex run
# load /, click any button that changes state: nothing moves, console shows the error above
touch <app>/<app>/__init__.py   # fixes it

Expected behavior

reflex run (or reflex init) detects the missing package marker and fails loudly ("app package <app> has no __init__.py"), or the compiler and the backend resolve the module name the same way so the marker does not matter.

Specifics

  • Reflex 0.9.12a1; pre-existing (the naming code is unchanged from 0.9.11.post1)
  • Python 3.11.15, Linux, Chromium

Additional context

0.9.12a1 pre-release QA, vars_typing cluster, observation O1 in vars_typing/NOTES.md.

Activity

  1. added theissue type on Sep 22, 2026
  2. linear-code commented on Sep 22, 2026

    @linear-code
  3. changed the title [-]A missing <app>/<app>/__init__.py makes the compiled frontend and the backend disagree on the root state name; every event is silently dropped with only a browser console error[/-] [+]A missing app-package __init__.py (myapp/myapp/__init__.py) makes the compiled frontend and the backend disagree on the root state name; every event is silently dropped with only a browser console error[/+] on Sep 22, 2026
  4. added
    release-train
    on Nov 11, 2026
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

    release-train

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions