naver / egjs-flicking

🎠 ♻️ Everyday 30 million people experience. It's reliable, flexible and extendable carousel.
https://naver.github.io/egjs-flicking/
MIT License
2.75k stars 128 forks source link

TypeError: undefined is not an object (evaluating 'slot.key') #781

Closed taidaid closed 9 months ago

taidaid commented 1 year ago

Description

I don't have many details for you sadly. I've seen this error 6 times in my Sentry logs, 3 times in the past month. All I really have for you is the info below. I hope it helps, please let me know if there's anything more I can provide.

Steps to check or reproduce

Running:

    "@egjs/flicking-plugins": "4.6.0",
    "@egjs/vue-flicking": "4.10.4",

image

image

WoodNeck commented 1 year ago

Hello @taidaid! It's an easy fix by filtering the slots, but I can't tell if the problem is in getRenderingPanels or _getSlots. So, I'm guessing that fix would stop the error, but the rendered element would likely not be the desired result. I would like to know if you could give me some more information to reproduce the issue, such as the rendering function you're using.

taidaid commented 1 year ago

Hello @WoodNeck , thanks for the quick response.

I'm not sure where I can get the exact info you need. Hopefully this helps

      <VueFlicking
        ref="vueFlickingEl"
        :options="{
          moveType: 'snap',
          horizontal: true,
          align: 'prev',
          bound: true,
          circular: false,
          preventClickOnDrag: true,
          defaultIndex: 0,
          disableOnInit: !isMobile && !isTablet,
          renderOnlyVisible: true,
        }"
        :viewport-tag="'div'"
        :camera-tag="'div'"
        class="product-card-container__image-slider"
        @ready="initializeVueFlicking"
        @changed="updatePositions"
      >
        <ProductCard
          v-for="product in products"
          v-bind="product"
          :key="product.id"
          :active-currency="activeCurrency"
          :locale="locale"
          v-on="$listeners"
        />
      </VueFlicking>
WoodNeck commented 1 year ago

I tried to reproduce this issue but I couldn't. I think getRenderingPanels is giving the wrong values, which might be the cause of this issue and #783, but I can work on it once after reproducing the issue. If you find a way to reproduce the issue, could you please let me know?

taidaid commented 1 year ago

Ok @WoodNeck , thanks for the quick investigation. I have only 2 reports of this issue after using your library for over a year, so I would classify it as a very low-occurrence bug. Thanks for all the hard work! :grin: If I learn more about it, I'll be sure to update this.

WoodNeck commented 1 year ago

@taidaid Thank you! We'd really appreciate it if you could :)

taidaid commented 1 year ago

Hello again, I'm guessing this is related to the same bug, so here's my Sentry info on a new occurrence:

TypeError Array.map(<anonymous>) 
Cannot read properties of undefined (reading 'toggle')

image

image