Assets not Uploaded on Publish SDK30

Using SDK 30. Noticed that Android assets were not being included in bundle with SDK 27, so upgraded to SDK 30 and created a fresh expo app. App functioned appropriately until it was published, where it began to have the same behavior as previously (no images loaded that weren’t included months ago). Appears that assets are not being included properly on publish, and have not been ever since the SDK 27 update. Now, neither iOS nor Android can find the appropriate assets.

I’m bundling with this pattern:

"assetBundlePatterns": [ "./assets/fonts/*", "./assets/img/*" ],

And I am prefetching in AppLoading with the pattern specified as such:

_loadResourcesAsync = async () => {
return Promise.all([
Asset.loadAsync([
require(“./assets/images/robot-dev.png”),
require(“./assets/images/robot-prod.png”)
]),
Font.loadAsync({
…Ionicons.font,
“space-mono”: require(“./assets/fonts/SpaceMono-Regular.ttf”)
})
]);
};

This prefetching starts to throw an error after publish when you try to include fonts. It cannot find the fonts files.

Any ideas, or other code you’d like to see?

Jordan

Hey @estesjl,

Sorry you’re experiencing this! Can you let me know what CLI you are using (exp or expo) and what version of said CLI?

Cheers,

Adam

Using the expo CLI at version 2.1.3

I’m wondering if this has something to do with the way I published. I originally published SDK 25 and when updating I found it easier to just create a fresh project. So I would publish the new project under the same name. In my publish build logs, the most recent build shown is many months ago, despite publishing regularly. Unsure if this has anything to do with it.

I just went on the website and deleted the project, thinking this may help to refresh the published project if I published again afterward. Now, if I open the Android version in the Expo app (not through building on Android Studio, I’m using ExpoKit) it shows the assets that were missing. However, I can no longer bundle an APK and am receiving this error in Android Studio:

“Project with path ‘:expo-core’ could not be found in project ‘:expo-react-native-adapter’.”

Gotcha gotcha. This post may be of help here: Can't update ExpoKit in ejected CRNA app - #7 by hlbmike Let me know if it doesn’t!

Seems that issue was in iOS, whereas this expo-core issue occurs in Android Studio:

“Project with path ‘:expo-core’ could not be found in project ‘:expo-react-native-adapter’.”

As far as iOS goes, when I build in Xcode I get the attached error. Clearly something wrong with how assets are published.

Update:

Android ExpoKit assets still failing to load after publish. If you go to the published Android project in my account, it shows the assets properly, but the main view in my app refuses to load. If I build in Android Studio, everything works except there are no assets and I get an AppLoading error:

AppLoading threw an unexpected error when loading:
c@/data/user/0/com.agi.android.augmentedreality/files/30.0.0/cached-bundle-experience-%40estesjl%2Fsatellite-ar-stable-654106070-30.0.0:18:1622

Second Update:

No solution found to this, but there is a workaround. If I recreate the project from scratch and set “enabled” to false under “updates” in app.json and delete the published project from expo as soon as it publishes, the assets load correctly. It is laborious, but it works. Clearly an issuer with publisher.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.