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

Parsing in Cordova iOS #320

Closed
darylldawn opened this issue Jul 5, 2016 · 3 comments
Closed

Parsing in Cordova iOS #320

darylldawn opened this issue Jul 5, 2016 · 3 comments

Comments

@darylldawn
Copy link

I'm currently trying to parse a csv file in a codova app.
It successfully parses for the Android platform, however for iOS it returns nothing.
Has anyone else encountered this and Is there a workaround?

@gontard
Copy link

gontard commented Jul 6, 2016

Same problem here.

I found this issue in pouchdb load on ios.
It seems that

for some reason, iOS is returning 0 as the status for the xhr request even when there is data loaded from file

So i changed in the papaparse _chunkLoaded function, this line
if (xhr.status < 200 || xhr.status >= 400)
by this one:
if (!((xhr.status >= 200 && xhr.status < 300) || (xhr.status==0 && xhr.responseText.length>0)))

And now it works.

@darylldawn
Copy link
Author

darylldawn commented Jul 6, 2016

@gontard's solution worked! Thanks again! Closing this. I hope it gets patched soon.

@mirko77
Copy link

mirko77 commented Feb 24, 2020

This is still an issue using Papaparse 5.0 on android 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants