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

file reader plugin events are not firing #7891

Closed
comfortme opened this issue Aug 27, 2016 · 5 comments
Closed

file reader plugin events are not firing #7891

comfortme opened this issue Aug 27, 2016 · 5 comments

Comments

@comfortme
Copy link

Short description of the problem:

while using file plugin with ionic-native found out that readAsArrayBuffer(path, file) promise never resolves!
i did some digging and turns out it's an fixed angular 2 zone issue and here is a detailed closed ionic issue about it. #6020
it looks like it's never been fixed for ionic 2

What behavior are you expecting?

file promises to be resolved

Steps to reproduce:

  1. setup a new project
  2. install camera and file plugin
  3. getpicture with camera and try to read it with readAsArrayBuffer
Camera.getPicture(options).then((imageData) => {
File.readAsArrayBuffer(imageData).then((res)=>{
//never resolves.
});
});

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
angular/zone.js#137
angular/angular#2533

Which Ionic Version? 1.x or 2.x
Cordova CLI: 6.0.0
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.36
Ionic App Lib Version: 2.0.0-beta.19
OS: Windows 8.1
Node Version: v4.4.3

@jgw96
Copy link
Contributor

jgw96 commented Aug 29, 2016

This issue was moved to danielsogl/awesome-cordova-plugins#505

@jgw96
Copy link
Contributor

jgw96 commented Aug 29, 2016

Hello! Thanks for opening an issue with us! Since this was an issue with Ionic Native and not the Ionic framework I have moved this issue to that repo. Thanks for using Ionic!

@saurabhvyas
Copy link

I agree , Its not fixed .

var reader = new FileReader();
reader.onloadend = (evt: any) => { }

onloaded never gets fired

@pdrosos
Copy link

pdrosos commented Jan 18, 2017

@jgw96 it seems a fix is found for this one in danielsogl/awesome-cordova-plugins#505 (comment)
cordova.js must be loaded after polyfills.js in index.html

It will be best if this can be done in the Ionic starter projects, so it doesn't happen to other users, as it's very hard to debug and identify.

Thanks!

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 4, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants