[NSNull doubleValue]: unrecognized selector sent to instance 0x10746eca0 -

[NSNull doubleValue]: unrecognized selector sent to instance 0x10746eca0 - error was returning while try to click on the element.

Platform : IOS
version: 11.1

When i try to get the size of the element using list , it’s returning as 2 but unable to click on the element.

Exception thrown : org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: -[NSNull doubleValue]: unrecognized selector sent to instance 0x10746eca0
05:20:53.555
05:20:53.555 (
05:20:53.555 0 CoreFoundation 0x00000001071a61ab __exceptionPreprocess + 171
05:20:53.555 1 libobjc.A.dylib 0x000000010683bf41 objc_exception_throw + 48
05:20:53.555 2 CoreFoundation 0x0000000107226a34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
05:20:53.555 3 CoreFoundation 0x00000001071290a8 forwarding + 1432
05:20:53.555 4 CoreFoundation 0x0000000107128a88 _CF_forwarding_prep_0 + 120
05:20:53.555 5 WebDriverAgentLib 0x000000011d2e9db9 +[FBElementCommands handleDragCoordinate:] + 729
05:20:53.555 6 WebDriverAgentLib 0x000000011d2c9f33 -[FBRoute_TargetAction mountRequest:intoResponse:] + 179
05:20:53.555 7 WebDriverAgentLib 0x000000011d2c1674 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 548
05:20:53.555 8 RoutingHTTPServer 0x000000011d36dc18 -[RoutingHTTPServer handleRoute:withRequest:response:] + 136
05:20:53.555 9 RoutingHTTPServer 0x000000011d36e4fa __72-[RoutingHTTPServer routeMethod:withPath:parameters:request:connection:]_block_invoke + 47
05:20:53.555 10 libdispatch.dylib 0x000000010bab62b5 _dispatch_client_callout + 8
05:20:53.555 11 libdispatch.dylib 0x000000010bac1999 _dispatch_sync_thread_bound_invoke + 108
05:20:53.555 12 libdispatch.dylib 0x000000010bab62b5 _dispatch_client_callout + 8
05:20:53.555 13 libdispatch.dylib 0x000000010bac0496 _dispatch_main_queue_callback_4CF + 1260
05:20:53.555 14 CoreFoundation 0x0000000107168ee9 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
05:20:53.556 15 CoreFoundation 0x000000010712d592 _CFRunLoopRun + 2402
05:20:53.556 16 CoreFoundation 0x000000010712c9b9 CFRunLoopRunSpecific + 409
05:20:53.556 17 Foundation 0x0000000106237e5e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 274
05:20:53.556 18 WebDriverAgentLib 0x000000011d2c054a -[FBWebServer startServing] + 346
05:20:53.556 19 WebDriverAgentRunner 0x000000011c9e8fbe -[UITestingUITests testRunner] + 126
05:20:53.556 20 CoreFoundation 0x000000010712a49c invoking
+ 140
05:20:53.556 21 CoreFoundation 0x000000010712a370 -[NSInvocation invoke] + 320
05:20:53.556 22 XCTest 0x00000001060efe30 __24-[XCTestCase invokeTest]_block_invoke + 591
05:20:53.556 23 XCTest 0x000000010613917e -[XCUITestContext performInScope:] + 183
05:20:53.556 24 XCTest 0x00000001060efbd6 -[XCTestCase invokeTest] + 141
05:20:53.556 25 XCTest 0x00000001060f0b97 __26-[XCTestCase performTest:]_block_invoke.369 + 42
05:20:53.556 26 XCTest 0x000000010613df25 +[XCTContext runInContextForTestCase:block:] + 163
05:20:53.556 27 XCTest 0x00000001060f0533 -[XCTestCase performTest:] + 608
05:20:53.556 28 XCTest 0x00000001060ec539 __27-[XCTestSuite performTest:]_block_invoke + 363
05:20:53.556 29 XCTest 0x00000001060ebea0 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 26
05:20:53.556 30 XCTest 0x00000001060ec09d -[XCTestSuite performTest:] + 239
05:20:53.556 31 XCTest 0x00000001060ec539 __27-[XCTestSuite performTest:]_block_invoke + 363
05:20:53.556 32 XCTest 0x00000001060ebea0 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 26
05:20:53.556 33 XCTest 0x00000001060ec09d -[XCTestSuite performTest:] + 239
05:20:53.556 34 XCTest 0x00000001060ec539 __27-[XCTestSuite performTest:]_block_invoke + 363
05:20:53.556 35 XCTest 0x00000001060ebea0 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 26
05:20:53.556 36 XCTest 0x00000001060ec09d -[XCTestSuite performTest:] + 239
05:20:53.556 37 XCTest 0x000000010614564f __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 40
05:20:53.556 38 XCTest 0x00000001060ff71a -[XCTestObservationCenter _observeTestExecutionForBlock:] + 475
05:20:53.556 39 XCTest 0x00000001061454ee -[XCTTestRunSession runTestsAndReturnError:] + 281
05:20:53.556 40 XCTest 0x00000001060dbaf1 -[XCTestDriver runTestsAndReturnError:] + 314
05:20:53.557 41 XCTest 0x000000010613d190 _XCTestMain + 619
05:20:53.557 42 CoreFoundation 0x000000010714918c CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12
05:20:53.557 43 CoreFoundation 0x000000010712d96b __CFRunLoopDoBlocks + 203
05:20:53.557 44 CoreFoundation 0x000000010712d144 __CFRunLoopRun + 1300
05:20:53.557 45 CoreFoundation 0x000000010712c9b9 CFRunLoopRunSpecific + 409
05:20:53.557 46 GraphicsServices 0x000000010a4a49c6 GSEventRunModal + 62
05:20:53.557 47 UIKit 0x00000001076215e8 UIApplicationMain + 159
05:20:53.557 48 WebDriverAgentRunner-Runner 0x0000000105e56838 WebDriverAgentRunner-Runner + 6200
05:20:53.557 49 libdyld.dylib 0x000000010bb2ad81 start + 1
05:20:53.557 50 ??? 0x0000000000000005 0x0 + 5
05:20:53.557 ) (WARNING: The server did not provide any stacktrace information)
05:20:53.557 Command duration or timeout: 0 milliseconds
05:20:53.557 Build info: version: ‘3.6.0’, revision: ‘6fbf3ec767’, time: ‘2017-09-27T15:28:36.4Z’
05:20:53.557 System info: host: ‘regression-two.delta.rl.delta.com’, ip: ‘10.5.137.103’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.12.6’, java.version: ‘1.8.0_121’
05:20:53.557 Driver info: io.appium.java_client.ios.IOSDriver
05:20:53.557 Capabilities [{app=/Users/delta/Desktop/common/TestAutomation/FlyDelta_Automation/delta/4.7/iosapp/prod/App/FlyDelta.app, networkConnectionEnabled=false, noReset=false, databaseEnabled=false, deviceName=iPhone 7, platform=MAC, nativeInstrumentsLib=true, platformVersion=11.1, setValue=20000, webStorageEnabled=false, locationContextEnabled=false, browserName=, takesScreenshot=true, javascriptEnabled=true, udid=FA110F27-AD44-4502-A87A-D107DADFED72, platformName=MAC}]
05:20:53.557 Session ID: 06bb96e3-a23a-4dea-aa8f-83372c50609b

Please find the below code snippet.

List elements = getObjects(jsonFileName, available_Trips);
log.info("Element size " + elements.size());
for (WebElement element : elements) {
if (element.isDisplayed()) {
element.click();
} else {
for (int var = 1; var <= 3; var++) {
if (element.isDisplayed()) {
break;
} else {
swipe(0, 350, 23, -470);
}
}
element.click();
}

please advice me on this please.

Thanks,
Thamizh