{"record":{"id":"8800c27eccb76743","repo":"ansible/ansible","slug":"no-start-of-json-char-found-8800c2","errorCode":null,"errorMessage":"No start of json char found","messagePattern":"No start of json char found","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"lib/ansible/modules/async_wrapper.py","lineNumber":94,"sourceCode":"def _filter_non_json_lines(data):\n    \"\"\"\n    Used to filter unrelated output around module JSON output, like messages from\n    tcagetattr, or where dropbear spews MOTD on every single command (which is nuts).\n\n    Filters leading lines before first line-starting occurrence of '{', and filter all\n    trailing lines after matching close character (working from the bottom of output).\n    \"\"\"\n    warnings = []\n\n    # Filter initial junk\n    lines = data.splitlines()\n\n    for start, line in enumerate(lines):\n        line = line.strip()\n        if line.startswith(u'{'):\n            break\n    else:\n        raise ValueError('No start of json char found')\n\n    # Filter trailing junk\n    lines = lines[start:]\n\n    for reverse_end_offset, line in enumerate(reversed(lines)):\n        if line.strip().endswith(u'}'):\n            break\n    else:\n        raise ValueError('No end of json char found')\n\n    if reverse_end_offset > 0:\n        # Trailing junk is uncommon and can point to things the user might\n        # want to change.  So print a warning if we find any\n        trailing_junk = lines[len(lines) - reverse_end_offset:]\n        for line in trailing_junk:\n            if line.strip():\n                warnings.append('Module invocation had junk after the JSON data: %s' % '\\n'.join(trailing_junk))\n                break","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/ansible/ansible/blob/9cf16a4aca7898481c257f1e17ad28d0b67b1f85/lib/ansible/modules/async_wrapper.py#L76-L112","documentation":"Error \"No start of json char found\" thrown in ansible/ansible.","triggerScenarios":"Thrown at lib/ansible/modules/async_wrapper.py:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the async task; the async job file output was malformed.","Check for output truncation or encoding issues in async results."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9cf16a4aca7898481c257f1e17ad28d0b67b1f85","analyzedAt":"2026-08-15T00:15:47.100Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}