EAS Build error: "TypeError: Cannot read property 'enabled' of undefined"

I get this error when trying to build for iOS, Android, or both:

% EXPO_DEBUG=true eas build
✔ Build for platforms › All
✔ Linked to project @masao/simple-math-tutor
    TypeError: Cannot read property 'enabled' of undefined

I’ve looked through all my code, and I have no TS errors.

Also, I’ve searched for enabled in everything except node_modules and could not find that string.

EAS Version:

% eas --version
eas-cli/0.13.0 darwin-x64 node-v14.0.0

try DEBUG=* instead of EXPO_DEBUG=1

also share your app.json. do you have an “updates” field?

1 Like

@notbrent DEBUG=* works:

✔ Build for platforms › All
✔ Linked to project @masao/simple-math-tutor
TypeError: Cannot read property 'enabled' of undefined
    at Object.isEasEnabledForProjectAsync (/Users/masao/.nvm/versions/node/v14.0.0/lib/node_modules/eas-cli/build/project/isEasEnabledForProject.js:16:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Build.run (/Users/masao/.nvm/versions/node/v14.0.0/lib/node_modules/eas-cli/build/commands/build/index.js:39:35)
    at async Build._run (/Users/masao/.nvm/versions/node/v14.0.0/lib/node_modules/eas-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/Users/masao/.nvm/versions/node/v14.0.0/lib/node_modules/eas-cli/node_modules/@oclif/config/lib/config.js:173:24)
    at async Main.run (/Users/masao/.nvm/versions/node/v14.0.0/lib/node_modules/eas-cli/node_modules/@oclif/command/lib/main.js:27:9)
    at async Main._run (/Users/masao/.nvm/versions/node/v14.0.0/lib/node_modules/eas-cli/node_modules/@oclif/command/lib/command.js:43:20)

Yes, I do have an updates field:

{
  "expo": {
    "name": "Simple Math Tutor",
    "slug": "simple-math-tutor",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./src/assets/splash/icon.png",
    "scheme": "myapp",
    "userInterfaceStyle": "automatic",
    "splash": {
      "image": "./src/assets/splash/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#58CC02"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "bundleIdentifier": "dev.kitamura.simple-math-tutor-expo",
      "buildNumber": "1.0.0",
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./src/assets/splash/adaptive.png",
        "backgroundColor": "#58CC02"
      },
      "package": "dev.kitamura.simpleMathTutorExpo",
      "versionCode": 2,
      "permissions": []
    },
    "web": {
      "favicon": "./src/assets/images/favicon.png"
    }
  }
}

hello! this appears to come from here: eas-cli/packages/eas-cli/src/project/isEasEnabledForProject.ts at d5365275e03a6e20b7da01c24f5fe45d48f7e810 · expo/eas-cli · GitHub - somehow we’re not getting the expected response from the server here.

what is your expo account name?

1 Like

Hi @notbrent , my Expo account name is “@masao

hi there. sorry for the hassle, i’m not quite sure what is going on here and have asked the folks that are more familiar with the code around this to investigate. it seems that our endpoint is not returning the expected response. can you try signing out and back in to your expo account in eas-cli?

1 Like

@notbrent That worked! Thank you!

eas account:logout
eas account:login
eas build