'Getting error while running Appium on Mac

Getting below error while running Appium

Encountered internal error running command: Error: Cannot verify the signature of '/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.24.0.apk'. Original error: The JAVA_HOME location '$(/usr/libexec/java_home)' must exist



Solution 1:[1]

Had the same mistake a while ago, try using this on terminal.

 xattr -cr "/Applications/Appium Server GUI.app"
 codesign --deep --sign - /Applications/Appium\ Server\ GUI.app

it should solve the error, it did for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1