question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Turf.js@5 breaks on Mobile Safari on iOS 9.x and 10

See original GitHub issue

I have reproduced this with the full, CDN-served build of turfjs. An easy way to see this is to navigate to turf’s docs site on an iOS 9.x or 10 device. Turf examples do not work as expected, and when inspected over a Mac, mobile Safari gives the error: Attempting to change configurable attribute of unconfigurable property.

I was not able to narrow this down to a single turf module yet, but bboxPolygon is a potential candidate, judging from neighboring code in the minified build. The error occurs at 1:248611 with the CDN build for turf@5. Seems to be caused by an Object.defineProperties to override the name prop on the global Error class.

Seems to work on all other modern browsers by my testing.

EDIT: the exact build I’m using was downloaded from https://cdn.jsdelivr.net/npm/@turf/turf@5/turf.min.js.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
gusoskarcommented, Nov 8, 2018

Using Turf 5.1.6, React Native 0.56.1.

Getting ‘Attempting to change configurable attribute of unconfigurable property.’ when running my project on Android. Tried using import tuf from ‘@turf/turf’ as @karijkangas suggested, but it still gave me the same error. This workes on iOS however.

3reactions
umairdacommented, Dec 13, 2018

I was getting the same build error on Android with RN 0.56.1

@gusoskar Check which specific module you are using from turf and see if a 6.0 version is available. For example I needed bbox so I installed @turf/bbox@latest => installs 6.0.1

That fixed my issue.

As @DenisCarriere mentioned they are porting the library over to Typescript (6.0) to avoid these transpiling errors

Read more comments on GitHub >

github_iconTop Results From Across the Web

If Safari isn't loading websites or quits on your iPhone, iPad, or ...
If you can't load a website or webpage, or Safari quits unexpectedly, follow these steps.
Read more >
Clear the history and cookies from Safari on your iPhone, iPad ...
Delete history, cache, and cookies ... To clear your history and cookies, go to Settings > Safari, and tap Clear History and Website...
Read more >
Documentation Archive - Apple Developer
Title Resource Type Technology Date Xcode Release Notes Release Notes 2018‑06... Apple File System Guide Guides 2018‑06... Understanding and Detecting OpenGL Functionality Technical Notes OpenGL 2018‑06......
Read more >
If you can't update or restore your iPhone or iPod touch
You can put your iOS device in recovery mode, then restore it using your computer.
Read more >
If your iPhone, iPad, or iPod touch gets too hot or too cold
If the interior temperature of your device exceeds the normal operating range, your device will protect its internal components by attempting to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found