Firebase Admin SDK Causing "Cannot find or load main class"

Viewed 207

Gradle dependency: implementation 'com.google.firebase:firebase-admin:7.0.0' (7.01, Downgraded to try, same result) Java Version: 8, 11, 13 (Tried All Three) IDE: IntelliJ Community 2020 1.4 Gradle: 6.3

After adding the above dependency, my jar no longer loads while trying to start it via command line from an artifact jar. It works fine in the IDE, but as soon as I create an artifact it fails. Trying to start it with the dependency leads to a "Cannot find or load main class error". I have tried multiple times adding and removing, every time I remove it everything works fine, but as soon as I add it it does not work anymore. I cannot find much on the subject, I found one suggesting that it may be signed causing an issue but I am not sure how to fix that. I am using this in my backend server to send push notifications to client's, I know there is other ways to accomplish this without this sdk, but I would like to use it for future things as well but I cant get past this issue.

Any thoughts on how to fix this error?

Edit* Version 6.13.0 Works for me, this is the highest version that works. Looking at the 6.14.0 patch notes, it looks like:

"Upgraded other SDK dependencies. Netty, Google API Client, Google HTTP Client, Google API Common, and JSON libraries that the SDK depends on have been upgraded to more recent versions."

"Upgraded Cloud Storage dependency version to 1.108.0."

"Upgraded Cloud Firestore dependency version to 1.34.0."

"Added FcmOptions in MulticastMessage"

"Added support for direct_boot_ok parameter."

Are what is causing the main class issue

0 Answers
Related