2 months ago
Hi Railway Support,
I’m trying to deploy the official AnythingLLM template (code HNSCS1) through the GraphQL API and the templateDeployV2 mutation returns a 400 “Problem processing request” every time. Everything else in the provisioning flow works (project create, environment resolution, service listing, etc.); the template deploy is the only step that fails.
Key details:
- Endpoint: https://backboard.railway.com/graphql/v2
- Auth: Personal workspace API token (Bearer auth)
- Workspace: Activ8u (workspaceId 7f84964b-c3f7-4d4a-aa5a-e1c23f909d06). I’ve also tested without a workspaceId for personal workspaces.
- Input fields lined up with introspection for TemplateDeployV2Input (templateId, projectId, environmentId, serializedConfig, optional workspaceId).
- serializedConfig is passed exactly as returned by the template(code: "HNSCS1") query (999-character string). I’ve tried both string and object forms just in case; the response is the same 400 either way.
Latest mutation payload (stringified for reference):
```json
{
"templateId": "58424ecb-8fbd-4711-b1b7-0f29b5e29085",
"projectId": "bb46d59f-956a-4a62-a38e-cef2f7d4a3c7",
"environmentId": "b2f63310-338f-480c-bca2-ed2127c09f6f",
"workspaceId": "7f84964b-c3f7-4d4a-aa5a-e1c23f909d06",
"serializedConfig": "{...length 999 JSON string from template query...}"
}
Trace IDs from the past week:
4844340964472281975
7079873044572892091
1877022671974845418
4426991737629425461
3761644311992549673
6374628515424983761
188415591645113365
8538128903908803765
872113307300681221
3 Replies
2 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 2 months ago
2 months ago
Hi @bradenericson
Based on your post, I can see you’ve done a bit of debugging steps. Can you also try the following? Please verify the serializedConfig isn’t passing information twice, you mentioned trying “both the string and object form”. Also can you check for special characters in the serializedConfig? Next, can you confirm that the TemplateID hasn’t been updated or changed? Lastly, I know you mentioned testing this, but could you try without the workspaceID for your personal workspace?
{
"templateId": "58424ecb-8fbd-4711-b1b7-0f29b5e29085",
"projectId": "bb46d59f-956a-4a62-a38e-cef2f7d4a3c7",
"environmentId": "b2f63310-338f-480c-bca2-ed2127c09f6f",
"serializedConfig": "<raw_string_here>"
}
2 months ago
Updated with your suggestions and I'm able to get a response from the graphQL playground now, but when I check the project the template isn't shown as deployed. I tried creating another mutation that successfully creates a new project, but when I navigate to the project it shows an empty state.
Seems like there's still an issue with the template deploying, looks like the generated workflow has an error.
```
mutation DeployTemplate {
templateDeployV2(input: {
templateId: "58424ecb-8fbd-4711-b1b7-0f29b5e29085",
serializedConfig: "{...}"
}) {
projectId
workflowId
}
}
```
When I check the returned workflowId I see this error in the response
```
{
"data": {
"workflowStatus": {
"error": "A minimum of 1 service is required to deploy a template."
}
}
}
```
additional notes:
- I'm testing everything from the graphQL playground now
- serializedConfig I am getting direct back from the graphQL GetTemplateDetails query
- I get the same workflow error regardless of whether or not I pass a projectId in the mutation.
- sharing my stringified serializedConfig value below
```
"{\"services\":{\"ee6c69a2-2d99-4834-9c25-8dd82fcf8ae7\":{\"icon\":\"https://raw.githubusercontent.com/Mintplex-Labs/anything-llm/master/frontend/public/favicon.png\",\"name\":\"AnythingLLM\",\"build\":{},\"deploy\":{\"startCommand\":null,\"healthcheckPath\":\"/api/ping\"},\"source\":{\"image\":\"mintplexlabs/anythingllm:railway\"},\"variables\":{\"PORT\":{\"isOptional\":false,\"description\":\"Direct Railway to bind HTTP port 80 to 3001\",\"defaultValue\":\"3001\"},\"SERVER_PORT\":{\"isOptional\":false,\"description\":\"Port the server will bind to\",\"defaultValue\":\"3001\"},\"STORAGE_DIR\":{\"isOptional\":false,\"description\":\"Do not modify. Mount location to storage - hardcoded to /storage for support on build systems like Render and Railway\",\"defaultValue\":\"/storage\"},\"RAILWAY_RUN_UID\":{\"isOptional\":false,\"description\":\"Enable Docker to write to mounted storage volume\",\"defaultValue\":\"0\"}},\"networking\":{\"tcpProxies\":{},\"serviceDomains\":{\"<hasDomain>\":{}}},\"volumeMounts\":{\"ee6c69a2-2d99-4834-9c25-8dd82fcf8ae7\":{\"mountPath\":\"/storage\"}}}}}"
```
a month ago
I still need help, anyone?