Images cannot be fetched from CDN after upgrading to Expo SDK 31

We have been upgrading our application from version 27. We are doing it step by step towards version 32. So far we are stuck at trying to upgrade from SDK 30 to 31/32

We managed to fix all issues inside the application to run on both Expo SDK 31 and 32, but none of our images that are uploaded to the CDN during the build process are available in the application.

We have been using Charles to see what’s going on with the network traffic. It’s clear that the requested images cannot be fetched. Looking at our current production version (still at version 27), these requests are successful. Access Denied is the response you get when the file does not even exist.

https://d1wp6m56sqw74a.cloudfront.net/~assets/b0d2700786dc7e6f0b7504ccc23aa169
<Error>
	<Code>AccessDenied</Code>
	<Message>Access Denied</Message>
	<RequestId>6BE6C3CCDBA8098F</RequestId>
	<HostId>EAlLD5ZS1vT8+7j74el/+LS6GW1Mg/8dOWlpAZWhotFzUNld85F9oyaC0en9do/5M8orfF2QVJo=</HostId>
</Error>

The image files have not changed. During the build process the output mentions that no assets are uploaded. I don’t know if it should upload new assets for a different Expo SDK version. Is this expected?

Analyzing assets
Uploading assets
No assets to upload, skipped.

Our images are referenced in the code like this:

const genericIcons = {
	back: require('../assets/images/icons/back-arrow.png')
};

When we run it locally on a simulator or by scanning the QR code from the local build, it works fine, as it’s not loading the images from the CDN at that point.

We tried different minor versions from Expo 31 and 32, different react/react-native versions (tried 0.57.1 and 0.57.8 with the corresponding React version). So, our last working configuration is Expo 30.0.2, React 16.3.1 and React Native 0.55.4.

Does anyone have an idea whats causing this issue?

This issue has been solved by using the Expo (build) versions of react-native, rather than including react-native versions directly.

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