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

After running for a while 'cannot read properties of undefined' error is thrown #541

Closed
1 task done
Tracked by #321
jjachowski opened this issue Jul 24, 2023 · 6 comments · Fixed by #550
Closed
1 task done
Tracked by #321

After running for a while 'cannot read properties of undefined' error is thrown #541

jjachowski opened this issue Jul 24, 2023 · 6 comments · Fixed by #550
Labels
bug Something isn't working resolved This issue is resolved

Comments

@jjachowski
Copy link

jjachowski commented Jul 24, 2023

Bug is related to

  • embla-carousel (core package)

Embla Carousel version

  • embla-carousel-react: 8.0.0-rc11
  • embla-carousel-autoplay": 8.0.0-rc11

Describe the bug

  • After leaving carousel with autoplay plugin for a longer while (up to 30 minutes) 'cannot read properties of undefined' error is thrown.
    embla-autoplay-error
  • Setting autplay plugin options delay: 1 instantly reproduces bug
image

CodeSandbox

Steps to reproduce

  1. Open link in the browser
  2. Wait
  3. Error should be thrown after longer while
  4. Can be reproduced instantly by setting delay: 1 to autoplay options
image

Expected behavior

  • Type Error shown on screenshot should not appear after leaving carousel on autoplay

Additional context

  • It can take long time to see this bug, last time I tried to recreate it, it took me over 30 minutes. You can leave browser window in the background.
  • From my understanding undefined value is being passed to normalizeInput function. Then in ternary operator we try to .get() on this undefined value.
image
@jjachowski jjachowski added the bug Something isn't working label Jul 24, 2023
@jjachowski jjachowski changed the title Webkit - after running for a while 'cannot read properties of undefined' error is thrown After running for a while 'cannot read properties of undefined' error is thrown Jul 24, 2023
@davidjerleke
Copy link
Owner

Hi @jjachowski,

Thank you very much for a complete bug report. I’ll investigate this when possible.

Best,
David

@davidjerleke davidjerleke mentioned this issue Jul 28, 2023
37 tasks
@hmartiins
Copy link

Hi! I would like to give feedback that this error has already appeared in the error monitoring of my site as well, but we did not have time to stop to investigate to conclude that it was the embla that was logging this error.

image

@davidjerleke davidjerleke added the investigating Issue is being looked into label Aug 4, 2023
@davidjerleke
Copy link
Owner

@jjachowski please try this CodeSandbox and see if the problem is solved there.

Thanks in advance.

Best,
David

@davidjerleke davidjerleke removed the investigating Issue is being looked into label Aug 4, 2023
@davidjerleke davidjerleke added the awaiting response Issue is awaiting feedback label Aug 4, 2023
davidjerleke added a commit that referenced this issue Aug 6, 2023
@davidjerleke davidjerleke added resolved This issue is resolved and removed awaiting response Issue is awaiting feedback labels Aug 6, 2023
@jjachowski
Copy link
Author

jjachowski commented Aug 6, 2023

@davidjerleke sorry for not replying sooner, must have missed notification. Looks great, thank you very much for that fix :)

@davidjerleke
Copy link
Owner

davidjerleke commented Aug 7, 2023

@hmartiins.
@jjachowski thanks for confirming 👍. This bug fix will be released with v8.0.0-rc12.

Cheers,
David

@davidjerleke
Copy link
Owner

@hmartiins, @jjachowski, a bug fix for this has been released with v8.0.0-rc12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved This issue is resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants