createSession not working after migrating to appium 2

I was new to appium (1.x) last year, but scrips worked fine using W3C-wireprotocoll but I understand for sure less than half of what I did. Now tried to migrate to appium 2: :flushed: I can’t find a hint for the error I get when I try to create asession analog to appium 1.x (now Appium v2.0.0-beta.71):
[debug] [AppiumDriver@c156] Calling AppiumDriver.createSession() with args: [null,null,{“platformName”:“Android”,“appium:deviceName”:“Android Emulator”,“appium:avd”:“Pixel_3a_API_33_x86_64”,“appium:newCommandTimeout”:6000,“appium:automationName”:“UiAutomator2”}]
[debug] [AppiumDriver@c156] Event ‘newSessionRequested’ logged at 1685044209488 (21:50:09 GMT+0200 (Mitteleuropäische Sommerzeit))
[debug] [AppiumDriver@c156] Event ‘newSessionStarted’ logged at 1685044209489 (21:50:09 GMT+0200 (Mitteleuropäische Sommerzeit))
[debug] [AppiumDriver@c156] Encountered internal error running command: Error: W3C capabilities should be provided
[debug] [AppiumDriver@c156] at parseCapsForInnerDriver (C:\Users\Martin\AppData\Roaming\npm\node_modules\appium\lib\utils.js:68:14)
[debug] [AppiumDriver@c156] at AppiumDriver.createSession (C:\Users\Martin\AppData\Roaming\npm\node_modules\appium\lib\appium.js:251:49)
[debug] [AppiumDriver@c156] at commandExecutor (C:\Users\Martin\AppData\Roaming\npm\node_modules\appium\node_modules@appium\base-driver\lib\basedriver\driver.ts:106:18)
[debug] [AppiumDriver@c156] at AppiumDriver.executeCommand (C:\Users\Martin\AppData\Roaming\npm\node_modules\appium\node_modules@appium\base-driver\lib\basedriver\driver.ts:123:15)
[debug] [AppiumDriver@c156] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [AppiumDriver@c156] at defaultBehavior (C:\Users\Martin\AppData\Roaming\npm\node_modules\appium\lib\appium.js:680:16)
[debug] [AppiumDriver@c156] at AppiumDriver.executeWrappedCommand (C:\Users\Martin\AppData\Roaming\npm\node_modules\appium\lib\appium.js:774:16)
[debug] [AppiumDriver@c156] at AppiumDriver.executeCommand (C:\Users\Martin\AppData\Roaming\npm\node_modules\appium\lib\appium.js:696:17)
[debug] [AppiumDriver@c156] at asyncHandler (C:\Users\Martin\AppData\Roaming\npm\node_modules\appium\node_modules@appium\base-driver\lib\protocol\protocol.js:393:19)

Is this a bug or am I wrong somewhere.
Many thanks in advance.

Make sure you have also updated your client to the most recent version, not only the server

Thx for your reply,
my client is a perl script using http rest api with endpoint:
POST http://127.0.0.1:4723/session
and body:
{ “desiredCapabilities”: {
“platformName” : “Android”,
“appium:deviceName”: “Android Emulator”,
“appium:avd”: “Pixel_3a_API_33_x86_64”,
“appium:newCommandTimeout”: 6000,
“appium:automationName”: “UiAutomator2”
}
}
for me this looks good for appium2.
I get the same error when sending empty desiredCapabilities:
{ “desiredCapabilities”: {}}

unfortunately this won’t work. Appium 2 only supports createSession requests compatible with W3C spec