Appium 1.10.0 for IOS - LOG_NO_COLORS Is not working?
See original GitHub issueThe problem
Upgraded to Appium 1.10.0. When Appium Server is started there are ASCII color codes symbols ([37m–>[39m [37mGET[39m [37m) in report (it causes problem in further automatic testing and reporting):
Start output: [Appium] Welcome to Appium v1.10.0
[Appium] Non-default server args:
[Appium] address: 127.0.0.1
[Appium] port: 4735
[Appium] logFile: /Users/cellactqa/Desktop/Logs/appiumServeriPhone6.log
[Appium] localTimezone: true
[Appium] logNoColors: true
[Appium] Appium REST http interface listener started on 127.0.0.1:4735
[HTTP] [37m-->[39m [37mGET[39m [37m/wd/hub/status[39m
[HTTP] [90m{}[39m
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.10.0"}}
[HTTP] [37m<-- GET /wd/hub/status [39m[32m200[39m [90m8 ms - 68[39m
[HTTP] [90m[39m
The same symbols are printed in the following appium reports, so caused Exceptions while reporting to difido server:
01:20:56 Driver info: io.appium.java_client.ios.IOSDriver 01:21:06 Capabilities {app: /Users/cellactqa/Library/De…, automatioTnName: XCUITesP]t ,Dec 16, 2018 1:21:03 AM jsystem.framework.report.RunnerListenersManager report 01:21:06 SEVERE: Fail to report 01:21:06 java.lang.NumberFormatException: For input string: "9 m " 01:21:06 at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
In older versions we used GeneralServerFlag.LOG_NO_COLORS to solve the problem. How should we now to remove these symbols?
Environment
- Appium version 1.10.1
- Last Appium version that did not exhibit the issue: 1.8, 1.9
- Desktop OS/version used to run Appium: macOS Mojave 10.14.1
- Node.js version : 8.12.0
- Mobile platform/version under test: IOS and Android
- Real device or emulator/simulator:
- Appium CLI or Appium.app|exe:
Link to Appium logs
https://gist.github.com/lubshilk/9b56511dd91f27081eef25a8b10addaf
Code To Reproduce Issue
builder = new AppiumServiceBuilder();
builder.withIPAddress(Host);
builder.usingPort(Integer.parseInt(strAppiumPort));
builder.withArgument(GeneralServerFlag.LOCAL_TIMEZONE);
builder.withArgument(GeneralServerFlag.LOG_NO_COLORS);
builder.withLogFile(new File(appiumLogLocation));
// Start the server with the builder
String output = "";
try {
server = AppiumDriverLocalService.buildService(builder);
server.start();
output = server.getStdOut();
report.report("Start output: " + output);
logger.info("Start output: " + output);
} catch (Exception e) {
report.report("Problem to start server: " + e.getMessage(), Reporter.FAIL);
logger.error("Problem to start server: " + e.getMessage());
return false;
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
It should be, yes. When it is published I will note it here.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.