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

Not working on iPhone 5, iOS 10.3.4 #190

Closed
xseignard opened this issue Jun 12, 2020 · 7 comments · Fixed by #203
Closed

Not working on iPhone 5, iOS 10.3.4 #190

xseignard opened this issue Jun 12, 2020 · 7 comments · Fixed by #203
Labels
Bug Something isn't working ⚙️ JavaScript Engine This issue or pull request is related to a JavaScript engine whatwg-url This issue or pull request is related to whatwg-url

Comments

@xseignard
Copy link

xseignard commented Jun 12, 2020

Hello,
It took me a while to track down a bug, but it leads to your lib, as it's not working on iPhone 5/iOS 10.3.4

Here is the error output:
Capture d’écran 2020-06-12 à 15 33 53

@charpeni
Copy link
Owner

What's your React Native version?

@xseignard
Copy link
Author

0.62.2

The plugin works on iPhone 6, iOS 12.3.4

@charpeni charpeni added Bug Something isn't working ⚙️ JavaScript Engine This issue or pull request is related to a JavaScript engine whatwg-url This issue or pull request is related to whatwg-url labels Jun 23, 2020
@charpeni
Copy link
Owner

Ugh. I've been able to reproduce this.

This is coming from iOS 10 and it must be related to the JavaScriptCore version being used as ArrayBuffer.prototype.byteLength is not defined. Everything is working fine on iOS 11.

Not sure how to fix this. 🤔

@lucianomlima
Copy link

Maybe need a polyfill like the following
https://gist.github.com/tjmehta/7e0f0d2aca966c71e70a453d0786f938

@charpeni
Copy link
Owner

charpeni commented Jul 1, 2020

I would like to avoid the need of a polyfill, but it seems like this is coming from an issue within JavaScriptCore of iOS 10. So, we probably won't a choice here.

Polyfills are generally adding a significant footprint to the bundle size due to conditional imports not being supported, but I was able to find a good one here that seems high quality: https://polyfill.io/v3/polyfill.min.js?features=ArrayBuffer.

I'll retry with this later.

@charpeni
Copy link
Owner

charpeni commented Jul 2, 2020

It's not working with those polyfills.

byteLength has to be an own property on the ArrayBuffer object, and in JavaScriptCore of iOS 10 and those polyfills, this is not the case.

Still investigating.

@charpeni
Copy link
Owner

charpeni commented Jul 2, 2020

Fixed by #203 and will be released as 1.2.0-rc.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working ⚙️ JavaScript Engine This issue or pull request is related to a JavaScript engine whatwg-url This issue or pull request is related to whatwg-url
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants