beyondcode / dusk-dashboard

A beautiful dashboard for your Laravel Dusk tests
https://pociot.dev/8-introducing-laravel-dusk-dashboard
MIT License
559 stars 63 forks source link

Not working with large DOM responses #69

Closed jeffochoa closed 10 months ago

jeffochoa commented 4 years ago

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.

ncatanchin commented 4 years ago

See also #20

WalrusSoup commented 4 years ago

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.