Skip to content

"Invalid json response" body when starting job #461

@steshaw

Description

@steshaw

Describe the bug

When you start a job in the UI. The Node server display this error:

FetchError: invalid json response body at http://192.168.49.2:31907/job/11/start reason: Unexpected token o in JSON at position 0
    at /home/steshaw/Code/tweag/chainsail/app/client/node_modules/node-fetch/lib/index.js:272:32
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async handleRequestResponse (webpack-internal:///./utils/handleRequestResponse.js:91:22)
    at async __webpack_exports__.default (webpack-internal:///./pages/api/job/start.js:12:3)
    at async apiResolver (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/next-server/server/api-utils.js:8:1)
    at async DevServer.handleApiRequest (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/next-server/server/next-server.js:64:462)
    at async Object.fn (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/next-server/server/next-server.js:56:492)
    at async Router.execute (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/next-server/server/router.js:23:67)
    at async DevServer.run (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/next-server/server/next-server.js:66:1042)
    at async DevServer.handleRequest (/home/steshaw/Code/tweag/chainsail/app/client/node_modules/next/dist/next-server/server/next-server.js:34:1081) {
  type: 'invalid-json'
}

This error is not reflected in the UI and so the job appears to have started. Indeed it has started and therefore everything appears okay.

To Reproduce

  1. Create a new job
  2. Click 'Start' from the 'My jobs' page.

Expected behaviour

The job starts and there are no errors.

Environment

  • OS name + version: Ubuntu 22.04.2 LTS
  • Version of the code: main branch at 629c294

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions