eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

EAS Update isn't initializing on iOS (help me to investigate please)

Open juanch0x opened this issue 2 years ago • 1 comments

Build/Submit details page URL

No response

Summary

I have to update my project (bare workflow) from Expo SDK 45 to 49 and I also had to migrate from expo publish to the new eas update.

I follow this guide to integrate it basically from scratch https://docs.expo.dev/eas-update/updating-your-app/

I'm configured the app.config.json with the following info

//removing unnecesary information
//.....
runtimeVersion: "1.0.0",
updates: {
  url: "https://u.expo.dev/e6caa90c-fb71-4616-bcb0-XXXXXXX"
}

this is generating the following expo.plist file when I deploy using eas build

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>EXUpdatesCheckOnLaunch</key>
    <string>ALWAYS</string>
    <key>EXUpdatesEnabled</key>
    <true/>
    <key>EXUpdatesLaunchWaitMs</key>
    <integer>0</integer>
    <key>EXUpdatesURL</key>
    <string>https://u.expo.dev/e6caa90c-fb71-4616-bcb0-XXXXXXX</string>
    <key>EXUpdatesRuntimeVersion</key>
    <string>1.0.0</string>
  </dict>
</plist>

My eas.json (develop profile) looks like this

   "develop": {
      "distribution": "store",
      "env": {
        "ENVIRONMENT": "develop",
        "EAS_BUILD_REF": "true"
      },
      "channel": "develop",
      "ios": {
        "buildConfiguration": "Release",
        "scheme": "myScheme"
      },
      "android": {
        "gradleCommand": ":app:bundleDevelopmentRelease"
      }
    },

The problem is that the updates that I'm sending to the branch dev (which is linked to develop channel) never come to the app, so I try to fetch them manually with the following method

  const onCheckUpdate = async () => {
    try {
      const update = await Updates.checkForUpdateAsync();

      if (update.isAvailable) {
        await Updates.fetchUpdateAsync();
        await Updates.reloadAsync();
      }
    } catch (error) {
      alert(`Error fetching latest Expo update: ${error}`);
    }
  };

Here, I noted that the app is allways failing when it try to get updates, it generates the following exception

Can't complete the operation (EXUpdates.UpdatesNotInitializedException 1)

someone has had this problem before?

thanks!

Managed or bare?

bare

Environment

expo-env-info

expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.4.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.15.0 - /usr/local/bin/node
      Yarn: 1.22.18 - /usr/local/bin/yarn
      npm: 8.6.0 - /opt/homebrew/bin/npm
    Managers:
      CocoaPods: 1.12.1 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    IDEs:
      Android Studio: 2022.3 AI-223.8836.35.2231.10671973
      Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
    npmPackages:
      expo: ^49.0.0 => 49.0.8
      react: 18.2.0 => 18.2.0
      react-dom: 18.2.0 => 18.2.0
      react-native: 0.72.4 => 0.72.4
      react-native-web: ~0.19.6 => 0.19.8
    Expo Workflow: bare

expo-doctor

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ 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:

Some dependencies are incompatible with the installed expo version:
  [email protected] - expected version: ~3.3.0
Your project may not work correctly until you install the correct versions of the packages.
Fix with: npx expo install --fix
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

Can't complete the operation (EXUpdates.UpdatesNotInitializedException 1)

Reproducible demo or steps to reproduce from a blank project

I'm not sure how to create a reproducible demo, it happened to me upgrading my expo project

juanch0x avatar Aug 25 '23 20:08 juanch0x

in app.json if you published your app in android and ios with a different expo:version. You need to set the version to the original version when you published your app in ios or android.

So if you published android with 2.0

change the version the 2.0 then eas update --branch production

And ios with 3.0

change the version the 3.0 then eas update --branch production

pierresaid avatar Oct 25 '23 19:10 pierresaid