expo: Error: Failed to resize image: AppIcon20x20@3x.png. (Error: Input file contains unsupported image format)

Environment

Environment: OS: macOS 10.14.3 Node: 8.3.0 Yarn: 1.7.0 npm: 5.3.0 Watchman: 4.9.0 Xcode: Xcode 10.1 Build version 10B61 Android Studio: Not Found

Packages: (wanted => installed) expo: 31.0.6 => 31.0.6 react: 16.6.3 => 16.6.3 react-native: 0.57.8 => 0.57.8

Diagnostics report: https://exp-xde-diagnostics.s3.amazonaws.com/arikanmstf-1bdc4436-24ef-4641-b24b-cf28ea40c6f1.tar.gz

Steps to Reproduce

  1. Running expo build like this: API_ENV=live expo build:ios

Expected Behavior

Should build successfully

Actual Behavior

As an application icon, I am using one withuot alpha or transparent channels. app.json is like this:

{
  "expo": {
    "icon": "./static/img/icon-no-alpha.png",
    "sdkVersion": "31.0.0",
    "privacy": "unlisted",
    "platforms": ["ios"],
     ...
  }
}

image

Build was working correct with transparent png file, However with transparent png file, Xcode’s Application Loader fails with following error:

ERROR ITMS-90717: "Invalid App Store Icon. The App Store Icon in the asset catalog in 'ExpoKitApp.app' can't be transparent nor contain an alpha channel."

image

Reproducible Demo

Here can be found build with full log:

https://expo.io/builds/bf69c1c4-f2e2-486f-a984-4ff5d7d55d76

(Paste the link to an example project and exact instructions to reproduce the issue.)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 23 (6 by maintainers)

Most upvoted comments

I’ve also tried it with 2.11.6, 2.11.7 and 2.13.0 with the same result. Saved from Preview with no Alpha, and even tried Photoshop 8-bit, no transparency. Same result every time. Really need to get this published - any other ideas?

Looking for a work around as well. Everything worked fine a couple months ago. Made a quick code change and ran build:ios and I’m getting the same complaint about the icon as everyone else. The bundle pattern breaks it in different ways or doesn’t do anything.

Having the same issue. PNG has no transparency. Verified that in Photoshop. And yet I see the error

Your application icon can't have transparency if you wish to upload your app to Apple Store.

upon performing

expo build:ios

Is there a workaround for this?

SDK = 34.0.0 expo-cli = 3.0.8

@dsokal We’ve started experiencing this issue yesterday on CI. SDK32 https://forums.expo.io/t/error-failed-to-resize-image-appicon29x29-2x-png/23829

@arikanmstf I checked your build logs and it looks like it’s not a problem with the icon itself, but rather with that the icon is not uploaded to Expo servers 😃 Check it yourself - please open the build logs, expand reading manifest group and find iconUrl there. Try opening the url in the browser, you’ll get Access Denied error from S3 which means that there is no image you’re looking for. I think that in order to fix it, you need to make sure you have assetBundlePatterns key in your app.json:

{
  "expo": {
    ...,
    "assetBundlePatterns": [
      "**/*"
    ],
    ...,
  }
}

and then publish your app (or run expo build:ios). The error should go away.

@lebreRafael @evanheckert First of all, if you want to use Expo, you can’t change react-native version to a one chosen by you. You must use the version provided by Expo for each SDK release.

@lebreRafael Thanks for sharing what worked for you! I’ll give that a try, although I have two separate projects with the same issue. If you find anything else on this, I’d love to hear a reliable solution!

I have finish my build successfully but I don’t really know how. I’m running expo-cli 2.11.8 and the steps that I did are listed below:

  • Tried another 1024x1024 png file downloaded from google (still got error)
  • Start a new project with expo, change the icon to my png and tried to build (success)
  • Start to copy all configuration stuff from the new project to my project (package.json, app.json, babel.config.js) but obviously keeping particular things from my project such as name, version…
  • I was using react-native 0.57.1 and the new project was using an exotic version, so I needed to run yarn upgrade
  • After these two steps above I tried again to build (success)
  • After that I decided to delete my project and clone again to test if just changing the react-native version It works, but before that I tried to build immediately after clone and install dependencies to see the error again. But for the surprise the error has gone. It works without any changes now