[12.6.0] Authentication with Apple Developer Portal failed - "The first argument must be..."
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 236
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 98
Description
### Build/Submit details page URL
_No response_
### Summary
Running any `eas` command requiring Apple login, e.g. `eas credentials` lets me go as far as entering my password, then it fails.
### Managed or bare?
Both
### Environment
expo-env-info 1.2.0 environment info:
System:
OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
Yarn: 1.22.22 - /mnt/c/Program Files/nodejs/yarn
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
npmPackages:
expo: ^51.0.0 => 51.0.12
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.74.2 => 0.74.2
react-native-web: ~0.19.10 => 0.19.12
npmGlobalPackages:
eas-cli: 12.6.0
Expo Workflow: bare
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✖ Check for app config fields that may not be synced in a non-CNG project
✔ Check if the project meets version requirements for submission to app stores
✔ Check for issues with Metro config
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✖ Check that packages match versions required by installed Expo SDK
✖ Check that native modules use compatible support package versions for installed Expo SDK
Detailed check results:
Expected package @expo/metro-config@~0.18.11
Found invalid:
@expo/metro-config@0.18.5
(for more info, run: npm why @expo/metro-config)
Advice: Upgrade dependencies that are using the invalid package versions.
This project contains native project folders but also has native configuration properties in app.config.ts, indicating it is configured to use Prebuild. When the android/ios folders are present, EAS Build will not sync the following properties: orientation, icon, userInterfaceStyle, scheme, splash, ios, android, plugins, updates.
Advice: Add '/android' and '/ios' to your .easignore file if you intend to use CNG / Prebuild. Learn more: https://docs.expo.dev/workflow/prebuild/#usage-with-eas-build
The following packages should be updated for best compatibility with the installed expo version:
@sentry/react-native@5.22.3 - expected version: ~5.24.3
expo@51.0.12 - expected version: ~51.0.38
expo-dev-client@4.0.16 - expected version: ~4.0.28
expo-notifications@0.28.8 - expected version: ~0.28.19
expo-splash-screen@0.27.5 - expected version: ~0.27.6
expo-updates@0.25.16 - expected version: ~0.25.27
react-native@0.74.2 - expected version: 0.74.5
expo-build-properties@0.12.3 - expected version: ~0.12.5
expo-asset@10.0.8 - expected version: ~10.0.10
Your project may not work correctly until you install the expected versions of the packages.
Found outdated dependencies
Advice: Use 'npx expo install --check' to review and upgrade your dependencies.
One or more checks failed, indicating possible issues with the project.
### Error output
```
✖ Logging in...
Authentication with Apple Developer Portal failed!
The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at Function.from (node:buffer:320:9)
at u (/root/.nvm/versions/node/v20.18.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:739706)
at async Object.calculateProof (/root/.nvm/versions/node/v20.18.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:738871)
at async /root/.nvm/versions/node/v20.18.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:729981
at async k (/root/.nvm/versions/node/v20.18.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:728655)
at async Object.w [as loginWithUserCredentialsAsync] (/root/.nvm/versions/node/v20.18.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:728224)
at async loginWithUserCredentialsAsync (/root/.nvm/versions/node/v20.18.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/authenticate.js:84:24)
at async loginAsync (/root/.nvm/versions/node/v20.18.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/authenticate.js:56:16)
at async authenticateAsUserAsync (/root/.nvm/versions/node/v20.18.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/authenticate.js:129:27)
at async authenticateAsync (/root/.nvm/versions/node/v20.18.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/authenticate.js:101:16) {
code: 'ERR_INVALID_ARG_TYPE'
}
Error: credentials command failed.
```
### Reproducible demo or steps to reproduce from a blank project
1. `npx create-expo-app@latest StickerSmash`
2. Set up a baseline `eas.json`
3. Follow the CLI instructions
Things of note:
- OS: Ubuntu (not macOS). Also tried running `eas credentials` on Windows to no avail.
- Apple Developer Account: Part of an organization, not an individual. My account logs in using OAuth (SAML), not directly through Apple.
- Did this work before? ~Probably not, it's the first time I'm trying~ Actually, I recall it worked once before (on Ubuntu) with another account that I was able to use just to verify that the flows worked. This implies to me that the difference between the way our Apple Developer Accounts are configured could be a key factor.
- I followed the stack trace until `authenticate.js` turns to `@expo/apple-utils` which appears to be closed source so I can't follow it and understand further.
Contributor guide
Assessment
This issue has not been assessed yet.