Skip to content

console.log()' output gets truncated and "NULL" substrings are replaced with "[object Object]" #7728

@mitya33

Description

@mitya33

Which Cloudflare product(s) does this pertain to?

Workers Runtime, Wrangler

What versions are you using?

3.99.0

What operating system and version are you using?

Windows 10

Please provide a link to a minimal reproduction

No response

Describe the Bug

Wrangler (or possibly the Workers runtime) truncates console.log() output and appends and inserts random instances of [object Object] where the logged string contains the substring "NULL".

For example, if I do this:

console.log(`SELECT
    test.id AS test_id,
    test.name AS test_name,
    test.project_id AS test_project_id,
    test.is_complex AS test_is_complex,
    test.fail_acknowledged AS test_fail_acknowledged,
    test.content AS test_content,
    project.id AS project_id,
    project.name AS project_name
FROM tests AS test
LEFT JOIN test_runs test_run ON test_run.test_id = test.id
JOIN projects project ON test.project_id = project.id
WHERE (test_run.created_at<= '2025-01-10 13:05:45' OR test_run.created_at IS NULL)
GROUP BY test.id,test_run.id,project.id,project.name
ORDER BY test_run.created_at asc NULLS FIRST`);

What I actually get is shown in this image:

bug

See how output is truncated, and two [object Object]s have appeared.) I've found the only way around this is to log output URL encoded.

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    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