eas-cli: Error at :app:processReleaseMainManifest when I try to build my app.

Build/Submit details page URL

No response

Summary

Hello, I have a build error that says: ‘Manifest merger failed: Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided.’ However, Expo doctor indicates no errors, and I can’t seem to find where it might be coming from.

app.json

{
  "expo": {
    "name": "Trellow",
    "scheme": "trellow",
    "slug": "Trellow",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon-light.png",
    "userInterfaceStyle": "automatic",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "assetBundlePatterns": ["**/*"],
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/icon-light.png",
        "backgroundColor": "#FFFFFF"
      },
      "package": "**************"
    },
    "extra": {
      "eas": {
        "projectId": "**************************"
      }
    },
    "ios": {
      "bundleIdentifier": "**********"
    }
  }
}
[RUN_GRADLEW] > Task :react-native-webview:processReleaseManifest
[RUN_GRADLEW] > Task :expo:compileReleaseLibraryResources
[RUN_GRADLEW] > Task :app:mergeReleaseResources
[RUN_GRADLEW] > Task :app:processReleaseMainManifest FAILED
[RUN_GRADLEW] See https://developer.android.com/r/studio-ui/build/manifest-merger for more information about the manifest merger.
[RUN_GRADLEW] Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
[RUN_GRADLEW] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[RUN_GRADLEW] For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
[RUN_GRADLEW] /Users/etiennementrel/Documents/Trello-mobile-app/build/build/android/app/src/main/AndroidManifest.xml Error:
[RUN_GRADLEW]   Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided.
[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Execution failed for task ':app:processReleaseMainManifest'.
[RUN_GRADLEW] > Manifest merger failed : Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] > Get more help at https://help.gradle.org.
[RUN_GRADLEW] BUILD FAILED in 27s
[RUN_GRADLEW] 138 actionable tasks: 138 executed
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Managed or bare?

managed

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.2.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 21.6.0 - /usr/local/bin/node
      Yarn: 1.22.21 - /opt/homebrew/bin/yarn
      npm: 10.3.0 - /usr/local/bin/npm
    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.2 AI-232.10300.40.2321.11567975
      Xcode: 15.2/15C500b - /usr/bin/xcodebuild
    npmPackages:
      expo: ^50.0.15 => 50.0.15 
      react: 18.2.0 => 18.2.0 
      react-native: 0.73.6 => 0.73.6 
    npmGlobalPackages:
      eas-cli: 7.8.1
      expo-cli: 6.3.10
    Expo Workflow: managed
(node:26695) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a u
serland alternative instead.                                                                  (Use `node --trace-deprecation ...` to show where the warning was created)
✔ 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 npm/ yarn versions
✔ Check for issues with metro config
✔ 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 native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!

Error output

No response

Reproducible demo or steps to reproduce from a blank project

https://snack.expo.dev/@hibobo/github.com-h1b0b0-trello-mobile-app

About this issue

  • Original URL
  • State: open
  • Created 3 months ago
  • Comments: 21 (3 by maintainers)

Most upvoted comments

@szdziedzic Could this please be opened as a bug? We are having the same problem with android build in eas cli.

[RUN_GRADLEW] /tmp/vsts/eas-build-local-nodejs/20ff699b-328d-4d8d-b079-6d89dee3a62f/build/android/app/src/main/AndroidManifest.xml Error: [RUN_GRADLEW] Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided. [RUN_GRADLEW] > Task :app:mergeReleaseResources [RUN_GRADLEW] FAILURE: Build failed with an exception. [RUN_GRADLEW] * What went wrong: [RUN_GRADLEW] Execution failed for task ':app:processReleaseMainManifest'. [RUN_GRADLEW] > Manifest merger failed : Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided. [RUN_GRADLEW] * Try: [RUN_GRADLEW] > Run with --stacktrace option to get the stack trace. [RUN_GRADLEW] > Run with --info or --debug option to get more log output. [RUN_GRADLEW] > Run with --scan to get full insights. [RUN_GRADLEW] > Get more help at https://help.gradle.org./ [RUN_GRADLEW] BUILD FAILED in 15m 23s

As far as we can tell this is a problem with the manifest placeholder not being added in build.gradle at build time.

I don’t have find any solutions for that. Sorry ):

Not when it comes to managing an enterprise level application where we need to manage a CI pipeline for multiple devs to contribute to. Build is done on a build server using the eas-cli pipeline, and then distributed to stores. Even building in local wouldn’t get around the fact that a managed expo app doesnt’ have an Android folder. It would require a pre-build step, which defeats the point of using managed flow with eas.

@Naveen-g09 Look at my comment #2322 (comment) and try the solution 😃

@H1B0B0 This won’t work for managed expo apps because we don’t have access to the Android folder. Hence why this needs to be reopened as a bug please.

Alright, I found the issue:

The problem stemmed from the fact that Expo hadn’t added this code in the file app/build.gradle:

manifestPlaceholders = [
'appAuthRedirectScheme': 'myappredirection'
]

And when I tried using Expo’s build function, for some reason, it wasn’t picking up my changes in the file. So, I opted to directly use the command ./gradlew assembleRelease in the ./android directory, and that worked. I think there might be a bug somewhere in the tool, but I couldn’t pinpoint where. Sorry if anyone else encounters this issue. Follow the steps I described above and don’t use the eas build -p android --local function, but rather go directly with the gradlew build function. Also, remember to do the prebuild step with Expo.