Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Android: filenames with spaces lead to fetch error -4 #197

Closed
bbreijer opened this issue Aug 11, 2016 · 2 comments
Closed

Android: filenames with spaces lead to fetch error -4 #197

bbreijer opened this issue Aug 11, 2016 · 2 comments
Labels
Milestone

Comments

@bbreijer
Copy link
Contributor

Problem

If the filenames with a space in the name exists in the manifest, the download fails with an FileNotFound exception.

From Android monitor connected to the device failing the update:

08-11 06:39:51.830 15161-15540/app-class W/System.err: java.io.FileNotFoundException: <updateURL>/<file with space>
08-11 06:39:51.830 15161-15540/app-class W/System.err:     at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:242)
08-11 06:39:51.830 15161-15540/app-class W/System.err:     at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
08-11 06:39:51.830 15161-15540/app-class W/System.err:     at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
08-11 06:39:51.830 15161-15540/app-class W/System.err:     at com.nordnetab.chcp.main.network.FileDownloader.download(FileDownloader.java:76)
08-11 06:39:51.830 15161-15540/app-class W/System.err:     at com.nordnetab.chcp.main.network.FileDownloader.downloadFiles(FileDownloader.java:51)
08-11 06:39:51.830 15161-15540/app-class W/System.err:     at com.nordnetab.chcp.main.updater.UpdateLoaderWorker.downloadNewAndChangedFiles(UpdateLoaderWorker.java:221)
08-11 06:39:51.830 15161-15540/app-class W/System.err:     at com.nordnetab.chcp.main.updater.UpdateLoaderWorker.run(UpdateLoaderWorker.java:121)
08-11 06:39:51.830 15161-15540/app-class W/System.err:     at com.nordnetab.chcp.main.updater.UpdatesLoader$1.run(UpdatesLoader.java:58)
Steps to reproduce
  1. create an app including chcp
  2. add a file with a space to the server (and update je manifest)
  3. try to update on android
System info
  • Platform: Device: On Android 6.0.1, on an Samsung edge s7
  • Platform: Updates work file on iOS (tested on iPhone 6 with iOS 9.3.3).

Run cordova info (or ionic info) and paste it here, or give us information like:
iOS / Android

  • Platform: Device: On Android 6.0.1, on an Samsung edge s7
  • Platform: Updates work fine on iOS (tested on iPhone 6 with iOS 9.3.3).
  • Cordova version: 6.2.0
  • Node version: 5
@nikDemyankov
Copy link
Member

Fixed in v1.5.0.

@nikDemyankov
Copy link
Member

And thanks for the report :)

nickbecker added a commit to MobileAccord/cordova-hot-code-push that referenced this issue Aug 31, 2016
…push

* 'master' of https://github.com/nordnet/cordova-hot-code-push: (85 commits)
  Bugfix: Android app crash on absent contentUrl in a new content config
  Updated change log.
  Bump version.
  Files can now have spaces in their names on Android: nordnet#197
  Added getVersionInfo method to iOS.
  Fixed code comments.
  Renamed API method getInfo to getVersionInfo
  Added getInfo method for Android.
  Small refactoring after PR.
  Refactoring
  Speed up android initial assets copy
  Updated readme with issue temlplate link.
  Updated issue template.
  Create ISSUE_TEMPLATE.md
  Javascript method to get the name of the current version
  Bump version.
  Updated changelog for v1.4.0.
  Added info about changes in v1.4.0.
  iOS. Fetch update options object is now immutable.
  If needed - you can define fetch update options from the native side.
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants