Skip to content

clear() server action sends malformed URL due to line break in template literal #297

@avinxshKD

Description

@avinxshKD

In 6-server.js, the clear() method splits its Axios URL across two lines inside a template literal (lines 149–150):

Axios.post(`http://127.0.0.1:5000/clear/${...}
        ?unlock=${...}&maxtime=${...}&params=${...}`)

Template literals preserve the newline and leading whitespace, so the actual request URL contains %0A%20%20%20%20%20%20%20%20 between the path and the query string. The server won't match this route.

All other server action methods (build, run, debug, stop, destroy, library) in the same file keep their URLs on a single line and work correctly.

Steps to reproduce

  • Upload a directory and build a workflow.
  • Click the "Clear" action in the server actions panel.
  • The request fails (likely 404 or network error), and no workflow is actually cleared.

Expected behavior : The URL should be on a single line (or joined without whitespace), so the query string attaches correctly to the path

Actual behavior is : The URL has a literal newline and spaces injected between the path and ?unlock=..., causing the request to fail

Fix can be:
Move the query string portion to the same line, or remove the line break from the template literal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions