Detox: Unable to tap, or type or replaceText() UISearchBar

Created on 30 Oct 2020  ·  18Comments  ·  Source: wix/Detox

Description

This issue has been fixed in: https://github.com/wix/Detox/issues/1889
But it seems to be happen again in iOS 14.1 (xCode 12)

Environment (please complete the following information):

  • Detox: 17.10.6
  • React Native: 0.60.5
  • Node: 10
  • Device: iPhone 12
  • Xcode: 12.1
  • iOS: 14.1
  • macOS: Catalina 10.15.6
acceptebug ios

All 18 comments

Please test with RN63 and above. There are known issues with old RN and iOS 14 and above. Thanks.

hi @LeoNatan

Still happen on latest version, I've tried on
RN: 0.63.3
Detox: 17.11.0

This is my new project:
testSearchBar.zip

OK, thanks, I will take a look

I see some problem on iOS 14 that doesn't reproduce on iOS 13. Investigating.

Fixed

Fix is now out in Detox 17.11.1. Please try it and let me know if it worked.

hi @LeoNatan ,
Thank you so much for your fixing. Work perfect for function typeText(), but when I've tried with replaceText(). It crashed.
testSearchBar.zip

Can you post the crash stack trace?

Here is the crash stack trace:
detox[13896] ERROR: [Detox.js/APP_CRASH] App crashed in test 'Example should show hello screen after tap', here are the crash details: Exception was thrown: NSInvalidArgumentException -[RNSearchBar replaceRange:withText:]: unrecognized selector sent to instance 0x7fed3ae37210 ( 0 CoreFoundation 0x00007fff2043a116 __exceptionPreprocess + 226 1 libobjc.A.dylib 0x00007fff20177f78 objc_exception_throw + 48 2 CoreFoundation 0x00007fff20448c6f +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0 3 UIKitCore 0x00007fff246a2414 -[UIResponder doesNotRecognizeSelector:] + 292 4 CoreFoundation 0x00007fff2043e666 ___forwarding___ + 1489 5 CoreFoundation 0x00007fff20440698 _CF_forwarding_prep_0 + 120 6 Detox 0x00000001062e51d5 -[UIView(Detox) dtx_replaceText:] + 585 7 Detox 0x00000001062f38c0 merged Detox.TypeTextAction.perform(on: Detox.Element) -> Swift.Optional<Swift.Dictionary<Swift.String, Any>> + 192 8 Detox 0x00000001062f3909 vtable thunk for Detox.Action.(perform in _04ABBB5C7C570871DB67625EF38728EC)(on: Detox.Element) -> Swift.Optional<Swift.Dictionary<Swift.String, Any>> dispatching to Detox.ReplaceTextAction.perform(on: Detox.Element) -> Swift.Optional<Swift.Dictionary<Swift.String, Any>> + 9 9 Detox 0x00000001062f2cff Detox.Action.(perform in _04ABBB5C7C570871DB67625EF38728EC)(on: Detox.Element, completionHandler: (Swift.Optional<Swift.Dictionary<Swift.String, Any>>, Swift.Optional<Swift.Error>) -> ()) -> () + 31 10 Detox 0x00000001062f6efa partial apply forwarder for closure #1 () -> () in Detox.Action.perform(completionHandler: (Swift.Optional<Swift.Dictionary<Swift.String, Any>>, Swift.Optional<Swift.Error>) -> ()) -> () + 42 11 Detox 0x00000001062f6f41 partial apply forwarder for reabstraction thunk helper from @callee_guaranteed () -> () to @escaping @callee_guaranteed () -> () + 17 12 Detox 0x00000001062f669e reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @callee_unowned @convention(block) () -> () + 14 13 Detox 0x00000001062ebc1e +[DTXAssertionHandler try:error:] + 47 14 Detox 0x00000001062f2e19 Detox.Action.perform(completionHandler: (Swift.Optional<Swift.Dictionary<Swift.String, Any>>, Swift.Optional<Swift.Error>) -> ()) -> () + 249 15 Detox 0x00000001062fe75e function signature specialization <Arg[1] = Dead> of function signature specialization <Arg[1] = [Closure Propagated : closure #1 (Swift.Optional<Swift.Dictionary<Swift.String, Any>>, Swift.Optional<Swift.Error>) -> () in closure #2 () -> () in Detox.DetoxManager.webSocket(_: Detox.WebSocket, didReceiveAction: Swift.String, params: Swift.Dictionary<Swift.String, Any>, messageId: __C.NSNumber) -> (), Argument Types : [Detox.DetoxManager__C.NSNumber]> of static Detox.InvocationManager.invoke(dictionaryRepresentation: Swift.Dictionary<Swift.String, Any>, completionHandler: (Swift.Optional<Swift.Dictionary<Swift.String, Any>>, Swift.Optional<Swift.Error>) -> ()) -> () + 766 16 Detox 0x00000001062f4799 reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) () -> () + 25 17 EarlGrey 0x000000010714c64d __59-[GREYUIThreadExecutor executeSyncWithTimeout:block:error:]_block_invoke + 109 18 EarlGrey 0x00000001070fd0d8 __54-[GREYRunLoopSpinner grey_checkConditionInActiveMode:]_block_invoke + 472 19 CoreFoundation 0x00007fff203a85db __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12 20 CoreFoundation 0x00007fff203a79ef __CFRunLoopDoBlocks + 434 21 CoreFoundation 0x00007fff203a23e8 __CFRunLoopRun + 863 22 CoreFoundation 0x00007fff203a1b9e CFRunLoopRunSpecific + 567 23 EarlGrey 0x00000001070fcdcd -[GREYRunLoopSpinner grey_checkConditionInActiveMode:] + 381 24 EarlGrey 0x00000001070fba32 -[GREYRunLoopSpinner spinWithStopConditionBlock:] + 434 25 EarlGrey 0x000000010714bd78 -[GREYUIThreadExecutor executeSyncWithTimeout:block:error:] + 1384 26 EarlGrey 0x000000010714b7c7 -[GREYUIThreadExecutor executeSync:error:] + 311 27 Detox 0x00000001062ce6de __45-[EarlGreyImpl(Detox) detox_safeExecuteSync:]_block_invoke + 141 28 CoreFoundation 0x00007fff203a85db __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12 29 CoreFoundation 0x00007fff203a79ef __CFRunLoopDoBlocks + 434 30 CoreFoundation 0x00007fff203a2a6d __CFRunLoopRun + 2532 31 CoreFoundation 0x00007fff203a1b9e CFRunLoopRunSpecific + 567 32 GraphicsServices 0x00007fff2b793db3 GSEventRunModal + 139 33 UIKitCore 0x00007fff2466d40f -[UIApplication _run] + 912 34 Detox 0x00000001062db4eb __detox_UIApplication_run + 365 35 UIKitCore 0x00007fff24672320 UIApplicationMain + 101 36 testSearchBar 0x0000000103715170 main + 112 37 libdyld.dylib 0x00007fff20257409 start + 1 )

Screen Shot 2020-11-10 at 10 20 28

Huh, strange.
Can you please open a new issue? I will look to fix it. This is unrelated to the original reported here.
Thanks

Thank you, I will test with this.

Fix out in Detox 17.11.3

Thank you, please do the update on NPM <3 <3

@hqdai, thanks for raising this 👍 — apparently, we've run into an issue with publishing that package on NPM. We'll look into it as soon as possible.

🤦‍♂️Apologies. We’ll fix this as soon as possible.

It works perfect. Thank you for your updating <3

Was this page helpful?
0 / 5 - 0 ratings