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

CB-14197: (all) Fix for createFile/writeFile silently failing to send 'write' action #237

Merged
merged 1 commit into from Jul 20, 2018

Conversation

wfairclough
Copy link
Contributor

@wfairclough wfairclough commented Jul 9, 2018

FileWriter is missing the require('./FileReader') module causing the
native FileReader to be used instead of the FileReader proxy.

Oddly this does not happen everytime, but I could consistently
reproduce the issue when running subsequent cordova run android
commands on an Ionic app running in a 7.1.1 Android Emulator.

Platforms affected

All Platforms
Witnessed on Android

What does this PR do?

Adds a missing require statement to ensure the correct FileReader is used

What testing has been done on this change?

Since this issue was very difficult to reproduce it was pretty hard to test. We found
that this issue occurs most frequently when running our ionic app in the Android
emulator and then run ionic cordova run android multiple times to reinstall the app
before we consistently saw the issue. With the changes from this PR we stopped
seeing the issue entirely.

I believe this PR will also fix the issue reported on the ionic-native project:
danielsogl/awesome-cordova-plugins#2067

npm test passes

Checklist

  • Reported an issue in the JIRA database
  • Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
  • Added automated test coverage as appropriate for this change.

FileWriter is missing the require('./FileReader') module causing the
native FileReader to be used instead of the FileReader proxy.

Oddly this does not happen everytime, but I could consistently
reproduce the issue when running subsequent `cordova run android`
commands on an Ionic app running in a 7.1.1 Android Emulator.
@wfairclough
Copy link
Contributor Author

@stevengill Would you be able to review this PR for me?

@brodybits
Copy link

@stevengill Would you be able to review this PR for me?

You may want to ping dev@cordova.apache.org to get a review and a possible merge.

@macdonst macdonst merged commit 4a92bbb into apache:master Jul 20, 2018
@macdonst
Copy link
Member

Thanks for the PR @wfairclough, good catch.

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

Successfully merging this pull request may close these issues.

None yet

5 participants