Skip to content

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

Closed

Description

@bdpartridge
  • 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.

Activity

  1. alexander-akait commented on Sep 6, 2018

    @alexander-akait
    Member

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

  2. davidjoy commented on Sep 7, 2018

    @davidjoy

    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)

  3. pladaria commented on Sep 11, 2018

    @pladaria

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

  4. rathpc commented on Sep 11, 2018

    @rathpc

    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.

  5. alexander-akait commented on Sep 11, 2018

    @alexander-akait
    Member

    Feel free to PR 👍

  6. ScorpAL commented on Sep 12, 2018

    @ScorpAL

    @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']
            }
        }
    }
    
  7. alexvervloet commented on Sep 20, 2018

    @alexvervloet

    @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?

  8. alexander-akait commented on Sep 20, 2018

    @alexander-akait
    Member

    Maybe we can use this as default property for protocols

  9. iisisrael commented on Sep 28, 2018

    @iisisrael

    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.

  10. alexander-akait commented on Dec 5, 2018

    @alexander-akait
    Member

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

  11. Imran-Siddiquii commented on Jan 19, 2022

    @Imran-Siddiquii

    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

  12. added a commit that references this issue on Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions