You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logs produced with the current iOS logs implementation have no stdout/stderr of the simulator, hence critical information is missed (e.g. console.log() contents in React Native applications when debugging).
I have tested this issue on the latest Detox release and it still reproduces
Reproduction
Add console.error("THIS_MESSAGE_SHOULD_APPEAR") to SanityScreen.js inside Detox test app.
Build the release version with npm run build:os.
Run detox test -c ios.sim.release --record-logs all.
Examine the process.log. There won't be THIS_MESSAGE_SHOULD_APPEAR in the process.log.
This issue is a regression caused by f7d08f5 (PR #1428)
Expected behavior
I should be able to see console.log messages inside device logs taken with --record-logs.
Screenshots
This message will be missing in artifacts/ios.sim.release */Sanity */process.log:
Environment (please complete the following information):
Detox: 15.1.3
React Native: 0.60.5
Node: 12.10.0
Device: iPhone 11 Pro
Xcode: 11.2.1
iOS: 13.2.2
macOS: 10.14.6
The text was updated successfully, but these errors were encountered:
LeoNatan
changed the title
[ios] Log artifacts no longer have stdout/stderr of the launched app
Log artifacts no longer have stdout/stderr of the launched app
Jan 25, 2020
The issue is in the RN logger behavior. Instead of using modern logging facilities, they are using fprintf directly to stderr, which isn't caught by the system logging system. Not sure what the proposed solution should be? We cannot stop collecting the system log, we cannot revert to the old system. We could swizzle somehow the RN logger, but that sounds very error prone, especially if user provides their own logging methods.
I think the only viable solution to this is to open an issue in RN, which I've done: facebook/react-native#27863
Description
The logs produced with the current iOS logs implementation have no stdout/stderr of the simulator, hence critical information is missed (e.g.
console.log()
contents in React Native applications when debugging).Reproduction
console.error("THIS_MESSAGE_SHOULD_APPEAR")
toSanityScreen.js
inside Detox test app.npm run build:os
.detox test -c ios.sim.release --record-logs all
.process.log
. There won't beTHIS_MESSAGE_SHOULD_APPEAR
in theprocess.log
.This issue is a regression caused by f7d08f5 (PR #1428)
Expected behavior
I should be able to see
console.log
messages inside device logs taken with--record-logs
.Screenshots
This message will be missing in
artifacts/ios.sim.release */Sanity */process.log
:Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: