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

Created on 9 Oct 2020  路  8Comments  路  Source: matteobruni/tsparticles

Describe the bug
The same error that was described in issue https://github.com/matteobruni/tsparticles/issues/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 [email protected]
  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.

bug

Most helpful comment

Yes, it's all working now.

Thank you very much!

All 8 comments

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

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

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.

This problem is still happening for iOS 12 (and lower) devices using [email protected].

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

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

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?

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

1.18.10 is out, let me know if it works

Yes, it's all working now.

Thank you very much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matteobruni picture matteobruni  路  4Comments

lectair picture lectair  路  6Comments

matteobruni picture matteobruni  路  6Comments

matteobruni picture matteobruni  路  4Comments

paul300497 picture paul300497  路  5Comments