Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundled app on linux produces JSON Parse error: Unterminated string #13

Open
moreirathomas opened this issue Aug 22, 2022 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@moreirathomas
Copy link
Member

moreirathomas commented Aug 22, 2022

Description

Running the bundled Tauri app on linux produces invalid chunks of data in the RunStreamer.

UI:

Error

ReadableStreamDefaultController is not in a state where it can be closed

Logs :

[Error] Unhandled Promise Rejection: SyntaxError: JSON Parse error: Unterminated string
	promiseEmptyOnRejected (stream.ts:56)
	promiseReactionJob

[Error] Unhandled Promise Rejection: SyntaxError: JSON Parse error: Unterminated string
	(anonymous function)
	rejectPromise
	rejectPromiseWithFirstResolvingFunctionCallCheck
	writableStreamFinishInFlightWriteWithError
	(anonymous function)
	promiseReactionJob

[Error] Unhandled Promise Rejection: SyntaxError: JSON Parse error: Unterminated string
	(anonymous function)
	rejectPromise
	rejectPromiseWithFirstResolvingFunctionCallCheck
	pipeToFinalize
	(anonymous function)
	promiseReactionJob

Environment

OS and architecture:

  Operating System: Ubuntu 20.04.4 LTS
            Kernel: Linux 5.15.0-46-generic
      Architecture: x86-64

Notes

It works fine on macos.

It works fine in the browser on the same machine (linux).

The stream response from the console's network tab does not indicates any weird stuff:

Headers:

Summary
URL: http://localhost:8080/stream
Status: 200 OK
Source: Network
Address: ::1:8080
Initiator: 
stream.ts:87


Request
POST /stream HTTP/1.1
Content-Type: text/plain;charset=UTF-8
Origin: http://localhost:5173
Referer: http://localhost:5173/
Accept: */*
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15
Accept-Encoding: gzip, deflate
Accept-Language: en-US
Connection: Keep-Alive
Content-Length: 168

Response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Date: Mon, 22 Aug 2022 14:55:20 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked

Request Data
MIME Type: text/plain
Encoding: UTF-8
Request Data: {
    "request": {
        "method": "GET",
        "url": "http://localhost:9999?fib=4"
    },
    "runner": {
        "requests": 50,
        "concurrency": 10,
        "interval": "50ms",
        "requestTimeout": "2s",
        "globalTimeout": "20s"
    }
}

Body:

{"ID":0,"Done":false,"Error":null,"DoneCount":0,"MaxCount":50,"Timeout":20000000000,"Elapsed":48452}
{"ID":0,"Done":false,"Error":null,"DoneCount":20,"MaxCount":50,"Timeout":20000000000,"Elapsed":100623795}
{"ID":0,"Done":false,"Error":null,"DoneCount":40,"MaxCount":50,"Timeout":20000000000,"Elapsed":201072830}
{"ID":0,"Done":true,"Error":null,"DoneCount":50,"MaxCount":50,"Timeout":20000000000,"Elapsed":255707145}
{"Metrics":{"Min":162203,"Max":1584571,"Avg":732409,"SuccessCount":50,"FailureCount":0,"TotalCount":50},"Metadata":{"Config":{"Request":{"Method":"GET","URL":{"Scheme":"http","Opaque":"","User":null,"Host":"localhost:9999","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"fib=4","Fragment":"","RawFragment":""},"Header":{},"Body":{"Type":"","Content":null}},"Runner":{"Requests":50,"Concurrency":10,"Interval":50000000,"RequestTimeout":2000000000,"GlobalTimeout":20000000000},"Output":{"Silent":false},"Tests":null},"FinishedAt":"2022-08-22T16:55:20.345629042+02:00","TotalDuration":256697276},"Tests":{"Pass":true,"Results":[]}}
@moreirathomas moreirathomas added bug Something isn't working help wanted Extra attention is needed labels Aug 22, 2022
@nartydev
Copy link
Contributor

nartydev commented Oct 7, 2022

Capture d’écran 2022-10-07 à 10 56 22

OS and Architecture:
macOS 21.3.0
Darwin Kernel Version 21.3.0
x86_64

@moreirathomas moreirathomas added this to the Next milestone Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants