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

Build fails after running npx install-expo-modules@latest command because code added to wrong location in android/app/build.gradle #28892

Open
jehillert opened this issue May 15, 2024 · 5 comments
Labels
CLI Versioned Expo CLI -- `npx expo start` needs more info To be used when awaiting reporter response

Comments

@jehillert
Copy link

jehillert commented May 15, 2024

Summary

See image below. I ran npx install-expo-modules@latest and it added code to the wrong place in android/app/build.gradle. I would guess this happened because the code for the command looks for the first set of curly braces instead of the first set of curly braces where the open brace is preceeded by "React"?

image

The command also added code to the podfile that was already there.

image

What platform(s) does this occur on?

Android
iOS

SDK Version

50.0.0

Environment

n/a

Minimal reproducible example

private repo

@jehillert jehillert added CLI Versioned Expo CLI -- `npx expo start` needs validation Issue needs to be validated labels May 15, 2024
@expo-bot expo-bot removed the needs validation Issue needs to be validated label May 15, 2024
@byCedric
Copy link
Member

Hi @jehillert! Thanks for the issue report. Unfortunately, I can't reproduce this issue.

The added code is handled by the updateAndroidGradleFile method, which uses appendContentsInsideDeclarationBlock from config plugins. This method does take react { into account, and should not write to the sentry { block.

Is it possible to provide a repository with a project that has the behavior you are describing?

@byCedric byCedric added the needs more info To be used when awaiting reporter response label May 15, 2024
@jehillert
Copy link
Author

Hi @jehillert! Thanks for the issue report. Unfortunately, I can't reproduce this issue.

The added code is handled by the updateAndroidGradleFile method, which uses appendContentsInsideDeclarationBlock from config plugins. This method does take react { into account, and should not write to the sentry { block.

Is it possible to provide a repository with a project that has the behavior you are describing?

I could add you to my repo temporarily, or copy/paste the content of any configuration files you want to see here. If that would be helpful. Can't really make the repo public though.

@byCedric
Copy link
Member

@jehillert I think it's fine to create a project from a template, and only copy-ing the native Android files before running npx install-expo-modules@latest. If that results in the behavior you are describing, that's something we can work with. It doesn't need to have the JS code, or any iOS code, just the Android native files.

@jehillert
Copy link
Author

Ok, will try that and follow up here in a bit

@jehillert
Copy link
Author

@byCedric You should be able to reproduce with this repo. I put steps to reproduce in the Readme file.

https://github.com/jehillert/expo-modules-int-issue-28892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Versioned Expo CLI -- `npx expo start` needs more info To be used when awaiting reporter response
Projects
None yet
Development

No branches or pull requests

3 participants