Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still having Apple Authentication error #2764

Open
alleyhector opened this issue Dec 11, 2024 · 10 comments
Open

Still having Apple Authentication error #2764

alleyhector opened this issue Dec 11, 2024 · 10 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@alleyhector
Copy link

Build/Submit details page URL

https://expo.dev/accounts/alleyhector1981/projects/astrosnax

Summary

I'm still receiving the same authentication error from closed issue #2698 indicating that Apple cannot send verification to my phone number. I don't have an Apple device to use that workaround.

Authentication with Apple Developer Portal failed!
Received an internal server error from Apple's App Store Connect / Developer Portal servers, please try again later. Apple service errors:
- Verification codes can’t be sent to this phone number at this time. Please try again later.
If you encounter persistent issues with Apple 2FA SMS authentication, you can try using these workarounds: https://expo.fyi/apple-2fa-sms-issues-workaround.md.
    Error: build command failed.

Managed or bare?

Managed

Environment

Enabled experimental React Native Directory checks. Unset the EXPO_DOCTOR_ENABLE_DIRECTORY_CHECK environment variable to disable this check.
✔ Check package.json for common issues
✔ Check Expo config for common issues
✔ Check native tooling versions
✔ Check if the project meets version requirements for submission to app stores
✔ Check for common project setup issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for app config fields that may not be synced in a non-CNG project
✔ Check for issues with Metro config
✔ Check npm/ yarn versions
✖ Validate packages against React Native Directory package metadata
✔ 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:

The following issues were found when validating your dependencies against React Native Directory:
No metadata available: @apollo/client, graphql, react-native-fit-image
Advice:

  • Update React Native Directory to include metadata for unknown packages. Alternatively, set expo.doctor.reactNativeDirectoryCheck.listUnknownPackages in package.json to false to skip warnings about packages with no metadata, if the warning is not relevant.

Error output

h [Error]: Received an internal server error from Apple's App Store Connect / Developer Portal servers, please try again later. Apple service errors:
- Verification codes can’t be sent to this phone number at this time. Please try again later.
If you encounter persistent issues with Apple 2FA SMS authentication, you can try using these workarounds: https://expo.fyi/apple-2fa-sms-issues-workaround.md.
    at t.getAppleResponseError (/Users/alleyhector/.npm-global/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:857201)
    at block (/Users/alleyhector/.npm-global/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:865249)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async O (/Users/alleyhector/.npm-global/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:865761)
    at async I (/Users/alleyhector/.npm-global/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:864614)
    at async t.requestAsync (/Users/alleyhector/.npm-global/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:863150)
    at async t.idmsaRequestAsync (/Users/alleyhector/.npm-global/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:736419)
    at async t.requestAuthAsync (/Users/alleyhector/.npm-global/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:751216)
    at async t.handleTwoFactorAuthentication (/Users/alleyhector/.npm-global/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:745676)
    at async Object.w [as loginWithUserCredentialsAsync] (/Users/alleyhector/.npm-global/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:728315) {
  response: {
    status: 500,
    statusText: '',
    headers: {
      server: 'Apple',
      date: 'Wed, 11 Dec 2024 20:27:56 GMT',
      'content-type': 'application/json;charset=UTF-8',
      'transfer-encoding': 'chunked',
      connection: 'keep-alive',
      'x-apple-i-request-id': '67a13960-b7fe-11ef-a222-a1c1c4d4a179',
      'x-frame-options': 'ALLOW-FROM https://itunesconnect.apple.com',
      'x-content-type-options': 'nosniff',
      'x-xss-protection': '1; mode=block',
      'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
      'content-security-policy': "default-src 'self' ; child-src blob: ; connect-src 'self' https://www.apple.com https://appleid.cdn-apple.com https://webcourier.sandbox.push.apple.com https://xp-qa.apple.com ; font-src 'self' https://www.apple.com https://appleid.cdn-apple.com https://idmsa.apple.com https://gsa.apple.com https://idmsa.apple.com.cn https://signin.apple.com ; frame-src 'self' https://appleid.apple.com https://gsa.apple.com https://account.apple.com ; img-src 'self' https://www.apple.com https://appleid.cdn-apple.com https://*.mzstatic.com data: https://*.apple.com ; media-src data: ; object-src 'none' ; script-src 'self' https://www.apple.com https://appleid.cdn-apple.com https://idmsa.apple.com https://gsa.apple.com https://idmsa.apple.com.cn https://signin.apple.com ; style-src 'unsafe-inline' 'self' https://www.apple.com https://appleid.cdn-apple.com https://idmsa.apple.com https://gsa.apple.com https://idmsa.apple.com.cn https://signin.apple.com ;  frame-ancestors 'self' https://itunesconnect.apple.com;",
      'referrer-policy': 'origin',
      'x-buildversion': 'R3',
      scnt: 'AAAA-jRDQ0ZBQThCMjAwQUI5RTQzODFFRDY2RDk5REI2ODFBNjA5RjM1OTNGNjM3QzQwQjMyMEJENTA5RTRGMTMyMzdDNThFOEQyNDExQ0E5MDM3MkM0RkRBMTE2REI0MDQ3MzM2ODUxMkExQzk5QjMyMUJDRTcwOTcxMEFBRUFERUEwMjBENjIzMzAzQTNBREVBOTc2N0VCNDlDOEU3N0E1QzJCNkJGMEE5MTE5QTNBOERCQzQ5NkE3MzNCNDY3MjUxNkY1OUVCNjMyRDAxQ0IyQTQ5NzRENEIyRkY5QzBCRjBEN0MyNzlDNDcxODNEQjA4RXwzAAABk7d14IjU6moq9eX3pgDxf0yBQfdpEhbUjTkO8bwSXGNWjaG0-sqfgaUZFvnxABU0CfzqVmRHSeHH-LG_cSd06AHnyEe-G61Bm88gaCnJVdW_GpFVzw',
      'set-cookie': [Array],
      pragma: 'no-cache',
      expires: 'Thu, 01 Jan 1970 00:00:00 GMT',
      'cache-control': 'no-cache, no-store, no-store',
      'x-apple-ak-auth-type': 'hsa2',
      'x-apple-id-session-id': '4CCFAA8B200AB9E4381ED66D99DB681A609F3593F637C40B320BD509E4F13237C58E8D2411CA90372C4FDA116DB40473368512A1C99B321BCE709710AAEADEA020D623303A3ADEA9767EB49C8E77A5C2B6BF0A9119A3A8DBC496A733B4672516F59EB632D01CB2A4974D4B2FF9C0BF0D7C279C47183DB08E',
      'x-apple-auth-attributes': 'QaepT85Dc/9FaC4+CkgAFTQKJ679UA==',
      'x-apple-id-account-country': 'USA',
      vary: 'accept-encoding',
      'content-language': 'en-US-x-lvariant-USA'
    },
    config: {
      url: 'https://idmsa.apple.com/appleauth/auth',
      method: 'get',
      headers: [Object],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 0,
      withCredentials: true,
      adapter: [Function (anonymous)],
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      jar: [M],
      maxRedirects: 0,
      data: undefined,
      baseURL: 'https://idmsa.apple.com/',
      validateStatus: [Function: validateStatus]
    },
    request: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: true,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: true,
      _header: 'GET /appleauth/auth HTTP/1.1\r\n' +
        'Accept: application/json\r\n' +
        'scnt: AAAA-jRDQ0ZBQThCMjAwQUI5RTQzODFFRDY2RDk5REI2ODFBNjA5RjM1OTNGNjM3QzQwQjMyMEJENTA5RTRGMTMyMzdDNThFOEQyNDExQ0E5MDM3MkM0RkRBMTE2REI0MDQ3MzM2ODUxMkExQzk5QjMyMUJDRTcwOTcxMEFBRUFERUEwMjBENjIzMzAzQTNBREVBOTc2N0VCNDlDOEU3N0E1QzJCNkJGMEE5MTE5QTNBOERCQzQ5NkE3MzNCNDY3MjUxNkY1OUVCNjMyRDAxQ0IyQTQ5NzRENEIyRkY5QzBCRjBEN0MyNzlDNDcxODNEQjA4RXwyAAABk7d13wMag-_MDJ9TErllr0QRoJAEOLQMCt9y8JpwOGYzFGuSzVZ3ERwCoGD-ABU0CeW6MX8p4DjgcNFGflhWqWG_d9eQt9Q_Elhvtim9rRSYzPjTYg\r\n' +
        'X-Apple-Id-Session-Id: 4CCFAA8B200AB9E4381ED66D99DB681A609F3593F637C40B320BD509E4F13237C58E8D2411CA90372C4FDA116DB40473368512A1C99B321BCE709710AAEADEA020D623303A3ADEA9767EB49C8E77A5C2B6BF0A9119A3A8DBC496A733B4672516F59EB632D01CB2A4974D4B2FF9C0BF0D7C279C47183DB08E\r\n' +
        'X-Apple-Widget-Key: e0b80c3bf78523bfe80974d320935bfa30add02e1bff88ec2166c6bd5a706c42\r\n' +
        'Cookie: dslang=US-EN; site=USA; aasp=4CCFAA8B200AB9E4381ED66D99DB681A609F3593F637C40B320BD509E4F13237C58E8D2411CA90372C4FDA116DB40473368512A1C99B321BCE709710AAEADEA020D623303A3ADEA9767EB49C8E77A5C2B6BF0A9119A3A8DBC496A733B4672516F59EB632D01CB2A4974D4B2FF9C0BF0D7C279C47183DB08E; acn01=dK6dXfMv2U5sV9Y22a1DH6MpAnAnA2sYEbZMZ6MM/bAr6rJU9QAVNAn0ZXkk\r\n' +
        'User-Agent: axios/0.20.0\r\n' +
        'Host: idmsa.apple.com\r\n' +
        'Connection: keep-alive\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/appleauth/auth',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: true,
      host: 'idmsa.apple.com',
      protocol: 'https:',
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kChunkedBuffer)]: [],
      [Symbol(kChunkedLength)]: 0,
      [Symbol(kSocket)]: [TLSSocket],
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 65536,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    data: {
      phoneNumber: [Object],
      securityCode: [Object],
      mode: 'voice',
      type: 'verification',
      authenticationType: 'hsa2',
      noTrustedDevices: true,
      autoVerified: false,
      showAutoVerificationUI: false,
      hideSendSMSCodeOption: false,
      supervisedChangePasswordFlow: false,
      enableNonFTEU: false,
      hsa2Account: true,
      restrictedAccount: false,
      supportsRecovery: true,
      managedAccount: false,
      serviceErrors: [Array]
    }
  }
}
    Error: build command failed.

Reproducible demo or steps to reproduce from a blank project

This happens when either running eas build or eas submit though the debug output for eas submit is just the Apple security related above.

@alleyhector alleyhector added the needs review Issue is ready to be reviewed by a maintainer label Dec 11, 2024
@tinkerer
Copy link

I opened this issue to update the workaround.md expo/fyi#187
In my case:
The issue seems to be due to the fact that I have multiple accounts with Apple, one account email is the user account on my Mac and is not the same as the developer account email at the company I am working for. This was resolved for me by signing out of my Apple Account in System Settings and signing in to the developer account. I am filing an issue to update the workaround.md file and help other developers who may be experiencing similar problems and so that expo team can update the eas-cli so that developers do not have to sign out of their personal Mac account to use a different developer account.

@alleyhector
Copy link
Author

alleyhector commented Dec 11, 2024

Sorry I missed your issue from yesterday. I do think I'm having the same one so we can close this if its a duplicate. I let Expo folks decide.

And actually I was able to find an iOS device to log into but it would be nice to have the SMS fixed so you don't have to use a work specific device.

Thanks!

@umangloria
Copy link

Tried the workaround still no luck :(
Still facing the same issue.
currently having eas-cli/14.1.0 darwin-arm64 node-v20.17.0

@EvanBacon
Copy link
Contributor

Quick reminder that you can use a mac as your Apple device too. Again, we were able to reproduce this error and fixed against the repro so we no longer have any ability to test against the problem and it is seemingly fixed. I'd recommend clearing your local caches and trying again. #2698 (comment)

@alleyhector
Copy link
Author

Quick reminder that you can use a mac as your Apple device too. Again, we were able to reproduce this error and fixed against the repro so we no longer have any ability to test against the problem and it is seemingly fixed. I'd recommend clearing your local caches and trying again. #2698 (comment)

Do you mean fixed with a device or fixed with SMS. Just wanted to clarify because the SMS still doesn't work, although the workaround does.

@tscans
Copy link

tscans commented Dec 13, 2024

Quick reminder that you can use a mac as your Apple device too. Again, we were able to reproduce this error and fixed against the repro so we no longer have any ability to test against the problem and it is seemingly fixed. I'd recommend clearing your local caches and trying again. #2698 (comment)

After clearing the caches and using 14.1.0, I'm unable to sign in with SMS 2FA. I have multiple devices set up for device 2FA, but eas cli never asks for it.
I ran EXPO_NO_KEYCHAIN=1 eas build and it made me sign in all over again but still went right for the SMS 2FA. I haven't found a way to get it to try device 2FA and there is no way to disable SMS.

EDIT: It finally updated. But the device 2FA is far less preferred.

@umangloria
Copy link

Tried with both SMS an device code and it is till the same.

@arapocket
Copy link

arapocket commented Dec 13, 2024

Yup this was working now it's back

@evanheisler
Copy link

I'm still having this issue as well, but @tinkerer's workaround helped me get up and running again. Same situation and seems easy to reproduce — I'm signed into Apple with my personal account on my computer, but am using a different Apple account to build my project. I'm never asked to select a verification method, even after deleting ~/.app-store.

If I sign out of Apple (from System Settings) and sign in as the same profile I want to build the project with, it works as normal and prompts me for setting a verification method.

The other workaround that has worked is using the --non-interactive flag, but that also is not ideal.

If I go into XCode, I am signed into both Apple accounts there as well, but the CLI still doesn't work unless the account on the device matches the account building the project.

@arapocket
Copy link

I opened this issue to update the workaround.md expo/fyi#187 In my case: The issue seems to be due to the fact that I have multiple accounts with Apple, one account email is the user account on my Mac and is not the same as the developer account email at the company I am working for. This was resolved for me by signing out of my Apple Account in System Settings and signing in to the developer account. I am filing an issue to update the workaround.md file and help other developers who may be experiencing similar problems and so that expo team can update the eas-cli so that developers do not have to sign out of their personal Mac account to use a different developer account.

this worked for me thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

7 participants