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

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

@bbreijer

Description

@bbreijer
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions