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

TypeError: undefined is not a function error for iOS devices with Retina displays on 1.18.3 #947

Closed
hoonsubin opened this issue Oct 9, 2020 · 8 comments · Fixed by #948 or #997
Closed
Labels
bug Something isn't working
Milestone

Comments

@hoonsubin
Copy link

hoonsubin commented Oct 9, 2020

Describe the bug
The same error that was described in issue #84 is still occurring on version 1.18.3. Desktop (including macOS with Retina display) and Android browsers seem to behave correctly, but iPhone and iPad on both Chrome and Safari will show the error exactly on this line https://github.com/matteobruni/tsparticles/blob/7784898e703dc04ae5b7cf7d69a9fb18baece16c/core/main/src/Core/Retina.ts#L51-L56

To Reproduce
Steps to reproduce the behavior:

  1. create a react app that imports react-tsparticles@1.18.3
  2. copy the particle options from this example https://codepen.io/matteobruni/pen/BaoZBZy
  3. start a development server
  4. access the development server from an iOS device
  5. see the error

Expected behavior
The polygon mask particle effect should be correctly displayed

Screenshots

IMG_0607
IMG_0605
IMG_0174

Smartphone (please complete the following information):

  • Device: iPhone, iPad
  • OS: iOS 13
  • Browser Safari, Chrome

Additional context
As you can see from the screenshot, I have tested from both the template (manually updated the package to be 1.18.3) app and the website I was working on (made with Gatsby), on the same package version.
I was only able to test this using react.
Additionally, the web application that is deployed on a remote server is showing the same issue as well, albeit with a white blank screen right before the particle load instead of any error messages.

@issue-label-bot issue-label-bot bot added the bug Something isn't working label Oct 9, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.98. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@hoonsubin
Copy link
Author

okay, I noticed that my iOS device was actually running on iOS 13 and not 14. For some low-level magical reasons, upgrading iOS to 14 fixed this issue for me. I'll close this issue since I think it's been addressed. Thank you for the update.

@matteobruni matteobruni linked a pull request Oct 10, 2020 that will close this issue
@felipefa
Copy link

felipefa commented Nov 2, 2020

This problem is still happening for iOS 12 (and lower) devices using react-tsparticles@1.18.8.

I was able to bypass the error by wrapping the code from line 24 to 32 of the Core/Retina.js file inside a try/catch block, but I'm waiting for a proper fix if possible.

image

@matteobruni matteobruni reopened this Nov 2, 2020
matteobruni added a commit that referenced this issue Nov 2, 2020
fix: fixes #947
@matteobruni matteobruni mentioned this issue Nov 2, 2020
@matteobruni matteobruni added this to the 1.18.9 milestone Nov 3, 2020
@matteobruni
Copy link
Collaborator

Found the issue and tested, version 1.18.9 is now with the fix

@felipefa
Copy link

felipefa commented Nov 3, 2020

Thank you for such a quick reply, but after upgrading to version 1.18.9 I'm getting this error.

image

And also this warnings on the console.
image

I even tried deleting the node_modules folder and installing everything again, but no success. Should I open a new issue?

@matteobruni
Copy link
Collaborator

I'm releasing the version 1.18.10 that could fix this issue, this version will be released very soon, let me know if that version fixes this issue

@matteobruni
Copy link
Collaborator

1.18.10 is out, let me know if it works

@felipefa
Copy link

felipefa commented Nov 3, 2020

Yes, it's all working now.

Thank you very much!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants