From 94fb5a77235e7cfb714dc17fe784ef74526609d9 Mon Sep 17 00:00:00 2001 From: Vishwa Patel <65196748+Vishwa-Mozilla@users.noreply.github.com> Date: Thu, 14 May 2020 16:02:08 -0400 Subject: [PATCH] No Issue: Update Readme with steps to fix prepush hooks error (#10638) * Steps to fix prepush hooks error Updating Readme to include fix to error "Could not initialize class org.codehaus.groovy.runtime.InvokerHelper" which came up while running prepush hooks with Java version 14 on Mac --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index f5bab3139..c4e4c6b96 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,17 @@ To push without running the pre-push hook (e.g. doc updates): git push --no-verify ``` +Note: If while pushing you encounter this error "Could not initialize class org.codehaus.groovy.runtime.InvokerHelper" and are currently on Java14 then downgrading your Java version to Java13 or lower can resolve the issue + +Steps to downgrade Java Version on Mac with Brew: +1. Install Homebrew (https://brew.sh/) +2. run ```brew update``` +3. To uninstall your current java version, run ```sudo rm -fr /Library/Java/JavaVirtualMachines/``` +4. run ```brew tap homebrew/cask-versions``` +5. run ```brew search java``` +6. If you see java11, then run ```brew install java11``` +7. Verify java-version by running ```java -version``` + ## local.properties helpers There are multiple helper flags available via `local.properties` that will help speed up local development workflow when working across multiple layers of the dependency stack - specifically, with android-components, geckoview or application-services.