ionic-team / ionic-team/cordova-plugin-ionic-webview
convertFileSrc producing output starting with 'undefined'
- Dominant language
- Objective-C
- Stars
- 493
- Forks
- 410
- PR merge metrics
- No merged PRs in 30d
Description
Environment info:
cordova-plugin-ionic-webview 3.1.2
ionic-angular 3.9.2
cordova-android 7.1.4
Running into a problem on Android where the following will intermittently produce either file URIs starting with "http://localhost" or "undefined"
```
let profileImage = this.win.Ionic.WebView.convertFileSrc( this.file.dataDirectory + profileImageFileName );
console.log("processing profileImage = " + profileImage);
```
Example output when it works:
`processing profileImage = http://localhost/_app_file_/data/user/0/com.company.app/files/724MjcgqPDur83ZAMyErlw==-image.jpg"
`
Example output when it fails:
`processing profileImage = undefined/_app_file_/data/user/0/com.company.app/files/724MjcgqPDur83ZAMyErlw==-image.jpg"`
This issue seems to happen intermittently on Android platform only. Possibly related to https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/193
The workaround in #193 does not solve my issue.
Any suggestions?
Contributor guide
Assessment
This issue has not been assessed yet.