Element Parse error on running appium 1.6.4beta

I was able to work with 1.6.3, but after updating to 1.6.4 it results in element parse error after launching the app. Someone please help me.

Please find the log:
[Appium] Welcome to Appium v1.6.4-beta
[Appium] Non-default server args:
[Appium] deviceName: ‘iPad_38’
[Appium] Deprecated server args:
[Appium] --device-name => --default-capabilities ‘{“deviceName”:“iPad_38”}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] deviceName: ‘iPad_38’
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.4-beta”,“revision”:null}}
[HTTP] <-- GET /wd/hub/status 200 128 ms - 88
[HTTP] --> GET /wd/hub/sessions {}
[debug] [MJSONWP] Calling AppiumDriver.getSessions() with args: []
[debug] [MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 3 ms - 40
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“platformVersion”:“10.2”,“newCommandTimeout”:“7200”,“automationName”:“Appium”,“bundleId”:“com.napa.tbar-staging”,“udid”:“ae1ff4386804bedee222d2d9ede20e81b16b763d”}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“platformName”:“iOS”,“platformVersion”:“10.2”,“newCommandTimeout”:“7200”,“automationName”:“Appium”,“bundleId”:“com.napa.tbar-staging”,“udid”:“ae1ff4386804bedee222d2d9ede20e81b16b763d”},null,null,null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1489674088625 (19:51:28 GMT+0530 (IST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.19.1) session
[Appium] Capabilities:
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘10.2’
[Appium] newCommandTimeout: ‘7200’
[Appium] automationName: ‘Appium’
[Appium] bundleId: ‘com.napa.tbar-staging’
[Appium] udid: ‘ae1ff4386804bedee222d2d9ede20e81b16b763d’
[Appium] deviceName: ‘iPad_38’
[debug] [XCUITest] XCUITestDriver version: 2.19.1
[BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘7200’) to integer (7200). This may cause unexpected behavior
[BaseDriver] Session created with session id: 4daa1ae5-4d0c-4151-8f9e-3560e2793ef2
[Xcode] Failed to get command line tools version: Command ‘pkgutil --pkg-info=com.apple.pkg.CLTools_Executables’ exited with code 1.
[debug] [XCUITest] Xcode version set to ‘8.2.1’ (tools vundefined)
[debug] [XCUITest] iOS SDK Version set to ‘10.2’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1489674089416 (19:51:29 GMT+0530 (IST))
[debug] [XCUITest] Available devices: ae1ff4386804bedee222d2d9ede20e81b16b763d
[debug] [XCUITest] Creating iDevice object with udid ‘ae1ff4386804bedee222d2d9ede20e81b16b763d’
[XCUITest] Determining device to run tests on: udid: ‘ae1ff4386804bedee222d2d9ede20e81b16b763d’, real device: true
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1489674089983 (19:51:29 GMT+0530 (IST))
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1489674089983 (19:51:29 GMT+0530 (IST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1489674089984 (19:51:29 GMT+0530 (IST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1489674090372 (19:51:30 GMT+0530 (IST))
[XCUITest] Setting up real device
[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1489674090374 (19:51:30 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=ae1ff4386804bedee222d2d9ede20e81b16b763d -configuration Debug’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [XCUITest] Log file for xcodebuild test: /Users/qbuser/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/53FE11F2-BDDE-4075-BFB5-207CE3172F06/Session-WebDriverAgentRunner-2017-03-16_195141-XJ959t.log
[debug] [XCUITest] WebDriverAgent successfully started after 13051ms
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1489674108646 (19:51:48 GMT+0530 (IST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.napa.tbar-staging”,“arguments”:[],“environment”:{},“shouldWaitForQuiescence”:true}}
[debug] [JSONWP Proxy] Got response with status 200: {“value”:{“sessionId”:“072D6B50-74FB-4362-A4BA-EACE6032F430”,“capabilities”:{“device”:“ipad”,“browserName”:“STAGING”,“sdkVersion”:“10.2”,“CFBundleIdentifier”:“com.napa.tbar-staging”}},“sessionId”:“072D6B50-74FB-4362-A4BA-EACE6032F430”,“status”:0}
[debug] [BaseDriver] Event ‘wdaSessionStarted’ logged at 1489674110968 (19:51:50 GMT+0530 (IST))
[debug] [XCUITest] Found WDA derived data folder: ‘/Users/qbuser/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy’
[XCUITest] Setting ‘555’ permissions to ‘/Users/qbuser/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/Attachments’ folder
[debug] [XCUITest] Found WDA derived data folder: ‘/Users/qbuser/Library/Developer/Xcode/DerivedData/WebDriverAgent-dsgmwjpjnrxpfpbwhqnmdopuzvir’
[debug] [BaseDriver] Event ‘wdaPermsAdjusted’ logged at 1489674110980 (19:51:50 GMT+0530 (IST))
[debug] [BaseDriver] Event ‘wdaStarted’ logged at 1489674110980 (19:51:50 GMT+0530 (IST))
[debug] [XCUITest] Setting initial orientation to ‘PORTRAIT’
[debug] [JSONWP Proxy] Proxying [POST /orientation] to [POST http://localhost:8100/session/072D6B50-74FB-4362-A4BA-EACE6032F430/orientation] with body: {“orientation”:“PORTRAIT”}
[debug] [JSONWP Proxy] Got response with status 200: {“value”:“Unable To Rotate Device”,“sessionId”:“072D6B50-74FB-4362-A4BA-EACE6032F430”,“status”:777}
[XCUITest] Setting initial orientation failed with: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable To Rotate Device
[debug] [BaseDriver] Event ‘orientationSet’ logged at 1489674116525 (19:51:56 GMT+0530 (IST))
[Appium] New XCUITestDriver session created successfully, session 4daa1ae5-4d0c-4151-8f9e-3560e2793ef2 added to master session list
[debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1489674116526 (19:51:56 GMT+0530 (IST))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {“webStorageEnabled”:false,“locationContextEnabled”:false,“browserName”:"",“platform”:“MAC”,“javascriptEnabled”:true,“databaseEnabled”:false,“takesScreenshot”:true,“networkConnectionEnabled”:false,“platformName”:“iOS”,“platformVersion”:“10.2”,“newCommandTimeout”:“7200”,“automationName”:“Appium”,“bundleId”:“com.napa.tbar-staging”,“udid”:“ae1ff4386804bedee222d2d9ede20e81b16b763d”,“deviceName”:“iPad_38”}
[HTTP] <-- POST /wd/hub/session 200 27903 ms - 476
[HTTP] --> GET /wd/hub/session/4daa1ae5-4d0c-4151-8f9e-3560e2793ef2/source {}
[debug] [MJSONWP] Calling AppiumDriver.getPageSource() with args: [“4daa1ae5-4d0c-4151-8f9e-3560e2793ef2”]
[debug] [XCUITest] Executing command ‘getPageSource’
[debug] [JSONWP Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/072D6B50-74FB-4362-A4BA-EACE6032F430/source] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n “value” : {\n “tree” : {\n “isEnabled” : “1”,\n “isVisible” : “1”,\n “frame” : “{{0, 0}, {768, 1024}}”,\n “children” : [\n {\n “isEnabled” : “1”,\n “isVisible” : “1”,\n “frame” : “{{0, 0}, {1024, 768}}”,\n “children” : [\n {\n “isEnabled” : “1”,\n “isVisible” : “1”,\n “frame” : “{{0, 0}, {1024, 768}}”,\n “children” : [\n {\n “isEnabled” : “1”,\n “isVisible” : “1”,\n “frame” : “{{0, 0}, {1024, 768}}”,\n “children” : [\n {\n “isEnabled” : “1”,\n “isVisible” : “1”,\n “frame” : “{{0, 0}, {1024, 768}}”,\n “children” : [\n {\n “isEnabled” : “1”,\n …
[xmldom error] element parse error: TypeError: source.indexOf is not a function
@#[line:0,col:undefined]
[xmldom error] element parse error: TypeError: source.indexOf is not a function
@#[line:0,col:undefined]
[xmldom error] element parse error: TypeError: source.indexOf is not a function
@#[line:0,col:undefined]
[xmldom error] element parse error: TypeError: source.indexOf is not a function
@#[line:0,col:undefined]

Thank You.

Can you try changing this to ‘XCUITest’?

@wreed From where I can change automation name? I tried by adding new environment variable, but still the log shows automation name as Appium. Could you please help me to change the same to XCUITest?

Without seeing your code it’s impossible for me to imagine how your code works. Please post at least some of what you are doing.