jmarshall-com opened a new issue #1339:
URL: https://github.com/apache/cordova-android/issues/1339
# Bug Report
## Problem
After upgrading to cordova-android 10.1.0, plus all plugins, all images
display as broken.
### What is expected to happen?
The images should display normally, as they did before the upgrades.
### What does actually happen?
Broken image icons appear where the images should.
## Information
Images in the app were working before upgrades. The test case below is
simply a small HTML file with two `<img>` tags, no JS or CSS other than
`cordova.js`. One tag points to an image under `cordova.file.dataDirectory`,
and the other points to an image under `cordova.file.applicationDirectory` .
The files both exist, and I can view the first image from Android Studio's
"Device File Explorer" (for the second, I can't find `android_asset/` under
that tool).
To rule out Content-Security-Policy problems, I set that to "`default-src
*`".
This may be related to issue # , the issue previous to this one.
### Command or Code
```
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src *">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="initial-scale=1, width=device-width,
viewport-fit=cover">
<script type="text/javascript" src="cordova.js"></script>
</head>
<body>
<img
src="file:///data/user/0/com.jmarshall.myapp/files/users/e11cd3329b590a5f945797b66ab46d06848a914ffaf82658b572fc63cebd3647/img/b678f0a2daee1526e6ef7f7ba753a4eeec55eb5ba51a63699926709bc72d3c1b">
<img
src="file:///android_asset/www/skel/themes/default/img/home_bg.jpg">
</body>
</html>
```
### Environment, Platform, Device
This is running on Linux (OpenSuSE Leap 15.1), using the Pixel 2 XL
emulator, with either SDK 29 or SDK 30.
### Version information
Cordova CLI: 10.0.0
output of `cordova plugin ls`:
```
cordova-clipboard 1.3.0 "Clipboard"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-android-permissions 1.1.2 "Permissions"
cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter"
cordova-plugin-autostart 2.3.0 "Autostart"
cordova-plugin-background-mode 0.7.3 "BackgroundMode"
cordova-plugin-camera 6.0.0 "Camera"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-fetch 0.1.0 "Cordova Fetch"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-photo-library 2.2.1 "Photo Library"
cordova-plugin-save-to-camera-roll 1.0.2 "Save to camera roll"
cordova-sqlcipher-adapter 0.4.0 "Cordova sqlcipher adapter"
cordova-sqlite-storage 6.0.0 "Cordova SQLite storage plugin -
cordova-sqlite-storage plugin version"
```
Note that I'm using AndroidX, which I need for one of the plugins.
output of `cordova platform ls`:
```
6.0.0
Installed platforms:
android 10.1.0
browser
ios 6.1.1
Available platforms:
browser ^6.0.0
electron ^1.0.0
```
Running all on Linux OpenSuSE Leap 15.1
Pixel 2 XL emulator running Android 11 (tested with both SDK 29 and SDK 30)
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [ x] I searched for existing GitHub issues
- [ x] I updated all Cordova tooling to most recent version
- [ x] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]