Bare Android EAS Build Issue

Hi Team!

Getting an error when building both preview or release builds with EAS. Am able to run just fine locally, this error only occurs when building with EAS

[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Script '/root/workingdir/build/node_modules/react-native-unimodules/gradle.groovy' line: 82
[stderr] * What went wrong:
[stderr] A problem occurred evaluating project ':app'.
[stderr] > You need to have MainApplication in your project

I’ve seen this error happen a handful of times, and I even had it myself and resolved it in the past (discussion linked here EAS Build (android bare) fails "You need to have MainApplication in your project"). My solution at that time was actually due to a very “specific to me” issue, bit of a laugh actually if you take a read in that thread.

Whats weird is that nothing specific has changed in my project and I’ve built successfully many times since then through EAS. I did a quick shallow clone of my project locally to ensure that the file actually WAS there as Brent mentions in /Users/expo/project/build/package.json is missing - #2 by notbrent, and it DOES look like the MainApplication file is indeed where it should be.

Any ideas on where to look further into this?

It’s been a couple months since I last built, so I’m not sure if there was maybe a breaking change or something which I may have missed. That said, even if I’m running some slightly older versions of expo, not sure why this would matter in EAS.

Will also note, I do NOT have duplicate MainApplication files as some people have claimed to have had, causing the same issue.

any chance you can try to strip out everything unrelated from your project and share a reproducible example?

Working right now on trying to upgrade my versions up to latest so that I can just get rid of unimodules since there always tends to be issue with them haha (or see if even 41/42 wont have the same issue). Currently on 40.0.0, so it’s a bit of a headache, so if i run into too much issue/that dosn’t fix it, I’ll see if I can repro