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

BUG: Handle large webpack stats bundles without socket.io client disconnect. #281

Merged
merged 8 commits into from Apr 17, 2019

Conversation

ryan-roemer
Copy link
Member

@ryan-roemer ryan-roemer commented Apr 17, 2019

Current Notes

Thanks to great insight by @westbrook-asapp it appears we're sending the full webpack stats object from client (webpack plugin) to server (CLI) when we only need the errors and warnings fields. This PR:

/cc @parkerziegler @westbrook-asapp

Old, WIP debugging info

Currently can reproduce the bug in #279 as follows:

$ yarn

# Run normally. => NO DISCONNECT MESSAGE / WORKS
$ cross-env EXAMPLE=simple node bin/webpack-dashboard.js -- webpack-cli --config examples/config/webpack.config.js --watch

# Run with hack to inject a **huge** source payload. => "Socket.io disconnected. Possibly build data too large?"
$ cross-env EXAMPLE=simple TMP_BIG_STATS=true node bin/webpack-dashboard.js -- webpack-cli --config examples/config/webpack.config.js --watch

I haven't started at looking at solutions, but we've easily now captured the error with the large payload size from @westbrook-asapp . I've even attempted to further refine the "bad" threshold in code, although that may well be machine dependent?

I think next step is see if there is some issue in socket.io that has potential solutions (either in client or server) or something else...

@ryan-roemer ryan-roemer changed the title [WIP] BUG: Handle large webpack stats bundles without socket.io client disconnect. [WIP][NO MERGE][FAILING] BUG: Handle large webpack stats bundles without socket.io client disconnect. Apr 17, 2019
@ryan-roemer ryan-roemer changed the title [WIP][NO MERGE][FAILING] BUG: Handle large webpack stats bundles without socket.io client disconnect. BUG: Handle large webpack stats bundles without socket.io client disconnect. Apr 17, 2019
@@ -10,3 +10,4 @@ yarn-error.log
package-lock.json
dist-*
.vscode
.lankrc.js
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parkerziegler -- This is unrelated but useful so I can use https://github.com/FormidableLabs/lank#readme when working on both inspectpack and webpack-dashboard at the same time...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I remember looking at lank for symlinking, all good here!

@@ -10,3 +10,4 @@ yarn-error.log
package-lock.json
dist-*
.vscode
.lankrc.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I remember looking at lank for symlinking, all good here!

Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/FormidableLabs/webpack-dashboard/releases) page.

## UNRELEASED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for including this here!

@ryan-roemer ryan-roemer merged commit f90e6ab into master Apr 17, 2019
@ryan-roemer ryan-roemer deleted the bug/socketio-size branch April 17, 2019 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Large webpack stats bundles cause socket.io client disconnect.
2 participants