-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[IOS] Failing to execute tests in Bitrise for debug variant #819
Comments
@GuiCavi Hi. I have the similar issue. |
@pkantsedalov Hi, the only possible way to do that is by running a release version. This version doesn't need the packager. I'm not sure how Bitrise works internally, but I believe it:
The point is that the packager closes right before the tests starts, while running on a local machine it stays opened in another terminal window. Anyway, a workaround is to run the tests in Release version, pointing to a Test database (if needed). What do you think of that? |
@GuiCavi I arranged the next flow:
Works fine. |
That makes sense, I'll give it a try. All in the same step? Like: - script@1.1.5:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
detox build -c {configurationFromPackageJson}
node_modules/react-native/local-cli/cli.js bundle --dev false --entry-file index.js --platform ios --reset-cache --bundle-output Build/Products/Debug-iphonesimulator/{myApp}.app/main.jsbundle --assets-dest Build/Products/Debug-iphonesimulator/{appName}.app
detox test -c {configurationFromPackageJson} |
@GuiCavi sorry we don't have any CI solution for that yet. For now we have such script for local tests run. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The issue has been closed for inactivity. |
From what I see, it could be good if we were running Detox e2e test builds in debug mode as well, preferably including Bitrise. I think it needs to be filled as a separate issue though. |
Description
I'm using Bitrise to run Detox tests. The build command runs ok and is a success. But the test command always fails.
Link to StackOverflow question
Running locally:
Command
detox test -c ios.sim.debug
without starting the packager: 'No bundle URL present' errorCommand
detox test -c ios.sim.debug
with the packager: Opens the packager and everything runs OK.Command
detox test -c ios.sim.release
without the packager: works fine.Command
detox test -c ios.sim.release
with the packager: works fine.Running in Bitrise:
detox test -c ios.sim.debug --cleanup
without starting the packager: 'No bundle URL present' errordetox test -c ios.sim.debug --cleanup
with the packager:detox test -c ios.sim.release --cleanup
without the packager: works fine.detox test -c ios.sim.release --cleanup
with the packager: works fine.Disclaimer
With/Without the packager means the variable
RCT_NO_LAUNCH_PACKAGER
equalsfalse/true
, respectively.The package.json file
The bitrise.yml file
Detox, Node, Device, Xcode and macOS Versions
Device and verbose Detox logs
detox test -c ios.sim.debug --cleanup
with the packagerdetox.last_launch_app_log.err
prints:TL;DR
I get an error when running Detox with Bitrise. The command
detox test -c ios.sim.debug --cleanup
should open a packager but looks like it's not doing it.The version that is needed to test is the Debug one, no other options. Maybe I missed something about the installation, but all the files were checked with official docs and other examples and are the identical.
Related issues: #742, #749, #740
The text was updated successfully, but these errors were encountered: