Closed sam1463 closed 1 year ago
Hi @sam1463, thanks for reaching out!
Unfortunately we cannot reproduce the issue on our end.
To help use troubleshoot what could be causing the issue in your case, could you share the content of the following files (you can redact parts of them if they contain secrets or ids):
plugins
array)Thanks a lot!
I've seen a similar issue in my own project: the expo-datadog xcode script calls datadog-ci, and that script fails because it's looking for a bundlemap in the ./ios
directory when it's actually been generated in the root of the project. I've been able to reproduce this by creating a brand new project from scratch with no other plugins except expo-datadog
. The minimal example repo is viewable here - but I think you'll need to set up some certificates and mobileprovision etc. to run this, as the bug is only visible when running in a production profile.
However, this repo is slightly different from @sam1463 's set-up, as I'm having this issue in the most recent version of expo-datadog (49.0.0), and I'm running this in EAS locally. I wasn't able to fix this issue with the above patch on the env variable SOURCEMAP_FILE
in withIosSourcemaps.js
, though. I think this is because the datadog-ci script was looking for the bundle file in ./ios/ios/main.jsbundle.map
.
I was able to fix the build in my repo and the example repo by applying the following patch to datadog-ci
:
--- a/node_modules/@datadog/datadog-ci/dist/commands/react-native/xcode.js
+++ b/node_modules/@datadog/datadog-ci/dist/commands/react-native/xcode.js
@@ -175,7 +175,7 @@ class XCodeCommand extends clipanion_1.Command {
};
this.getSourcemapsLocation = () => {
if (process.env.SOURCEMAP_FILE) {
- return `${process.env.SOURCEMAP_FILE}`;
+ return path_1.join('..', `${process.env.SOURCEMAP_FILE}`);
}
if (process.env.EXTRA_PACKAGER_ARGS) {
const splitArguments = process.env.EXTRA_PACKAGER_ARGS.split(' ');
...but I'm not planning to open a PR on that repo with this change, heh. I think this is an issue with the way the relative paths are set in the calling expo-datadog
script, rather than the datadog-ci
or react-native-xcode
scripts.
Hi @dprgarner, thanks a lot for providing an example reproducing the error!
I can reproduce it on my end, I am investigating on a fix for expo-datadog
and will let you know once it is ready.
Hi @dprgarner @sam1463,
Thank you again for reporting this issue.
I've tested it and it should have been fixed with version 49.0.1
of expo-datadog
.
Feel free to reopen the issue if it is not fixed for you.
I've tried out the new package version in my project, and sourcemap uploading is working now. Thanks!
Describe what happened Caveat: I am not 100% sure if this is an issue with this library, or another part of my build, but wanted to start here. My expo build is failing on uploading the main.jsbundle.map file to datadog, because that file ends up existing in the root directory of my project, instead of the
ios
directory. If I manually move the file to the ios directory, the build succeeds. Or, by patching this package with patch-package, I can have this repo specify theSOURCEMAP_FILE
to be in the ios directory, which "fixes" the issue.Steps to reproduce the issue:
npx expo run:ios --configuration Release
locallyDescribe what you expected:
Additional context
expo-datadog
: 48.0.0@datadog/mobile-react-native
: 1.2.1contents of my patch: