question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[WDA] XCElementSnapshot fb_valueForWDAttributeName:]: unrecognized selector sent to instance 0x600003f30b60

See original GitHub issue

The problem

value and name attribute raised the below error maybe since https://github.com/appium/WebDriverAgent/pull/596

Minitest::UnexpectedError:         Selenium::WebDriver::Error::UnknownError: An unknown server-side error occurred while processing the command. Original error: -[XCElementSnapshot fb_valueForWDAttributeName:]: unrecognized selector sent to instance 0x600003f30b60
            UnknownError: An unknown server-side error occurred while processing the command. Original error: -[XCElementSnapshot fb_valueForWDAttributeName:]: unrecognized selector sent to instance 0x600003f30b60
                at errorFromW3CJsonCode (/Users/runner/runners/2.204.0/appium/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:923:25)
                at ProxyRequestError.getActualError (/Users/runner/runners/2.204.0/appium/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:798:14)
                at JWProxy.command (/Users/runner/runners/2.204.0/appium/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
                at runMicrotasks (<anonymous>)
                at processTicksAndRejections (node:internal/process/task_queues:96:5)
                at XCUITestDriver.proxyCommand (/Users/runner/runners/2.204.0/appium/node_modules/appium-xcuitest-driver/lib/commands/proxy-helper.js:95:12)
                at XCUITestDriver.getNativeAttribute (/Users/runner/runners/2.204.0/appium/node_modules/appium-xcuitest-driver/lib/commands/element.js:58:15)
                at XCUITestDriver.getAttribute (/Users/runner/runners/2.204.0/appium/node_modules/appium-xcuitest-driver/lib/commands/element.js:70:12)

https://dev.azure.com/AppiumCI/Appium CI/_build/results?buildId=22560&view=logs&j=4fb3a4db-6fd8-54a2-5c9f-0d6cc4b8481f&t=95259bc6-ab61-5670-779d-7f363f707884

Environment

  • Appium version (or git revision) that exhibits the issue: appium 2, XCUITestDriver (v4.7.3)
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium:
  • Node.js version (unless using Appium.app|exe): nodejs16
  • Npm or Yarn package manager:
  • Mobile platform/version under test:
  • Real device or emulator/simulator: ios 14.2 simulator, xcode 12
  • Appium CLI or Appium.app|exe:

Details

https://github.com/appium/ruby_lib_core/blob/master/test/functional/ios/driver_test.rb#L73-L76 is the scenario.

    def test_wait_until_true_driver
      e = @@driver.wait_until_true { |d| d.find_element :accessibility_id, uicatalog }
      assert e.name
    end

Link to Appium logs

appium server log to get name attribute:

2022-07-14 17:08:04:114 - [HTTP] --> GET /wd/hub/session/c8ab296f-68f2-45bb-a1e5-6b3a0d22626f/element/01000000-0000-0000-A323-000000000000/attribute/name
2022-07-14 17:08:04:114 - [HTTP] {}
2022-07-14 17:08:04:117 - [debug] [XCUITestDriver@0642 (c8ab296f)] Calling AppiumDriver.getAttribute() with args: ["name","01000000-0000-0000-A323-000000000000","c8ab296f-68f2-45bb-a1e5-6b3a0d22626f"]
2022-07-14 17:08:04:117 - [AppiumDriver@a26a] Plugins which can handle cmd 'getAttribute': images
2022-07-14 17:08:04:117 - [AppiumDriver@a26a] Plugin images is now handling cmd 'getAttribute'
2022-07-14 17:08:04:117 - [AppiumDriver@a26a] Executing default handling behavior for command 'getAttribute'
2022-07-14 17:08:04:117 - [debug] [XCUITestDriver@0642 (c8ab296f)] Executing command 'getAttribute'
2022-07-14 17:08:04:119 - [debug] [XCUITestDriver@0642 (c8ab296f)] Matched '/element/01000000-0000-0000-A323-000000000000/attribute/name' to command name 'getAttribute'
2022-07-14 17:08:04:119 - [debug] [XCUITestDriver@0642 (c8ab296f)] Proxying [GET /element/01000000-0000-0000-A323-000000000000/attribute/name] to [GET http://127.0.0.1:8100/session/70CB339D-57B6-4A62-A789-DEA58FB388E5/element/01000000-0000-0000-A323-000000000000/attribute/name] with no body
2022-07-14 17:08:04:193 - [XCUITestDriver@0642 (c8ab296f)] Got response with status 500: {"value":{"error":"unknown error","message":"-[XCElementSnapshot fb_valueForWDAttributeName:]: unrecognized selector sent to instance 0x600003f30b60","traceback":"(\n\t0   CoreFoundation                      0x00007fff2041daf2 __exceptionPreprocess + 242\n\t1   libobjc.A.dylib                     0x00007fff20177e78 objc_exception_throw + 48\n\t2   CoreFoundation                      0x00007fff2042c6f7 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0\n\t3   CoreFoundation                      0x00007fff20422032 ___forwarding___ + 1489\n\t4   CoreFoundation                      0x00007fff20424068 _CF_forwarding_prep_0 + 120\n\t5   WebDriverAgentLib                   0x0000000109aa42f0 +[FBElementCommands handleGetAttribute:] + 1200\n\t6   WebDriverAgentLib                   0x0000000109a26836 -[FBRoute_TargetAction mountRequest:intoResponse:] + 182\n\t7   WebDriverAgentLib                   0x0000000109a0d138 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 536\n\t8   WebDriverAgentLib  ...
2022-07-14 17:08:04:194 - [debug] [W3C] Matched W3C error code 'unknown error' to UnknownError
2022-07-14 17:08:04:260 - [debug] [XCUITestDriver@0642 (c8ab296f)] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: -[XCElementSnapshot fb_valueForWDAttributeName:]: unrecognized selector sent to instance 0x600003f30b60
2022-07-14 17:08:04:260 - [debug] [XCUITestDriver@0642 (c8ab296f)]     at errorFromW3CJsonCode (/Users/runner/runners/2.204.0/appium/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:923:25)
2022-07-14 17:08:04:260 - [debug] [XCUITestDriver@0642 (c8ab296f)]     at ProxyRequestError.getActualError (/Users/runner/runners/2.204.0/appium/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:798:14)
2022-07-14 17:08:04:261 - [debug] [XCUITestDriver@0642 (c8ab296f)]     at JWProxy.command (/Users/runner/runners/2.204.0/appium/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
2022-07-14 17:08:04:261 - [debug] [XCUITestDriver@0642 (c8ab296f)]     at runMicrotasks (<anonymous>)
2022-07-14 17:08:04:261 - [debug] [XCUITestDriver@0642 (c8ab296f)]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-07-14 17:08:04:261 - [debug] [XCUITestDriver@0642 (c8ab296f)]     at XCUITestDriver.proxyCommand (/Users/runner/runners/2.204.0/appium/node_modules/appium-xcuitest-driver/lib/commands/proxy-helper.js:95:12)
2022-07-14 17:08:04:261 - [debug] [XCUITestDriver@0642 (c8ab296f)]     at XCUITestDriver.getNativeAttribute (/Users/runner/runners/2.204.0/appium/node_modules/appium-xcuitest-driver/lib/commands/element.js:58:15)
2022-07-14 17:08:04:261 - [debug] [XCUITestDriver@0642 (c8ab296f)]     at XCUITestDriver.getAttribute (/Users/runner/runners/2.204.0/appium/node_modules/appium-xcuitest-driver/lib/commands/element.js:70:12)
2022-07-14 17:08:04:262 - [HTTP] <-- GET /wd/hub/session/c8ab296f-68f2-45bb-a1e5-6b3a0d22626f/element/01000000-0000-0000-A323-000000000000/attribute/name 500 148 ms - 1460
2022-07-14 17:08:04:262 - [HTTP] 

Code To Reproduce Issue [ Good To Have ]

Calls get an attribute request

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
KazuCocoacommented, Jul 15, 2022

No, you could try out 4.7.4 XCTest driver by updating your local xcuitest, or re-install xcuitest driver.

0reactions
StephanB75commented, Jul 15, 2022

No, you could try out 4.7.4 XCTest driver by updating your local xcuitest, or re-install xcuitest driver.

To give feedback. It seems to work now 😃 Thx for the quick fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

"unrecognized selector sent to instance" error in Objective-C
It looks like you're not memory managing the view controller properly and it is being deallocated at some point - which causes the...
Read more >
unrecognized selector sent to ins… | Apple Developer Forums
unrecognized selector sent to instance 0x7fd5966131a0". You're now watching this thread and will receive emails when there's activity.
Read more >
Fixing "Unrecognized Selector Sent To Instance" Error In Xcode
One of the most common errors in Xcode is “Unrecognized Selector Sent To Instance“. Today I will try to explain the reason why...
Read more >
Unrecognized selector sent to instance on joinMeeting() - iOS
Description Joining meeting on Xcode 14 and iphone 12 and iOS 15.6 is crashing, please let me know if you need more details....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found