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

Development Build does not work with fingerprint as Runtime Version #2511

Closed
okkes opened this issue Aug 20, 2024 · 8 comments · Fixed by expo/expo#31453
Closed

Development Build does not work with fingerprint as Runtime Version #2511

okkes opened this issue Aug 20, 2024 · 8 comments · Fixed by expo/expo#31453
Assignees
Labels
bug Something isn't working eas update issue accepted

Comments

@okkes
Copy link

okkes commented Aug 20, 2024

Build/Submit details page URL

https://expo.dev/accounts/jinbu/projects/my-demo-expo-app/builds/25a7434a-4535-464e-b079-4863268b939b

Summary

When creating development build using fingerprint as runtime version, the branches with the same runtime versions arent recognized as compatible update. Happens for iOS and Android apps.

Managed or bare?

managed

Environment

npx expo-env-info

expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.6.1
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 18.20.4 - ~/hostedtoolcache/node/18.20.4/arm64/bin/node
      Yarn: 1.22.22 - ~/.yarn/bin/yarn
      npm: 10.7.0 - ~/hostedtoolcache/node/18.20.4/arm64/bin/npm
    Managers:
      CocoaPods: 1.15.2 - /opt/homebrew/lib/ruby/gems/3.0.0/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.5, iOS [17](https://github.com/ash-blossom/masquerena/actions/runs/10479750265/job/29026011412#step:7:18).5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
      Android SDK:
        API Levels: 33, 33, 33, 34, 34, 34, 34, 34, 35
        Build Tools: 33.0.2, 33.0.3, 34.0.0, 35.0.0
        Android NDK: 26.3.11579264
    IDEs:
      Xcode: 15.4/15F31d - /usr/bin/xcodebuild
    npmPackages:
      expo: ~51.0.28 => 51.0.28 
      react: [18](https://github.com/ash-blossom/masquerena/actions/runs/10479750265/job/29026011412#step:7:19).2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.74.5 => 0.74.5 
      react-native-web: ~0.[19](https://github.com/ash-blossom/masquerena/actions/runs/10479750265/job/29026011412#step:7:20).11 => 0.19.12 
    Expo Workflow: managed

npx expo-doctor

✔ 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 issues with metro config
✔ Check for app config fields that may not be synced in a non-CNG project
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check npm/ yarn versions
✔ 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

Didn't find any issues with the project!

Error output

No error.

Branches that dont have any updates yet will be listed here with no updates available. As soon as you push an update to the branch, it disappears.

In the first screenshot, you will see that the development branch is not showing. The second and third pictures shows that both the build and update runtime versions are the same.

The 4th picture shows what I see as version number, not sure if this is normal.

The 5th and 6th pictures shows that my app does work when semantic versioning is used.

1st picture
WhatsApp Image 2024-08-20 at 23 55 47_fa304bd7

2nd picture
image

3rd picture
image

4th picture
image

5th picture
image

6th picture
image

Reproducible demo or steps to reproduce from a blank project

create app.config.js with the fingerprint runtime version

runtimeVersion: {
  policy: 'fingerprint'
},

run eas build command
run eas update command

ensure that same platform, channel, branch etc are used.

@okkes okkes added the needs review Issue is ready to be reviewed by a maintainer label Aug 20, 2024
@okkes
Copy link
Author

okkes commented Aug 24, 2024

As a temporary fix, what I have done is create app.config.js that dynamically determines the runtime version

const getRuntimeVersion = () => {
  if (RUNTIME_VERSION === 'fingerprint') {
    return { policy: 'fingerprint' }
  }

  return RUNTIME_VERSION
}
...
...
runtimeVersion: getRuntimeVersion(),

Then in the CI/CD I set the RUNTIME_VERSION to 'fingerprint', run a script that in essence executes npx expo-updates fingerprint:generate command to generate the hash. Overwrite RUNTIME_VERSION env with the new hash and build the app. Now, instead of file:fingerprint, I get the actual hash. After the build, I set the RUNTIME_VERSION back to fingerprint and execute whatever commands comes after that, like eas update.

@szdziedzic
Copy link
Member

Hi @okkes

In screenshot number 1, you list updates for branch production and there aren't any. It looks like you don't have any updates from branch production compatible with this runtime version, which seems correct because you don't have any updates for the production branch with this runtime version, only for branch development. Are you able to see the updates for branch development using the same version of the dev client app? It seems like there are a few compatible with this runtime version on the development branch 🤔

@okkes
Copy link
Author

okkes commented Aug 27, 2024

Sorry for causing confusion with that screenshot. The screenshot (1) was to actually show that the development branch was not listed. (its the screenshot made on the highest scope, that shows all the branches). The reason why the production is there is because there are no updates pushed yet. That one will also disappear as soon as I push an update there.

So, the issue I am getting from this is actually related to the 4th picture. When building using fingerprint + dev client, it shows file:fingerprint as runtime version. And this one is most likely literally compared to the hash in updates. When I use the hash as custom runtime version during the build, the build can find the updates that are generated using fingerprint

@szdziedzic
Copy link
Member

I talked about it with developers working on the dev client/fingerprint/EAS Update, and it seems like this is a bug/current limitation of the dev client that it doesn't support the fingerprint policy to load compatible updates.

@szdziedzic szdziedzic added eas update bug Something isn't working issue accepted and removed needs review Issue is ready to be reviewed by a maintainer labels Aug 30, 2024
@expo-bot
Copy link
Contributor

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

@wschurman wschurman self-assigned this Sep 3, 2024
@wschurman
Copy link
Member

Will fix before moving fingerprint runtime version out of beta. Should be production ready by SDK 53 or maybe 52.

@markwitt1
Copy link

@wschurman when do you think fingerprint policy will be production ready?

@wschurman
Copy link
Member

@markwitt1 - Looking like SDK 53 or 54 for continuous deployment to production (need to figure out how to do continuous submission). For development (PR comment using expo/expo-github-action/continuous-deploy-fingerprint) it is working well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working eas update issue accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants