expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
822 stars 84 forks source link

Update issue with some Android devices #2622

Open pnogier opened 2 weeks ago

pnogier commented 2 weeks ago

Build/Submit details page URL

No response

Summary

Hi there ! We recently migrated from codepush to EAS Updates, Everything seems to work perfectly at first sight, iOS updates are properly getting downloaded and installed, same for Android. But in some cases, some Android users doesn't get the update.

When checking to the updates details in expo.dev I can see their are installs for both platforms, and no failed installs. So everything looks good.

Did anyone encounter this kind of issue ? Or am I missing something ?

Managed or bare?

Bare

Environment

npx expo-env-info

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.3
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 22.9.0 - /opt/homebrew/bin/node
      Yarn: 1.22.22 - /usr/local/bin/yarn
      npm: 10.8.3 - /opt/homebrew/bin/npm
      Watchman: 2024.09.23.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
    IDEs:
      Android Studio: 2023.1 AI-231.9392.1.2311.11330709
      Xcode: 15.2/15C500b - /usr/bin/xcodebuild
    npmPackages:
      expo: 51.0.26 => 51.0.26
      react: 18.2.0 => 18.2.0
      react-dom: 18.2.0 => 18.2.0
      react-native: 0.74.5 => 0.74.5
    Expo Workflow: bare

npx 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 issues with metro config
✔ Check npm/ yarn versions
✔ 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 Expo config (app.json/ app.config.js) schema
✔ Check native tooling versions
✔ Check that packages match versions required by installed Expo SDK
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK

Error output

No response

Reproducible demo or steps to reproduce from a blank project

Unfortunately it is not really possible to share a reproducible demo..

But here is the js code that is supposed to pull and install the updates:

    const handleExpoUpdate = async () => {
        try {
            const update = await Updates.checkForUpdateAsync();
            if (update.isAvailable) {
                await Updates.fetchUpdateAsync();
                await Updates.reloadAsync();
            }
        } catch (error) {
            console.error('Error checking for updates:', error);
        }
    };

    useEffect(() => {
        const subscription = AppState.addEventListener('change', (nextAppState) => {
            if (appState.current.match(/inactive|background/) && nextAppState === 'active') {
                // Check for update when app comes back from background
                handleExpoUpdate();
            }

            appState.current = nextAppState;
        });

        // Check for update when app mounts
        handleExpoUpdate();

        return () => {
            subscription.remove();
        };
    }, []);
DonovanCharpin commented 2 weeks ago

I encountered the same issue, it seems that some Android phone don't pull the update somehow.