dusk-dashboard icon indicating copy to clipboard operation
dusk-dashboard copied to clipboard

Not working with large DOM responses

Open jeffochoa opened this issue 4 years ago • 2 comments

Hello there 👋

Tests are passing in dusk, but the preview is not available in the browser.

I'm getting the following error in the browser terminal.

VM1898:1 Uncaught SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at WebSocket.conn.onmessage (dashboard:252)

It works fine for a small HTML response like the welcome.blade.php view.

Is there any known solution for this issue?

Thanks, Jeff.

jeffochoa avatar Jun 11 '20 18:06 jeffochoa

See also #20

ncatanchin avatar Jun 11 '20 23:06 ncatanchin

So I managed to get this to at least run, but given there is an intermediate library between reactPHP (buzz-react) I am entirely unsure how to fix this in the case where i don't mind really fat responses.

Setting this value to a ridiculously high value https://github.com/reactphp/stream/blob/master/src/WritableResourceStream.php#L48

And updating the buffer size to -1 https://github.com/reactphp/stream/blob/master/src/ReadableResourceStream.php#L73

I'll probably just rewrite the tests in Cypress since I'm not entirely sure how to address this.

WalrusSoup avatar Aug 21 '20 17:08 WalrusSoup