HTTP Status: '404' -> incorrect JSON status mapping for 'unknown error' (500 expected)

When I run 10 test cases, it will occurs error randomly:
HTTP Status: ‘404’ → incorrect JSON status mapping for ‘unknown error’ (500 expected)

This is the log:

[main] INFO net.serenitybdd.core.Serenity - TEST NUMBER: 6
[main] INFO net.thucydides.core.steps.ConsoleLoggingListener - STARTING STEP Client browse client page
[main] INFO net.thucydides.core.steps.ConsoleLoggingListener - STARTING STEP Client opens the Client start page
Oct 29, 2020 2:53:59 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: ‘404’ → incorrect JSON status mapping for ‘unknown error’ (500 expected)
[main] WARN net.thucydides.core.webdriver.WebDriverFacade - Failed to take screenshot (An unknown error has occurred
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘6780-ANHPV-LT-D’, ip: ‘192.168.10.63’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_251’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities {autoLaunch: true, automationName: XCUITest, browserName: Safari, chromedriverExecutableDir: /Users/pbox/headspinio-pbox…, databaseEnabled: false, deviceName: iPhone SE, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: false, newCommandTimeout: 600, platform: MAC, platformName: iOS, platformVersion: 14.0.1, takesScreenshot: true, udid: e0206ad9dc16040d8892fcf2a6d…, useFirstMatch: true, webDriverAgentUrl: http://localhost:1817, webStorageEnabled: false}
Session ID: f67b6d3d-19b8-11eb-9b47-f01898e9a36a)
Oct 29, 2020 2:53:59 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: ‘404’ → incorrect JSON status mapping for ‘unknown error’ (500 expected)
[main] INFO net.thucydides.core.steps.ConsoleLoggingListener - STEP ERROR: net.serenitybdd.core.exceptions.SerenityManagedException: The following error occurred: An unknown error has occurred
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘6780-ANHPV-LT-D’, ip: ‘192.168.10.63’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_251’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities {autoLaunch: true, automationName: XCUITest, browserName: Safari, chromedriverExecutableDir: /Users/pbox/headspinio-pbox…, databaseEnabled: false, deviceName: iPhone SE, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: false, newCommandTimeout: 600, platform: MAC, platformName: iOS, platformVersion: 14.0.1, takesScreenshot: true, udid: e0206ad9dc16040d8892fcf2a6d…, useFirstMatch: true, webDriverAgentUrl: http://localhost:1817, webStorageEnabled: false}
Session ID: f67b6d3d-19b8-11eb-9b47-f01898e9a36a
Oct 29, 2020 2:53:59 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: ‘404’ → incorrect JSON status mapping for ‘unknown error’ (500 expected)

And this is my IOSDriver:

try {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, “iOS”);
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, LoadConfig.getIOSPlatformVersion());
capabilities.setCapability(MobileCapabilityType.UDID, LoadConfig.getIOSUdid());
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, LoadConfig.getIOSAutomationName());
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, “Safari”);
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, LoadConfig.getIOSDeviceName());
capabilities.setCapability(“newCommandTimeout”, LoadConfig.getAppiumCommandTimeout());
capabilities.setCapability(“nativeInstrumentsLib”, true);
capabilities.setCapability(“useFirstMatch”, true);

URL url = new URL(LoadConfig.getAppiumHub());
IOSDriver iosDriver = new IOSDriver(url, capabilities);

return iosDriver;

} catch (Exception e) {
throw new Error(e);
}

How did you resolved this issue ?