Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

[BUG] - Web Component crashes when calling inject-api-custom-element.ts #123

Open
3 tasks done
ihardyslide opened this issue Jan 17, 2024 · 1 comment
Open
3 tasks done

Comments

@ihardyslide
Copy link

Describe the bug

Hi,

first I want to say thank you for this nice library which helped me getting my stylings correct for the component library I am working on!

Unfortunately I came across one issue, which I couldn't solve on my own yet.
Under some circumstances I could not fully pin down by now, my app crashes while rendering the web components.

This is the error I am getting:
image

I reverse engineered it and found that the line causing the error is this one:

+ ' this.shadowRoot.insertBefore(s, this._childStylesAnchor);\n'

The strange thing is, that it works for the whole loop (for each stylesheet) it goes through for one component, but suddenly crashes on the last iteration.

Have you maybe experienced something similar in the past?
I could not find anything related in the issues section.
Unfortunately I can not provide you with example code, because I can not publish the relevant code parts to public.

Version used:
@unplugin-vue-ce/sub-style: 1.0.0-beta.17

Thanks & BR

Reproduction

not possible, internal code

System Info

System:

    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)

    CPU: (3) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz

    Memory: 16.04 GB / 17.24 GB

    Container: Yes

    Shell: 5.1.4 - /bin/bash

  Binaries:

    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node

    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm

  Browsers:

    Chrome: 120.0.6099.216

Used Package Manager

npm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a unplugin-vue-ce issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs instead.
  • The provided reproduction is a minimal reproducible example of the bug.
@baiwusanyu-c
Copy link
Member

Sorry, I have been very busy recently, so I am only replying to you now.
I have never encountered this problem. When maintaining vue, I saw related issues, which were related to teleport components, suspense components, asynchronous components, etc. So it is difficult to determine whether it is a plugin problem or a vue problem. I still hope you can provide a minimal warehouse code that reproduces the problem so that I can troubleshoot the problem. You can write a small amount of core problem code in your private warehouse to reproduce the problem, so there will be no privacy issues of code leakage.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants