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

AssertionError in spdy-transport consistently causing failures while running in Chrome 69 #1491

Closed
1 of 2 tasks
bdpartridge opened this issue Sep 6, 2018 · 11 comments
Closed
1 of 2 tasks

Comments

@bdpartridge
Copy link

  • Operating System: macOS High Sierra (10.13.6)
  • Node Version: 8.11.1
  • Yarn Version: 1.6.0
  • webpack Version: 4.17.1
  • webpack-dev-server Version: 3.1.6
  • This is a bug
  • This is a modification request

Code

I'm not including our webpack config for now, but I can include a stripped-down version if it's really needed to reproduce the problem.

Expected Behavior

webpack-dev-server works like it did in Chrome <69, and like it continues to work in other browsers (like Firefox).

Actual Behavior

After several incremental recompiles, the process errors out due to an AssertionError in the spdy-transport library:

assert.js:42
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: false == true
    at PriorityNode.removeChild (/Users/bpartridge/forward/fwd/gui/node_modules/spdy-transport/lib/spdy-transport/priority.js:72:3)
    at PriorityNode.remove (/Users/bpartridge/forward/fwd/gui/node_modules/spdy-transport/lib/spdy-transport/priority.js:61:15)
    at PriorityTree.add (/Users/bpartridge/forward/fwd/gui/node_modules/spdy-transport/lib/spdy-transport/priority.js:157:23)
    at Stream._initPriority (/Users/bpartridge/forward/fwd/gui/node_modules/spdy-transport/lib/spdy-transport/stream.js:101:25)
    at new Stream (/Users/bpartridge/forward/fwd/gui/node_modules/spdy-transport/lib/spdy-transport/stream.js:75:8)
    at Connection._createStream (/Users/bpartridge/forward/fwd/gui/node_modules/spdy-transport/lib/spdy-transport/connection.js:391:16)
    at Connection._handleHeaders (/Users/bpartridge/forward/fwd/gui/node_modules/spdy-transport/lib/spdy-transport/connection.js:438:21)
    at Connection._handleFrame (/Users/bpartridge/forward/fwd/gui/node_modules/spdy-transport/lib/spdy-transport/connection.js:321:10)
    at Parser.<anonymous> (/Users/bpartridge/forward/fwd/gui/node_modules/spdy-transport/lib/spdy-transport/connection.js:158:10)
    at emitOne (events.js:116:13)

This only seems to happen in Chrome, and only started after upgrading to 69.0.3497.81 (Official Build) (64-bit).

For Bugs; How can we reproduce the behavior?

  • Run webpack-dev-server.
  • Open URL for server in Chrome 69.
  • Trigger several incremental rebuilds. For me, it routinely took around 5-7 rebuilds before the error was triggered.
  • Observe that process fails due to AssertionError noted above.

Might be related to spdy-http2/spdy-transport#47.

@alexander-akait
Copy link
Member

@bdpartridge yep, please create minimum reproducible test repo, thanks!

@davidjoy
Copy link

davidjoy commented Sep 7, 2018

For those blocked by this, @misterfresh's quick, hacky fix described in this comment over on spdy-http2/spdy-transport#47 seems to have temporarily solved it for us:

spdy-http2/spdy-transport#47 (comment)

Not something I want to leave in the code base, but it at least lets us keep using our dev servers for the moment. (Thanks to @bdpartridge for the pointer/issue)

@pladaria
Copy link

pladaria commented Sep 11, 2018

@davidjoy, simply adding spdy: {protocols: ['http/1.1']} to https options in dev-server config workarounded this issue for us

@rathpc
Copy link

rathpc commented Sep 11, 2018

I also experienced this issue with the following config:

Operating System: macOS Sierra (10.12.6)
Node Version: 8.11.2
NPM Version: 6.1.0
webpack Version: 2.7.0
webpack-dev-server Version: 2.11.2

I am using the patch fix mentioned by @misterfresh with some additional logic until an official fix is released.

@alexander-akait
Copy link
Member

Feel free to PR 👍

@ScorpAL
Copy link

ScorpAL commented Sep 12, 2018

@davidjoy, simply adding spdy: {protocols: ['http/1.1']} to https options in dev-server config workarounded this issue for us

Thank you. That helps me.

devServer: {
    host: '0.0.0.0',
    port: 3000,
    https: {
        spdy: {
            protocols: ['http/1.1']
        }
    }
}

@Ailuue
Copy link

Ailuue commented Sep 20, 2018

@davidjoy, simply adding spdy: {protocols: ['http/1.1']} to https options in dev-server config workarounded this issue for us

Thank you. That helps me.

devServer: {
    host: '0.0.0.0',
    port: 3000,
    https: {
        spdy: {
            protocols: ['http/1.1']
        }
    }
}

Any way to do this from create-react-app without ejecting?

@alexander-akait
Copy link
Member

Maybe we can use this as default property for protocols

@iisisrael
Copy link

Protocol config fix worked with the caveat that I also had to remove the --https option in our dev build script run line in our package.json, so the devServer https config wouldn't get borked back to just true.

@alexander-akait
Copy link
Member

@odinho fixed in #1491, will be shipped in near future

This was referenced Mar 13, 2021
@Imran-Siddiquii
Copy link

VM51:2 Uncaught ReferenceError: process is not defined
at Object.4043 (:2:13168)
at r (:2:306599)
at Object.8048 (:2:9496)
at r (:2:306599)
at Object.8641 (:2:1379)
at r (:2:306599)
at :2:315627
at :2:324225
at :2:324229
at HTMLIFrameElement.e.onload (index.js:1)
4043 @ VM51:2
r @ VM51:2
8048 @ VM51:2
r @ VM51:2
8641 @ VM51:2
r @ VM51:2
(anonymous) @ VM51:2
(anonymous) @ VM51:2
(anonymous) @ VM51:2
e.onload @ index.js:1
load (async)
be @ index.js:1
he @ index.js:1
tryDismissErrorOverlay @ webpackHotDevClient.js:184
onSuccessfulHotUpdate @ webpackHotDevClient.js:150
handleApplyUpdates @ webpackHotDevClient.js:257
(anonymous) @ webpackHotDevClient.js:273
Promise.then (async)
tryApplyUpdates @ webpackHotDevClient.js:271
handleWarnings @ webpackHotDevClient.js:147
push../node_modules/react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:210
webpackHotDevClient.js:76 The development server has disconnected.
Refresh the page if necessary.

why this is happening

aherrmann-da pushed a commit to digital-asset/daml that referenced this issue Mar 10, 2022
See puppeteer/puppeteer#6622 (comment)

changelog_begin
- [Daml Assistant] The create-daml-app template now depends on a more
  recent version of puppeteer to ensure MacOS M1 support. See
  puppeteer/puppeteer#6622 (comment)
  This also requires a later version of react-scripts for compatibility
  with later Chrome versions, See
  webpack/webpack-dev-server#1491
changelog_end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants