[Devvit Web 0.14.1] reddit.submitCustomPost() fails with fetch failed from a subreddit menu action
Hi,
I am testing a Devvit Web interactive post created from a moderator subreddit menu item. The app builds, uploads, and installs successfully on the automatically generated private playtest subreddit, but clicking the menu item never creates the post.
Environment
- Devvit CLI: 0.14.1
- u/devvit
/web: 0.14.1 - Node.js: 24.19.0
- macOS x64
- Hono server
- App:
fugitif-piece17 - Playtest version:
v0.0.1.3
Configuration
{
"post": {
"dir": "dist/client",
"entrypoints": {
"default": {
"entry": "index.html",
"height": "tall"
}
}
},
"server": {
"dir": "dist/server",
"entry": "index.cjs"
},
"permissions": {
"reddit": true
},
"menu": {
"items": [
{
"label": "Créer — Pièce 17",
"description": "Créer le mouve exécutable Pièce 17",
"forUserType": "moderator",
"location": "subreddit",
"endpoint": "/internal/menu/post-create"
}
]
}
}
Server endpoint
app.post('/internal/menu/post-create', async (c) => {
const _input = await c.req.json<MenuItemRequest>();
if (!context.subredditName) {
return c.json<UiResponse>({
showToast: 'Subreddit not found in Devvit context.'
});
}
const post = await reddit.submitCustomPost({
subredditName: context.subredditName,
title: 'Pièce 17 — Synthèse des éléments versés au dossier',
entry: 'default'
});
return c.json<UiResponse>({
showToast: `Post created: ${post.id}`
});
});
Steps to reproduce
- Run
npm run dev. - Devvit reports
Updating... Success!andPlaytest ready. - Open and refresh the generated private playtest subreddit.
- Select the moderator menu item
Créer — Pièce 17. - No post or toast appears.
- The terminal reports:
​
Failed to POST to Node.js server endpoint /internal/menu/post-create;
server responded with error: fetch failed
Fatal Unhandled Promise rejected:
TypeError: Cannot use 'in' operator to search for 'message' in
Failed to POST to Node.js server endpoint /internal/menu/post-create;
server responded with error: fetch failed
at serverErrorToStatus (/srv/index.cjs:18139:28)
at respond (/srv/index.cjs:20215:65)
Checks already performed
- Upgraded local Node.js from 23.1.0 to 24.19.0.
- Reinstalled dependencies with
npm ci. - Confirmed the build and both automated tests pass.
- Simplified the Reddit permission from
{ "enable": true }totrue. - Removed the optional
textFallback. - Retested from a filesystem path without spaces or special characters.
- Uploaded a new playtest version after each relevant change.
The error remains identical. The call appears to follow the current submitCustomPost() documentation.
Is this a current platform issue affecting submitCustomPost() in playtest, or is an additional permission/configuration step required for newly initialized apps?