-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Astro Actions: "Error: Unable to get API context." when is sended arguments to an action. #11423
Comments
Yeah I think the 500 error should not occur here but be a 400 instead. @bholmesdev wdyt? |
Thanks for reporting @ynhhoJ! I just confirmed this a Stackblitz issue, but does not occur locally. Is that true for you as well? That 500 error is indeed unexpected |
@bholmesdev , originally, on on my machine:
I got another error It's very strange: UPD: This error happens only with |
got it. So to clarify @ynhhoJ: do all of the 500 errors you reported go away when using npm? We don't officially support bun, so I'd like to table that dsicussion |
Yeah. I opened an issue to Thank you! |
Sorry for issue close, maybe But |
@ynhhoJ Alright got it, that's good info. I know we rely on the |
Also stackblitz has issues with ALSs |
Using this issue to track errors with edge middleware on Netlify and Vercel. Bun issue has been raised in their repository, and Stackblitz will take cross communication |
Alright, we removed async local storage from the Actions implementation, which should help with support in Bun and other environments. That still left your JSON parse error, which I think I've gotten to the bottom of! We use |
@ynhhoJ Well, I'm glad our unit testing suite exists. I've discovered the I'm hopeful Bun can get this issue resolved on their end! But for now, I suggest removing the |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Firefox
Describe the Bug
I followed example from Actions Proposal and everytime when is called an action with arguments like:
Is returned error:
Uncaught (in promise) Error: Unable to get API context.
and500
HTTP StatusBut if we do:
We get
![image](https://private-user-images.githubusercontent.com/22500212/346292754-47347d56-3c1e-4b90-b39d-8dc5883c2cfd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNzU4NTksIm5iZiI6MTcyNTA3NTU1OSwicGF0aCI6Ii8yMjUwMDIxMi8zNDYyOTI3NTQtNDczNDdkNTYtM2MxZS00YjkwLWIzOWQtOGRjNTg4M2MyY2ZkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDAzMzkxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU1MmYyNGNmZTBmOGY3NjY0ZDc5NGI0YjZhOGUyOTcwMmEzMjg1YTk5MGZhNzNiNGI1NzFmZTFhM2MwMDY2MTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.MEHtHSjU_qaEi2aj4ABxRA3e__0nZim7SlJOjB6yuTs)
400
HTTP Status and validation input error.What's the expected result?
There is no error when action:
is called
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-pdghi3?file=src%2Fcomponents%2FLike.tsx
Participation
The text was updated successfully, but these errors were encountered: