expo: Error with expo-auth-session when migrating to SDK41 from SDK40
Summary
We are trying to migrate from SDK40 to the latest SDK41 but are now seeing this error when using expo-auth-session:
import * as AuthSession from 'expo-auth-session';
const result = await AuthSession.startAsync({authUrl, returnUrl: redirectUrl});
It is throwing this exception, which was working fine for us in SDK 40:
[TypeError: null is not an object (evaluating 'manifest.currentFullName')]
For context, we use auth0 to do our auth. This worked well for us prior to SDK41.
Our configuration and setup for expo-auth-session we had followed when we first installed it seem to still be correct according to the latest docs here: https://github.com/expo/expo/tree/master/packages/expo-auth-session
We are on a bare workflow.
Any tips or ideas of what might be happening?
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
41
Environment
Expo CLI 4.4.6 environment info: System: OS: macOS 10.15.7 Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.3.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: API Levels: 26, 28, 29, 30 Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2 IDEs: Android Studio: 4.0 AI-193.6911.18.40.6514223 Xcode: 12.4/12D4e - /usr/bin/xcodebuild npmPackages: expo: ^41.0.0 => 41.0.1 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 react-native-web: ~0.13.12 => 0.13.18 npmGlobalPackages: expo-cli: 4.4.6 Expo Workflow: bare
Reproducible demo or steps to reproduce from a blank project
import * as AuthSession from 'expo-auth-session';
const authUrl = 'https://ourauthzerohostedsite.com'
const redirectUrl = 'appName://login';
const result = await AuthSession.startAsync({authUrl, returnUrl: redirectUrl});
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 15 (7 by maintainers)
I saw an identical error message using an EAS built managed app and SDK 42. Similarly, running
expo config --type publicwould print the correct currentFullName and originalFullName.I was ultimately able to resolve the error by adding an explicit ‘currentFullName’ and ‘originalFullName’ to our app.json file.
Same for us with SDK 42. If we try to run the build it throws:
But the output of
expo config --type publicshows the missing parameters:If we add this two manually in our
app.config.tsthe error won’t show up and everything is working.This issue is not stale. See: https://github.com/expo/expo/issues/13513
Manually adding
currentFullNameandoriginalFullNameon app.json didn’t work for me.I downgraded
expo-auth-sessionpackage with"~1.4.0".Now not getting the error on real device(both on android and ios). But still getting the error only on iOS simulator. For me, that was the workaround. At least not showing the error on device. If I need to check the app during development I can still check on the android simulator.