Closed Bug 982814 Opened 11 years ago Closed 11 years ago

MessageMe app uses default/generic Android icon

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P1)

ARM
Android
defect

Tracking

(firefox29 affected, firefox30 affected)

VERIFIED FIXED
Tracking Status
firefox29 --- affected
firefox30 --- affected

People

(Reporter: krupa.mozbugs, Assigned: myk)

References

Details

Attachments

(2 files)

Attached image apps missing icons
Android 4.0.3/Samsung device Aurora29.0a2 (02/12) steps to reproduce: 1. Load marketplace on aurora in your android device 2. Install an app 3. Verify the app using Package Installer. 4. Go to Home to see the installed app Expected behavior: App icons are listed for the installed apps Actual behavior. App icons are missing. I see the generic android icon. See screenshot.
Which device? Was this using the current default APK Factory URL or production?
Severity: normal → blocker
OS: Mac OS X → Android
Priority: -- → P1
Hardware: x86 → ARM
I'll push an older version of Android to my Nexus tomorrow morning and see if I can reproduce this problem there.
Assignee: nobody → myk
Status: NEW → ASSIGNED
I was seeing this behavior with the production APK factory URL. I'll see if I can reproduce this on my Nexus which has Android 4.4.
The bug is also reproducible on Asus Transformer Tab (Android 4.0.3) using the latest nightly and aurora builds.
Please let us make sure we are using a common manifest from an application for testing here and a common APK Factory URL for investigation here when providing details in comment: * Aurora (03/13) is currently using: http://dapk.net/application.apk * Nightly (03/13) is currently using: https://controller.apk.firefox.com/application.apk On my Samsung Galaxy S4 (Android 4.4.2) with an assortment of front-page Marketplace applications: With Aurora, Installing MessageMe, SoundCloud and Youzeek, Pacman, Cupcakes vs Vegies * MessageMe (no icon, default Android placeholder used) * SoundCloud (proper icon is shown) * YouZeek (proper icon is shown) * Pacman (proper icon is shown) * Cupcakes vs Veggies (proper icon is shown) With Nightly Installing MessageMe, SoundCloud and Youzeek, Pacman, Cupcakes vs Veggies * MessageMe (no icon, default Android placeholder used) * SoundCloud (proper icon is shown) * YouZeek (proper icon is shown) * Pacman (proper icon is shown) * Cupcakes vs Vegies (proper icon is shown) In my testing here, on my personal device, I am only running into one app of a sampling of five where no icon is shown. Now analyzing the APK, I do see that no application icon is bundled, it is using the default platform resource $ ./aapt d badging application.apk package: name='com.messageme.chat.p50806838af32cef5b7fde86740d11594' versionCode='1394215728' versionName='1.0' application-label:'MessageMe' application-icon-120:'res/drawable-ldpi/ic_launcher.png' application-icon-160:'res/drawable-mdpi/ic_launcher.png' application-icon-240:'res/drawable-hdpi/ic_launcher.png' application-icon-320:'res/drawable-xhdpi/ic_launcher.png' application-icon-480:'res/drawable-480dpi/ic_launcher.png' application: label='MessageMe' icon='res/drawable-mdpi/ic_launcher.png' launchable-activity: name='org.mozilla.android.synthapk.LauncherActivity' label='MessageMe' icon='' Viewing the manifest (http://chat.messageme.com/manifest.webapp): "icons": { "16": "/favicon-16.png", "32": "/favicon-32.png", "48": "/favicon-48.png", "60": "/favicon-60.png", "90": "/favicon-90.png", "120": "/favicon-120.png", "128": "/favicon-128.png", "256": "/favicon-256.png" } Vs a working manifest (at least for me) http://soundcloud.com/manifest.webapp -- I'm puzzled at this point
(In reply to Aaron Train [:aaronmt] from comment #6) > Vs a working manifest (at least for me) > http://soundcloud.com/manifest.webapp -- I'm puzzled at this point Hmm, I'm puzzled too. If all apps are missing icons, which is what the original bug description suggests, then this sounds like a bug in the client. But if only certain apps are missing icons, and their APKs are also missing those icons, then it sounds like a bug in the service. (In reply to krupa raj[:krupa] from comment #4) > I was seeing this behavior with the production APK factory URL. I'll see if > I can reproduce this on my Nexus which has Android 4.4. I would also be interested to hear about your experience retesting on the original device but using the production service!
I just tested with today's Nightly build on a Galaxy Nexus with Android 4.0.4, and I wasn't able to reproduce the problem. I haven't found an Android 4.0.3 build for my device, and it seems unlikely that it would make a difference anyway, but I did find an Android 4.0.2 build, so I'll try testing with that next. I'll also try testing with an Aurora build in case that matters.
Ok, I tested with Android 4.0.2 (build number ICS53F) on my Galaxy Nexus, and I tested with both Nightly (30.0a1 2014-03-14) the latest Aurora nightly build (29.0a2 2014-03-14), and with the apps Pacman Canvas (Beta), Pasjans/Solitaire, and Jelly Collapse. I still can't reproduce the problem. The latest Aurora and Nightly builds use the production APK Factory server, which may be running a newer version of the service. So perhaps this was a bug in the service that has since been fixed. Krupa & Flaviu: can you retest with the latest builds (and double-check the value of the browser.webapps.apkFactoryUrl preference to make sure it points to https://controller.apk.firefox.com/application.apk)? If you can still reproduce the problem, then perhaps I can borrow Krupa's test device to debug further.
Flags: needinfo?(krupa.mozbugs)
Flags: needinfo?(flaviu.cos)
I borrowed two test devices from Krupa, both of which show the problem with MessageMe, and one of which shows the problem with all other apps. Then I confirmed that they're unrelated to the Firefox build version/date and apkFactoryUrl setting. So I downloaded and unpackaged the MessageMe and Pacman APKs in order to analyze them: > wget https://controller.apk.firefox.com/application.apk?manifestUrl=http%3A%2F%2Fchat.messageme.com%2Fmanifest.webapp -O messageme.apk > wget https://controller.apk.firefox.com/application.apk?manifestUrl=http%3A%2F%2Fpacman.platzh1rsch.ch%2Fpacman-canvas.webapp -O pacman-canvas.apk > apktool decode messageme.apk messageme > apktool decode pacman-canvas.apk pacman-canvas MessageMe's APK includes five images: > ll messageme/res/drawable* -rw-r--r-- 1 myk 501 26712 Mar 14 11:34 messageme/res/drawable-hdpi/ic_launcher.png -rw-r--r-- 1 myk 501 5696 Mar 14 11:34 messageme/res/drawable-ldpi/ic_launcher.png -rw-r--r-- 1 myk 501 9827 Mar 14 11:34 messageme/res/drawable-mdpi/ic_launcher.png -rw-r--r-- 1 myk 501 26712 Mar 14 11:34 messageme/res/drawable-xhdpi/ic_launcher.png -rw-r--r-- 1 myk 501 103894 Mar 14 11:34 messageme/res/drawable-xxhdpi/ic_launcher.png Pacman has three: > ll pacman-canvas/res/drawable*/*.png -rw-r--r--@ 1 myk 501 9193 Mar 14 11:34 pacman-canvas/res/drawable-hdpi/ic_launcher.png -rw-r--r--@ 1 myk 501 5057 Mar 14 11:34 pacman-canvas/res/drawable-mdpi/ic_launcher.png -rw-r--r--@ 1 myk 501 4160 Mar 14 11:34 pacman-canvas/res/drawable-xhdpi/ic_launcher.png But MessageMe's images are all corrupt: > file messageme/res/drawable*/*.png messageme/res/drawable-hdpi/ic_launcher.png: gzip compressed data, from Unix messageme/res/drawable-ldpi/ic_launcher.png: gzip compressed data, from Unix messageme/res/drawable-mdpi/ic_launcher.png: gzip compressed data, from Unix messageme/res/drawable-xhdpi/ic_launcher.png: gzip compressed data, from Unix messageme/res/drawable-xxhdpi/ic_launcher.png: gzip compressed data, from Unix > open messageme/res/drawable*/*.png (in Preview) The file "ic_launcher.png" could not be opened. It may be damaged or use a file format that Preview doesn't recognize." Pacman's, on the other hand, are valid images: > file pacman-canvas/res/drawable*/*.png pacman-canvas/res/drawable-hdpi/ic_launcher.png: PNG image data, 72 x 72, 8-bit/color RGBA, non-interlaced pacman-canvas/res/drawable-mdpi/ic_launcher.png: PNG image data, 48 x 48, 8-bit/color RGBA, non-interlaced pacman-canvas/res/drawable-xhdpi/ic_launcher.png: PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced But only the largest one is the Pacman app icon when I open it in Preview. The other two are default/generic Android icons. So it looks like there are two distinct issues here, both of which are in the APK Factory (or, for the first one, possibly in the MessageMe app). First, the MessageMe images are corrupt. Second, apps without smaller icons use a generic one, which causes them to have a generic icon on devices that use smaller icons by default (like Krupa's lower-resolution test device, but *unlike* my higher-resolution Galaxy Nexus or Krupa's other test device, which is why I was unable to reproduce the issue on them). Regarding the first issue, we need to investigate further to figure out where the corruption is taking place. Regarding the second issue, I'm not sure what the right solution is, but perhaps we should be scaling whatever app icon the app provides to the various resolutions we want to support if the app doesn't provide icons for those resolutions.
One of the issues is corruption in lib/file_loader.js request(srcFile).pipe(fs.createWriteStream(destFile)); Where srcFile would be http://chat.messageme.com/favicon-32.png and destFile would be /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res/drawable-ldpi/ic_launcher.png This file that is written * md5 matches me wget http://chat.messageme.com/favicon-32.png * Says it's corrupt in Fx and Preview 5e416a1dcb655ea53dca92978a5295da favicon-32.png 5e416a1dcb655ea53dca92978a5295da /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res/drawable-ldpi/ic_launcher.png ozten@badger:~/apk-factory-service$ file favicon-32.png /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res/drawable-ldpi/ic_launcher.png favicon-32.png: gzip compressed data, from Unix /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res/drawable-ldpi/ic_launcher.png: gzip compressed data, from Unix
Note: we don't actually need to generate icons for all resolutions. We need only supply XHDPI and HDPI assets and the system will scale down as needed. The downside of this is that there is extra CPU overhead required, although not a lot (converting from xhdpi [96x96] to ldpi [36x36] is hardly capable of taxing even the most basic android device).
Another source of errors is in the ant release "crunch" target -crunch: [crunch] Crunching PNG Files in source dir: /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res [crunch] To destination dir: /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/bin/res [crunch] Processing image to cache: /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res/drawable-480dpi/ic_launcher.png => /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/bin/res/drawable-480dpi/ic_launcher.png [crunch] Processing image to cache: /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res/drawable-hdpi/ic_launcher.png => /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/bin/res/drawable-hdpi/ic_launcher.png [crunch] Processing image to cache: /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res/drawable-ldpi/ic_launcher.png => /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/bin/res/drawable-ldpi/ic_launcher.png [crunch] Processing image to cache: /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res/drawable-mdpi/ic_launcher.png => /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/bin/res/drawable-mdpi/ic_launcher.png [crunch] Processing image to cache: /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/res/drawable-xhdpi/ic_launcher.png => /tmp/android-projects/com.messageme.chat.p50806838af32cef5b7fde86740d11594/bin/res/drawable-xhdpi/ic_launcher.png [crunch] Crunched 5 PNG files to update cache [crunch] libpng error: Read Error [crunch] libpng error: Read Error [crunch] libpng error: Read Error [crunch] libpng error: Read Error [crunch] libpng error: Read Error Digging deeper, I see some 0 byte .png files. Investigating if this is an async callback timing issue.
Blocks: 984028
I can reproduce the root cause will stepping through the app. This was a async code and timing issue. Fixed in 4d45a9, deploying fix to Dev (https://apk-controller.dev.mozaws.net) Filed Bug#984028 to capture default Android Icon issue. https://github.com/mozilla/apk-factory-service/commit/4d45a91a8a7d7437e309c5b75cfbc30310661a3d
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
The bug is still reproducible on the latest nightly (2014-03-17). browser.webapps.apkFactoryUrl points to https://controller.apk.firefox.com/application.apk Installed the following webapps: - Pacman Canvas (Beta) -> android icon; - Twitter -> android icon; - Youzeek -> android icon; - SoundCloud -> correct SoundCloud icon; - MessageMe -> android icon; - PenguinPop -> android icon; - Wikipedia -> android icon; Tested on Lenovo Yoga Tab 10 (Android 4.2.2).
Flags: needinfo?(flaviu.cos)
Re comment #15 ... what's the deal here?
Flags: needinfo?(ozten.bugs)
(In reply to Aaron Train [:aaronmt] from comment #16) > Re comment #15 ... what's the deal here? Per comment 14, ozten fixed the first issue I described in comment 10 and filed bug 984028 on the second issue. And the issue that flaviu is still seeing is the second one. Let use bug 984028 to track the second issue and focus this bug on the first issue, which was corruption of the icons in the MessageMe app. Updating the bug summary accordingly.
Flags: needinfo?(ozten.bugs)
Flags: needinfo?(krupa.mozbugs)
Summary: Some apps (APKs) under Applications are missing their icons → MessageMe app uses default/generic Android icon
Note that the MessageMe APK available from the production server still contains corrupt images. But ozten committed the fix in https://github.com/mozilla/apk-factory-service/commit/4d45a9, so I think it's accurate to resolve this bug "fixed"; although it would be nice if there were a way to identify bugs whose fixes have been pushed to production, so y'all'd know which ones you can verify!
This will be deployed to stage in Bug#984451
Depends on: 984451
with the apk factory set to https://apk-controller.stage.mozaws.net/application.apk, i now see the MessageMe app during download.
Status: RESOLVED → VERIFIED
This is not fixed or has regressed. Opening a new bug.
See bug 997783 where there is a failure to retrieve icon, a java.lang.NullPointerException android.app.ApplicationPackageManager.putCachedIcon(ApplicationPackageManager.java:865)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: