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

bdpartridge commented Sep 6, 2018

  • 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

alexander-akait commented Sep 6, 2018

@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

alexander-akait commented Sep 11, 2018

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

alexander-akait commented Sep 20, 2018

Maybe we can use this as default property for protocols

@iisisrael
Copy link

iisisrael commented Sep 28, 2018

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

alexander-akait commented Dec 5, 2018

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

matheus1lva pushed a commit to matheus1lva/GrCartuchos that referenced this issue Dec 21, 2018
## The devDependency [webpack-dev-server](https://github.com/webpack/webpack-dev-server) was updated from `3.1.10` to `3.1.11`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

<details>
<summary>Release Notes for v3.1.11</summary>

<p><a name="user-content-3.1.11"></a></p>
<h2><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/compare/v3.1.10...v3.1.11">3.1.11</a> (2018-12-21)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>bin/options:</strong> correct check for color support (<code>options.color</code>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/issues/1555" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1555/hovercard">#1555</a>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/55398b5">55398b5</a>)</li>
<li><strong>package:</strong> update <code>spdy</code> v3.4.1...4.0.0 (assertion error) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/issues/1491" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack-dev-server/issues/1491/hovercard">#1491</a>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/issues/1563" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1563/hovercard">#1563</a>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/7a3a257">7a3a257</a>)</li>
<li><strong>Server:</strong> correct <code>node</code> version checks (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/issues/1543" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1543/hovercard">#1543</a>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/927a2b3">927a2b3</a>)</li>
<li><strong>Server:</strong> mime type for wasm in contentBase directory (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/issues/1575" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack-dev-server/issues/1575/hovercard">#1575</a>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/issues/1580" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1580/hovercard">#1580</a>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/fadae5d">fadae5d</a>)</li>
<li>add url for compatibility with webpack@5 (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/issues/1598" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack-dev-server/issues/1598/hovercard">#1598</a>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/issues/1599" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1599/hovercard">#1599</a>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/68dd49a">68dd49a</a>)</li>
<li>check origin header for websocket connection (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/issues/1603" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack-dev-server/pull/1603/hovercard">#1603</a>) (<a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/b3217ca">b3217ca</a>)</li>
</ul>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 9 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/ff2874f5f3a90e5727434cc10f69ac4d54896033"><code>ff2874f</code></a> <code>chore(release): 3.1.11</code></li>
<li><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/b3217ca8dc6b371a160b6749b949ab09d7b9f6d7"><code>b3217ca</code></a> <code>fix: check origin header for websocket connection (#1603)</code></li>
<li><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/68dd49a5e44b270061e4746b2e01bbc72589ca3b"><code>68dd49a</code></a> <code>fix: add url for compatibility with webpack@5 (#1598) (#1599)</code></li>
<li><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/fadae5da6ba0261cade08164feeaad99b1de6b79"><code>fadae5d</code></a> <code>fix(Server): mime type for wasm in contentBase directory (#1575) (#1580)</code></li>
<li><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/7a3a2579179b2ca0fd91405d9872ba2c3ed8db3a"><code>7a3a257</code></a> <code>fix(package): update <code>spdy</code> v3.4.1...4.0.0 (assertion error) (#1491) (#1563)</code></li>
<li><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/1fe82dee4eef600946b2601a2d853cffbe65db0a"><code>1fe82de</code></a> <code>ci(travis): Node 11 (on OS X) crashes, use 10 for now (#1588)</code></li>
<li><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/55398b5de17b9a845b1ee5aaa90bb2002c25ddfb"><code>55398b5</code></a> <code>fix(bin/options): correct check for color support (<code>options.color</code>) (#1555)</code></li>
<li><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/927a2b38d4d3a5d8fd50dfce0343634d46fa8a92"><code>927a2b3</code></a> <code>fix(Server): correct <code>node</code> version checks (#1543)</code></li>
<li><a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/commit/fa96a76e9e5507bbf874044be0d95872768abf5e"><code>fa96a76</code></a> <code>chore(PULL_REQUEST_TEMPLATE): allow features (#1539)</code></li>
</ul>
<p>See the <a href="https://urls.greenkeeper.io/webpack/webpack-dev-server/compare/fe3219f614ad84afbaab1ecbd1d9aec4ff337d37...ff2874f5f3a90e5727434cc10f69ac4d54896033">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴
This was referenced Mar 14, 2021
@Imran-Siddiquii
Copy link

Imran-Siddiquii commented Jan 19, 2022

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