icons not showing when publishing from command line

Please provide the following:

  1. SDK Version: 38.0.8
  2. Platforms(Android/iOS/web/all): Android/iOs

When I publish my expo project with either expo publish or expo publish --release-channel staging and then preview in the expo app, any icons do not show.

If I publish without a release channel using ‘Publish or republish your project to the internet’ from the Expo Dev Tools, with optimize assets turned on like this

Screenshot 2020-08-03 at 13.47.48

then I do see the icons.

I am using FontAwesome and preloading the icon fonts to ensure they are uploaded as documented here - https://docs.expo.io/workflow/publishing/

import { FontAwesome } from '@expo/vector-icons';

function cacheFonts(fonts) {
    return fonts.map(font => Font.loadAsync(font));
}

...

async _loadAssetsAsync() {
        const imageAssets = cacheImages([
            require('./assets/icon.png'),
        ]);

        const fontAssets = cacheFonts([FontAwesome.font]);

        await Promise.all([...imageAssets, ...fontAssets]);
    }

Hey @patricklock, I’m going to try and reproduce this. Curious, does this occur on Android as well or only on iOS?

Cheers,
Adam

Hi Adam, both Android and IOS on real devices.

Thanks
Patrick

Thanks for the response. Going to attempt to repro today. One more question since it seems you specified on real devices, is it not occurring on simulators/emulators?

Thanks. No it works fine on the IOS simulators/emulators

Hi Adam, did you have any luck reproducing? I’m going to try myself with a barebones app today to see if I get the same issue.

I have reproduced the error with a bare-minimum app. Steps to reproduce:

  1. expo init myproject (Choose a template: expo-template-bare-minimum)
  2. expo start
  3. paste this into App.js
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { Ionicons } from '@expo/vector-icons';

export default function App() {
  return (
    <View style={styles.container}>
      <Ionicons name="md-checkmark-circle" size={32} color="green" />
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

I see this in simulator

  1. expo publish --release-channel staging
  2. go to expo app in android phone and scan QR code

I see this on the device

  1. same result with ‘expo publish’
  2. publish from the expo dev tools like this (with optimise assets either on or off)

Screenshot 2020-08-05 at 15.03.44

  1. scan with same android device, and it works, I see this:

I too am having this same problem. Tried clearing npm cache, expo cache, expo client data. Seems there is an issue with publishing. Works great locally, only the published version has this issue.
Hoping for a solution soon… wish I could help contribute to the solution.

I am also having this issue, does someone have any solution for this? kindly share your views, thanks in advance!

I know also have the same problem even when publishing from expo dev tools, since I updated to expo-cli@3.24.0

Please can I escalate this issue. At the moment I cannot publish any apps with icons so expo is unusable to make any updates!

1 Like

Problem can be reproduced locally by turning on the “Production Mode” switch.

Actually this isn’t the case for me. Turning on Production mode has no effect. If I am using the simulator locally I can see the icons in any case. I only have the problem when I publish.

ALso I have done a publish for android with app-bundle and the icons show in this version on a real device

expo build:android --release-channel -t app-bundle staging-v1.0.1

is there something like this I need to do for IOS?

This seems to have solved the issue for me: https://github.com/expo/expo/issues/7792
TL;DR;
Delete the ios and android folders in the root of your project and republish.

Any proper solution???