{"record":{"id":"2215eab9520a5ea2","repo":"reflex-dev/reflex","slug":"named-props-cannot-be-used-with-custom-thresholds","errorCode":null,"errorMessage":"Named props cannot be used with custom thresholds","messagePattern":"Named props cannot be used with custom thresholds","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"packages/reflex-base/src/reflex_base/breakpoints.py","lineNumber":77,"sourceCode":"            initial: Styling when in the initial width\n            xs: Styling when in the extra-small width\n            sm: Styling when in the small width\n            md: Styling when in the medium width\n            lg: Styling when in the large width\n            xl: Styling when in the extra-large width\n\n        Returns:\n            The responsive mapping.\n\n        Raises:\n            ValueError: If both custom and any other named parameters are provided.\n        \"\"\"\n        thresholds = [initial, xs, sm, md, lg, xl]\n\n        if custom is not None:\n            if any(threshold is not None for threshold in thresholds):\n                msg = \"Named props cannot be used with custom thresholds\"\n                raise ValueError(msg)\n\n            return Breakpoints(custom)\n        return Breakpoints({\n            k: v\n            for k, v in zip([\"initial\", *breakpoint_names], thresholds, strict=True)\n            if v is not None\n        })\n\n\nbreakpoints = Breakpoints.create\n\nT = TypeVar(\"T\")\n\nResponsive = T | Breakpoints[str, T]\n","sourceCodeStart":59,"sourceCodeEnd":92,"githubUrl":"https://github.com/reflex-dev/reflex/blob/45b8ed5ab735f8a56bbb09a42384f030eb0208e7/packages/reflex-base/src/reflex_base/breakpoints.py#L59-L92","documentation":"Raised by AppHarness's frontend/driver helper when the harness has no frontend URL to connect a Selenium browser to. Reflex's testing harness starts both a backend (uvicorn) and a frontend server; if _wait_frontend never completed or start() was not called before requesting a driver, frontend_url stays None and this RuntimeError is thrown. It almost always indicates the harness fixture was used incorrectly or the frontend process died during startup.","triggerScenarios":"Calling harness.driver()/get_driver() before AppHarness.create(...) has started the servers, or after the frontend failed to bind (crashed on startup, port issues). Also triggered when the 'with AppHarness.create(...)' context manager body runs code that assumes the frontend is up while _wait_frontend timed out.","commonSituations":"Using the AppHarness fixture outside its context manager; CI environments where the frontend build fails (missing node_modules, wrong Node version); custom fixtures that call start() partially; races where the frontend process exits immediately.","solutions":["Ensure all driver/browser calls happen inside the `with AppHarness.create(...) as harness:` block, after the fixture yields","Check the harness logs (harness._frontend_log / captured output) for why the frontend process exited early","Verify `uv sync` ran and .web/node_modules exists so the frontend can actually start","Set APP_HARNESS_DRIVER and related env vars correctly and confirm selenium is installed in the test environment"],"exampleFix":"// before\ndef test_thing():\n    harness = my_harness()  # used after context exited\n    driver = harness.driver()\n// after\n@pytest.fixture\ndef my_harness(tmp_path_factory):\n    with AppHarness.create(root=tmp_path_factory.mktemp(\"app\"), app_source=MyApp) as harness:\n        yield harness\n\ndef test_thing(my_harness):\n    driver = my_harness.driver()","handlingStrategy":"validation","validationCode":"assert harness.frontend_url is not None, \"frontend not started; check harness logs\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always use AppHarness via its context manager so start()/stop() ordering is guaranteed","Check harness.frontend_url before calling driver-dependent helpers","Keep frontend deps installed (uv sync) in test environments"],"tags":["app-harness","selenium","frontend","testing"],"backgroundTag":"frontend-server-not-started","analyzedSha":"45b8ed5ab735f8a56bbb09a42384f030eb0208e7","analyzedAt":"2026-08-28T19:25:27.644Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}