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: chrome crashes with "Aw, snap" message #5887

Open
3 tasks done
danielleroux opened this issue Jul 5, 2024 · 2 comments
Open
3 tasks done

bug: chrome crashes with "Aw, snap" message #5887

danielleroux opened this issue Jul 5, 2024 · 2 comments
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil Has Workaround This PR or Issue has a work around detailed within it. Help Wanted

Comments

@danielleroux
Copy link

danielleroux commented Jul 5, 2024

Prerequisites

Stencil Version

4.19.2

Current Behavior

Chrome crash after toggle between <slot> elements
With DevTools open I can reproduce it 100%, but sometimes it happens also without DevTools open but for this case I dont have a reproducible repo.

Repo: https://github.com/danielleroux/chrome-crash

Problem is related to toggle a <slot>

Component A render function

{this.doTheCrash ? (
          <div>
            Desktop
            <slot></slot>
          </div>
        ) : (
          <comp-b>
            Mobile
            <slot></slot>
          </comp-b>

and the Host class with combination of display: none

component B render function

      <Host
        class={{
          show: false,
        }}
      >
        <slot></slot>
      </Host>

CSS:

:host(:not(.show)) {
  display: none;
}

Expected Behavior

Not to crash the chrome instance

System Info

System: macOS
Chrome: Version 126.0.6478.127 (Official Build) (arm64)

Steps to Reproduce

Checkout repo: https://github.com/danielleroux/chrome-crash

  1. npm run start
  2. Open Browser with DevTools
  3. Resize
  4. Click the button (maybe multiple times if not resized correctly)

Code Reproduction URL

https://github.com/danielleroux/chrome-crash

Additional Information

chromecrash.mov
@ionitron-bot ionitron-bot bot added the triage label Jul 5, 2024
@christian-bromann christian-bromann added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels Jul 8, 2024
@christian-bromann
Copy link
Member

I am receiving the following error logs from Chrome:

[0708/095634.168437:WARNING:in_range_cast.h(38)] value -634136515 out of range
[17138:259:0708/095634.044536:ERROR:ax_object.cc(5839)] Check failed: !IsDetached().
[0708/095634.371180:WARNING:in_range_cast.h(38)] value -634136515 out of range
[17107:259:0708/095634.394478:ERROR:CONSOLE(1)] "Protocol Error: the message with wrong session id: {"method":"Target.targetCrashed","params":{"targetId":"FFDB5552839A391A61B4F50DF00432B6","status":"crashed","errorCode":11},"sessionId":"37382A3542E7D2DF0F887AB7D403DA82"}", source: devtools://devtools/bundled/devtools-frontend/front_end/core/protocol_client/protocol_client.js (1)
[17107:259:0708/095634.394988:ERROR:CONSOLE(1)] "Session is unregistering, can't dispatch pending call to Runtime.evaluate", source: devtools://devtools/bundled/devtools-frontend/front_end/core/sdk/sdk.js (1)
[17107:259:0708/095634.395073:ERROR:CONSOLE(1)] "Extension server error: Inspector protocol error: Session is unregistering, can't dispatch pending call to Runtime.evaluate", source: devtools://devtools/bundled/devtools-frontend/front_end/models/extensions/extensions.js (1)

I can't entirely say if this issue is actually more a browser or a Stencil issue but certainly worth investigating more. It seems to not appear in the Canary version. I've ingested it into our backlog but I want to set expectation clear: any investigations from your side is much appreciated. Our team is short staffed and battles constantly with different priorities. It is unlikely we are picking this up anytime soon due the unknown origin and its low impact.

@danielleroux
Copy link
Author

danielleroux commented Jul 8, 2024

Totally fine I managed to workaround this issue by removing the slot

     @State() show: boolean = false;

      <Host
        class={{
          show: this.show,
        }}
      >
        { this.show && <slot></slot> }
      </Host>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil Has Workaround This PR or Issue has a work around detailed within it. Help Wanted
Projects
None yet
Development

No branches or pull requests

2 participants