Closed enlightenL closed 8 months ago
Hi @enlightenL,
This issue seems unrelated to our Expo plugin, could you check if the error is solved when you remove "expo-datadog"
from the list of expo plugins?
Let us know if this is the case.
If not, this might be related to the conditions needed to be able to run the development app on your device. If you are using the same wi-fi network on your device and your computer, restrictions might prevent your device from accessing the bundler. You can see how to bypass this here.
@louiszawadzki
If you remove the expo-datadog
expo plugin and do a development build, it will be bundled successfully. This issue appears to occur on all iPhones and all network environments. (Actually tested with iPhone 14 and iPhone SE in two network environments.)
Thank you.
+) I ran the command npx expo start --tunnel
but it had no effect. 😭
Hi @enlightenL,
Thanks a lot for your report, I've been able to reproduce the issue and identify a fix.
It might take a few days for it to be released, so in the meantime you can use this patch for @datadog/datadog-ci
using patch-package to get unblocked:
diff --git a/node_modules/@datadog/datadog-ci/dist/commands/react-native/xcode.js b/node_modules/@datadog/datadog-ci/dist/commands/react-native/xcode.js
index 95876f7..623d3ef 100644
--- a/node_modules/@datadog/datadog-ci/dist/commands/react-native/xcode.js
+++ b/node_modules/@datadog/datadog-ci/dist/commands/react-native/xcode.js
@@ -236,6 +236,7 @@ class XCodeCommand extends clipanion_1.Command {
return !!podfileLockContent.match('hermes-engine');
};
this.shouldUploadSourcemaps = () => process.env.CONFIGURATION === 'Release' || this.force;
+ this.shouldBundle = () => process.env.CONFIGURATION === 'Release' || this.force || !process.env.PLATFORM_NAME?.match('simulator');
}
execute() {
return __awaiter(this, void 0, void 0, function* () {
@@ -273,13 +274,17 @@ class XCodeCommand extends clipanion_1.Command {
if (releaseVersion === null || buildVersion === null) {
return 1;
}
- if (!this.shouldUploadSourcemaps()) {
- this.context.stdout.write(`Build configuration ${process.env.CONFIGURATION} is not Release, skipping sourcemaps upload`);
- return 0;
- }
+
// Run bundle script
try {
- yield this.bundleReactNativeCodeAndImages();
+ if (this.shouldBundle()) {
+ yield this.bundleReactNativeCodeAndImages();
+ }
+
+ if (!this.shouldUploadSourcemaps()) {
+ this.context.stdout.write(`Build configuration ${process.env.CONFIGURATION} is not Release, skipping sourcemaps upload`);
+ return 0;
+ }
/**
* Because of a bug in React Native (https://github.com/facebook/react-native/issues/34212), the composition
* of the 2 Hermes sourcemaps is not done correctly. Therefore we need to do the composition ourselves to
I will let you know in this issue once the release is out.
Thank you so much!! @louiszawadzki
The application will run and bundling will proceed successfully.
Hi @enlightenL,
This has now been fixed in the 2.32.2
release of @datadog/datadog-ci
.
I'll close this issue, feel free to reopen it if the issue persists.
Hi @louiszawadzki,
It seems like the issue has come back again. This seems to happen in almost all versions of @datadog/datadog-ci
(2.32.2 to 2.37.0).
expo: ^51 expo-datadog: ^51.0.0 @datadog/mobile-react-native: ^2.3.5 @datadog/datadog-ci: 2.32.2 to 2.37.0
cc @marco-saia-datadog
Describe what happened When you add
expo-datadog
toplugins
ofapp.json
and then do a development build, the following error appears. It works normally in the iPhone simulator and this only happens on the device.Steps to reproduce the issue:
@datadog/mobile-react-native
andexpo-datadog
as dependencies.@datadog/datadog-ci
as devDependencies.DATADOG_APP_KEY
andDATADOG_SITE
as environment variables, or place adatadog-ci.json
file containingappKey
anddatadogSite
properties in the project root.expo-datadog
toplugins
inapp.json
and runnpx expo run:ios
to build.Describe what you expected:
A percent number appears as shown below, and bundling should proceed.
Additional context
react@18.2.0
react-native@0.73.5
expo@50.0.13
@datadog/mobile-react-native@2.2.0
expo-datadog@50.2.0
@datadog/datadog-ci@2.32.0
app.json