Please provide the following:
- SDK Version: 45
- Platforms: android, ios
- Add the appropriate “Tag” based on what Expo library you have a question on.
After I have upgraded my code to use expo sdk 45, any reference to Constants.manifest.extra is undefined. In my app.config.js file, I add variables from
.env file into to
extra key. And I reference them later in the program. This used to work perfectly in
Is this a regression or is the expected behaviour?
Thank you for your assistance.
Hey @seyaobey.dev, this should still work as before. Can you try reproducing this with a brand new SDK45 project?
I have tried with a brand new project. And it is working fine. What could be the reason it is not working in my upgraded project?
expo-constants is the latest version as of now
@adamjnav we also have this issue after upgrading from SDK 43 to SDK 44/45 where the manifest is not available locally. We use a custom app.config.js that contains quite a number of user defined properties in the Constants.manifest.extra.
In trying to figure out this issue, we’ve found quite a lot of ambiguous Github and Stack Overflow posts relating to managed workflow, EAS and Bare workflow. Some say to use Updates.manifest but then others say not to and the Constants.manifest now falls back to Updates if it’s not there.
What we found that after upgrading to SDK 44/45 is that we had no manifest locally in Expo. Instead (after digging deeper) we found it hiding in Constants.manifest2.extra.expoClient.extra. When we publish an app though EAS builds, the manifest is then available in the normal location.
We upgraded from using the Classic managed workflow to using managed EAS workflow, so perhaps that has something to do with it? Any ideas would be greatly appreciated for us also.
I’m not sure if this documentation is completely up to date, but there’s a discussion of
Constants.manifest2 etc. here:
As it says there:
The APIs below are not stable and are expected to change as we develop EAS Update.
They have some example code there that looks like this:
const API_URL =
Thanks @wodin for the quick reply. We’ve temporarily created a manifest wrapper which does something similar to what you’ve shown above. Hopefully the APIs stabilize and reflect the same contracts as they were previously, even if under the hood the implementation changes. It keeps things easy for the punters.
I’m not really sure what’s going on here. (I’m just an Expo user, like you.)
I have hardly played around with Constants.manifest etc.
But based on what Adam says above it seems it should work, and @seyaobey.dev confirmed that it works for them in a newly created app, so it seems that at least some of the time it does.
I’ve just had a random thought. Maybe somehow one of your Expo dependencies is not up to date.
expo doctor should, in theory, report it, but according to Brent it doesn’t currently report about transitive dependencies (if I remember correctly).
So maybe try deleting your yarn.lock/package-lock.json and reinstalling your dependencies. Then see if that makes a difference to this issue.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.