expo: Manifest missing originalFullName in EAS Build Development Client
Summary
Manifest is missing originalFullName and currentFullName (and id) when using custom EAS Build Development client.
Managed or bare workflow? If you have made manual changes inside of the ios/ or android/ directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android, iOS
Package versions
Only native and expo packages listed:
{
"dependencies": {
"expo": "^42.0.0",
"expo-application": "~3.2.0",
"expo-asset": "~8.3.2",
"expo-auth-session": "~3.3.1",
"expo-camera": "~11.2.1",
"expo-constants": "~11.0.1",
"expo-dev-client": "^0.4.3",
"expo-device": "~3.3.0",
"expo-image-picker": "~10.2.2",
"expo-linear-gradient": "~9.2.0",
"expo-linking": "~2.3.1",
"expo-localization": "~10.2.0",
"expo-notifications": "~0.12.2",
"expo-random": "~11.2.0",
"expo-secure-store": "~10.2.0",
"expo-splash-screen": "~0.11.2",
"expo-standard-web-crypto": "^1.0.2",
"expo-status-bar": "~1.0.4",
"expo-updates": "~0.8.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
"react-native-gesture-handler": "~1.10.2",
"react-native-reanimated": "~2.2.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.4.0",
"react-native-svg": "12.1.1",
"sentry-expo": "^4.0.0",
}
}
Environment
Expo CLI 4.7.2 environment info:
System:
OS: Windows 10 10.0.19042
Binaries:
Node: 12.18.2 - ~\AppData\Local\Temp\yarn--1625626459530-0.2547605146813341\node.CMD
Yarn: 1.22.10 - ~\AppData\Local\Temp\yarn--1625626459530-0.2547605146813341\yarn.CMD
npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ^42.0.0 => 42.0.0
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
Expo Workflow: managed
Reproducible demo or steps to reproduce from a blank project
- Create new expo 42 project
- Create a development client:
{
"builds": {
"android": {
"debug": {
"workflow": "managed",
"buildType": "development-client",
"releaseChannel": "test.42.0",
"distribution": "internal"
}
}
}
}
- Try to create a redirect URI:
const useProxy = Platform.select({ web: false, default: true });
const redirectUri = AuthSession.makeRedirectUri({ useProxy });
- Start
expo start --dev-client - Install the dev client and connect
- It breaks
I went into node_modules\expo-auth-session\build\SessionUrlProvider.js and added console.log({ manifest }). I can see in the log that both originalFullName and currentFullName are missing.
expo config --type public
This correctly shows originalFullName and currentFullName.
Workaround
import Constants from 'expo-constants';
Constants.manifest.originalFullName = '@org/project';
Right before AuthSession.makeRedirectUri
Stacktrace (if a crash is involved)
SessionUrlProvider.js
Error: Cannot use AuthSession proxy because the project ID is not defined. Please ensure you have the latest version of expo-constants installed and rebuild your native app. You can verify that currentFullName is defined by running
expo config --type publicand inspecting the output.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 10
- Comments: 28 (4 by maintainers)
It’s not resolved.
Yes but I do have this issue using
eas! By the way, I’m not trying to use the same variables as you, I try to fetch aextra.apiEndpointcustom var we defined.Indeed, you don’t have value hardcoded on your code. However, what a complex custom logic just for a not provided manifest property. 😕
I think I’ll just be careful of doing a
eas upatecommand just after theeas buildto be sure the app load the configuration correctly until I do the upgrade to SDK 46.Thanks for the help! 👍
@isaachinman as I expected, expo-updates (the package) is staying, but the service (free OTA pushes) is going away. The newer (and supposedly better) EAS Update doesn’t expo
manifestanymore (by its RFC–based spec/design).This is what I’ve started doing:
Then, edit your
babel.config.jsNext, create
app.config.ts, and fill it in:…and create the corresponding .env file:
…and finally create a new file
src/config.tsIt’s not perfect because technically expo could have a different experience ID under the hood, but overall this method works with everything else you need from the manifest, and also shows how you can replace the old
"extra"key things.How does this work?
dotenv/configinapp.config.tsmakes sureprocess.envis filled with the local.envfile (no-op if there is none). This is necessary during local development, or build steps.transform-inline-environment-variablessearches forprocess.env.SOME_KEYand replaces it with the actual value ofSOME_KEYduring that process. That means that in your build output, the files no longer have anyprocess.envreference.config.tsfile will be downloaded (with actual values, notprocess.envreferences).@brentvatne
Is there any official documentation on this subject?
It seems the absence of
manifestessentially breaks several/many expo packages when upgrading from 45 to 46-dev-client, and I cannot find any official guidance.Is the workaround listed above seriously what’s still needed, over a year later?
After an upgrade to
eas updateand Expo v46, I’m back to theoriginalFullNameissue, following https://github.com/expo/expo/issues/13513#issuecomment-1146881040.The variable to use is now
Constants.expoConfig.originalFullName, stop me if I am wrong.This variable:
eas buildoutputeas updateoutput usage with Expo GoThis variable is supposed to be auto-generated in any circumstance, am I right? Without that value, I have no way to provide a unique id to my notifications service, meaning no way to test notifications locally.
The only workaround I found looks like the original one posted by @SleeplessByte:
However, I am not supposed to do that. I am missing something or are we facing an Expo bug here?
@isaachinman and @soullivaneuh From what I’ve read, either from the Expo docs (on the EAS debugging/troubleshooting something guide) or from Kim on their Discord (link), the way to do things from Expo SDK 46 and onwards, is to use
Constants.expoConfiginstead ofConstants.manifestsince that will be null after an update. Here’s the Typescript interface for whomever needs it.Edit:
Constants.expoConfigwill handle resolving itself regardless of whether you’re using EAS updates or the classic updates service.Thanks for raising! While we work to make this smoother I’d recommend using the native option rather than setting originalFullName yourself.
https://docs.expo.io/versions/latest/sdk/auth-session/#authsessionmakeredirecturi https://docs.expo.io/versions/latest/sdk/auth-session/#authsessionredirecturioptions