Update the WebDriverAgent to latest version. Download the latest WebDriverAgent from https://github.com/appium/WebDriverAgent/releases/tag/v4.9.0 and replace the old Webdriveragent folder with the latest, from this path Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules.