Appium issue with init elements in AppStore

Hi everyone,

Help me please with one issue about init elements in AppStore on iPhones. I should write a test that goes into AppStore and logins as Apple User (I have separate Apple ID) but I get every time the same mistake.

org.openqa.selenium.WebDriverException: Unable to communicate to node (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘Annas-MacBook-Pro.local’, ip: ‘fe80:0:0:0:4:17b1:124:ed9e%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.4’, java.version: ‘1.8.0_161’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities {64bit: false, acceptSslCert: false, acceptSslCerts: false, appiumVersion: 7.3.0, appium_port: 8081, autoAcceptAlerts: true, automationName: XCUITest, bootstrapPath: /usr/local/.browserstack/co…, browser: iphone, browserName: safari, browser_name: Safari, browserstack.acceptInsecureCerts: true, browserstack.appiumLogs: true, browserstack.appium_version: 1.16.0, browserstack.debug: true, browserstack.ie.noFlash: false, browserstack.isTargetBased: true, browserstack.networkLogs: true, browserstack.safari.enablePopups: true, browserstack.seleniumLogs: true, browserstack.tunnelIdentifier: , browserstack.video: true, browserstack.video.disableWaterMark: true, buildName: Swagbuks Mobile Apple Build, databaseEnabled: false, detected_language: selenium/3.141.59 (java mac), device: iphone, deviceName: iPhone 8, deviceOrientation: portrait, javascriptEnabled: true, locationContextEnabled: false, mobile: {browser: mobile, version: iPhone 8-13.2}, networkConnectionEnabled: false, newCommandTimeout: 2000, new_bucketing: true, noReset: true, orientation: PORTRAIT, orig_os: ios, os_version: 13, platform: MAC, platformName: iOS, platformVersion: 12.1, projectName: Swagbuks tests, proxy_type: node, realMobile: true, real_mobile: true, safariIgnoreFraudWarning: true, safariInitialUrl: http://mobile-internet-chec…, sessionName: Apple Mobile Test id=Wed Ma…, startIWDP: true, takesScreenshot: true, udid: 23ee1f36ddf04c16b649389a48e…, useNewWDA: true, useXctestrunFile: true, version: , wda_port: 28401, webStorageEnabled: false, webkitResponseTimeout: 20000}
Session ID: 067f6782a67e3c96f559c1997d58ef1c4fb971d7
*** Element info: {Using=name, value=My Account}

My code is:

iosDriver = new IOSDriver(new URL(URL), setMobDriver());

private void getAppStoreMob(IOSDriver iosDriver) {
    logger.debug("Start activation AppStore app");
    HashMap<String, Object> args = new HashMap<>();
    args.put("bundleId", "com.apple.AppStore");
    iosDriver.executeScript("mobile: launchApp", args);
    iosDriver.activateApp("com.apple.AppStore");
    iosDriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);
}

public void verifyAppleID(IOSDriver iosDriver) {
    logger.debug("Start verifying AppleID user");
    getAppStoreMob(iosDriver);
    logger.debug("Go into My Account in AppStore");
    IOSElement getMyAccount = (IOSElement) new WebDriverWait(iosDriver, 30).until(
            ExpectedConditions.visibilityOfElementLocated(MobileBy.name(MY_ACCOUNT_BUTTON_NAME)));
    getMyAccount.submit();
    logger.debug("Type AppleID");
    IOSElement getAppleIDFolder = (IOSElement) new WebDriverWait(iosDriver, 30).until(
            ExpectedConditions.elementToBeClickable(MobileBy.AccessibilityId(APPLE_ID_FOLDER_NAME)));
    getAppleIDFolder.sendKeys(appleID);
    logger.debug("Type Password");
    IOSElement getAppleIDPass = (IOSElement) new WebDriverWait(iosDriver, 30).until(
            ExpectedConditions.elementToBeClickable(MobileBy.name(APPLE_ID_PASS_FOLDER_NAME)));
    getAppleIDPass.sendKeys(appleIdPass);
    logger.debug("Tap Submit button");
    IOSElement getSignIn = (IOSElement) new WebDriverWait(iosDriver, 30).until(
            ExpectedConditions.elementToBeClickable(MobileBy.name(SIGN_IN_BUTTON_NAME)));
    getSignIn.submit();
    iosDriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
    logger.debug("Tap Done button");
    IOSElement getDone = (IOSElement) new WebDriverWait(iosDriver, 30).until(
            ExpectedConditions.elementToBeClickable(MobileBy.name(DONE_BUTTON_NAME)));
    getDone.submit();
}

The test fails on init of the first element “My Account”. I tried other drivers (RemoteWebDriver, AppiumDvriver) but the test still crashes. Can you help me?