-
Notifications
You must be signed in to change notification settings - Fork 83
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
failure to generate bundle on EAS Build #187
Comments
Hey @cruzach, Can you take a look at this issue? I think issue related to |
@giautm I tested an iOS build just now with the following in app.json, and it worked and uploaded sourcemaps without a problem:
Please provide all the information needed to reproduce the issue |
Hey, I can send the build ID that I face with the issue. Can you view it instead? The build id is |
I need to know your app configuration as well. You should try to reproduce this issue in a blank project to make sure it is a bug with sentry-expo, and not just a bug in your own project |
It is hard to reproduce right because my project is a part of a mono repo. This is a diff between before & after I apply the the config is mostly the same. "plugins": ["sentry-expo"],
"hooks": {
"postPublish": [
{
"config": {
"authToken": "xxxxx",
"organization": "sentry",
"project": "freelancer",
"url": "https://sentry-aws.aaaaaaa.xyz"
},
"file": "sentry-expo/upload-sourcemaps"
}, |
hm, that doesn't look like the diff of the sentry-expo plugin... you can see the expected modifications here- https://github.com/expo/sentry-expo/blob/master/plugin/src/withSentryIOS.ts |
Hey @cruzach, This is my reproduce repo: giautm/eas-monorepo-example@main...giautm:issue/sentry-expo This is the build ID with error:
PS: My original project use SDKv41, but this error also happened on SDKv40. So, I don't think it's related. |
@giautm this might be a relevant issue for you to look at - react-native-community/cli#656 |
Hi, I found the fix. Put {
"dependencies": {
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz"
},
} The XCode log will be changed as: + case "$CONFIGURATION" in
+ DEV=false
- +++ dirname /Users/expo/workingdir/build/node_modules/react-native/scripts/react-native-xcode.sh
+ +++ dirname /Users/expo/workingdir/build/apps/managed/node_modules/react-native/scripts/react-native-xcode.sh
- ++ cd /Users/expo/workingdir/build/node_modules/react-native/scripts/..
+ ++ cd /Users/expo/workingdir/build/apps/managed/node_modules/react-native/scripts/..
++ pwd
- + REACT_NATIVE_DIR=/Users/expo/workingdir/build/node_modules/react-native
+ + REACT_NATIVE_DIR=/Users/expo/workingdir/build/apps/managed/node_modules/react-native
- + PROJECT_ROOT=/Users/expo/workingdir/build/node_modules/react-native/../..
+ + PROJECT_ROOT=/Users/expo/workingdir/build/apps/managed/node_modules/react-native/../..
- + cd /Users/expo/workingdir/build/node_modules/react-native/../..
+ + cd /Users/expo/workingdir/build/apps/managed/node_modules/react-native/../..
+ '[' -z /Users/expo/.nvm ']'
+ [[ -n '' ]]
+ [[ -s index.ios.js ]] But, I don't like the solution. I have tried to set "env": {
"PROJECT_ROOT": "$PROJECT_DIR/.."
} It printed the plain text to the console as:
|
This is an issue with monorepo setup, not with @giautm can you take a look at this monorepo example and try to proceed from there- https://github.com/byCedric/eas-monorepo-example? There's a couple different options for you to achieve what you're looking for here I think that the |
My reproduce repo is a fork of https://github.com/byCedric/eas-monorepo-example. ;) I have faced other issues when trying to use EAS build with mono-repo. I have a little experience. ;) |
Hey @cruzach, after I put
There is no error with the code, I try to rebuild the app many times with a single commit that adds {
"dependencies": {
"react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz"
},
} Is there any way to fix the issue? 😢 |
@giautm that error message can be the result of a lot of different issues, you'll have to go through some manual debugging to investigate this further |
Hey, I have try to debug. But on iOS, there is no error logged to the console. I decide to remove this plugin and the fix (put "react-native" in "package.json"). I don't have enough time to find the root cause. |
i was able to reproduce this, there is some issue with post publish step in an EAS build, works fine (uploads code) using |
https://docs.expo.io/build-reference/migrating/#no-more-automatic-publishing-before-building Make sure you follow the docs and add the config plugin- https://github.com/expo/sentry-expo#step-3 |
i did, it ONLY works if the plugin is defined, soon as you add the hook, the build breaks |
|
Please see the EAS monorepo example with Sentry and hooks configured: https://github.com/byCedric/eas-monorepo-example/tree/main/apps/with-sentry. Android:
iOS: |
reposting here: @byCedric it is very possible my error is iOS specific and your example doesn't have a working iOS test :) from what i can tell, the only difference between the example and the repo i provided is symlinks (which i've already tried linking sentry-expo and every @sentry/* dependency with no success) |
Your sourcemaps are still uploaded, but it's done with Sentry's native build scripts, not with your post publish hook |
@byCedric were you able to confirm if this is an iOS specific issue? no rush on a fix, just need to know if I need to dig more :) |
@parisholley It looks like it might be an issue with Sentry's CLI and finding the proper folder where the project is located in. This only seems to happen for monorepos though, only iOS, and only when you have a postpublish hook. I added an If you can try that, it should work for your iOS builds 😄 |
@byCedric that patch fixed eas remote build :) doesn't work for |
Good to know! We are making progress on removing monorepo weirdness. We will definitely have something better for SDK 43! |
Thanks @byCedric for the fix. I hope it soon plant to production. |
Same issue here, removing sentry-expo plugin working for me |
@jereztech, please provide more information: sdk version, sentry-expo version. I have been build success with SDKv43 and v44 |
hi @giautm I'm using sentry-expo@4.0.0 with SDKv43, in my case the error has been different |
I think it related to Sentry config, please double-check your API keys, project name, org on Sentry. It's not related to expo.name. |
I have copy/paste directly from Sentry, so this config is ok |
Hi, I just trying to use sentry-expo plugin on EAS Build. I have config correct sentry-expo, but the build was failure with following errors:
The text was updated successfully, but these errors were encountered: