-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug?]: useAction
causes silent crash on the client
#1681
Comments
It's unclear what command I should run exactly for the "Your environment 🌎" section but I'm happy to oblige. |
i'm also experiencing this from time to time |
I did a bit of testing and its because your calling a function outside of "use server". I would think it should be able to handle it. If you move "use server" to the top of the file it works |
@brenelz I don't think the mode of failure is the concern on this (ie. there are a number of ways to repro this, this just happens to be one of them), but rather the way in which it's failing. When this is happening in start, assuming the issues I've faced are the same as this, the error just basically nullifies the entire subtree from where it occurs, meanwhile the app continues running as expected above this level of the component tree. This creates an experience where a portion of your app fails to render with no insight as to why, other than the inferring the rough problematic route by what fails to render. Thus, I don't think the specific 'use server' placement is the real concern here. It may solve this specific issue, but eg. I'm using start on a project with |
The issue is only addressable within SolidStart if it's a treeshaking problem (which we have improved the heuristics in 1.1.0 - so I'm inclined to say the cases that are related to Start are mitigated). If there are additional issues with |
Duplicates
Latest version
Current behavior 😯
useAction
with non trivial server side code causes a silent crash on the client and no errorsExpected behavior 🤔
useAction
with server side code simply worksSteps to reproduce 🕹
Repro repo: https://github.com/shoooe/solid-start-blank-page
Context 🔦
I'm trying to call a server-only action using
useAction
Your environment 🌎
No response
The text was updated successfully, but these errors were encountered: