Google App Engine中的“平台方法缺失”和“NoSuchMethod”错误

时间:2017-08-12 20:58:58

标签: java maven google-app-engine firebase firebase-admin

我有一台运行Google Cloud Endpoints v1的Google App Engine服务器和Firebase Admin SDK。

当我的移动应用程序访问其中一个云端点时,我一直在服务器上收到以下错误,特别是生成HTTP请求的端点(不确定这是否相关)。但是,从应用程序访问的所有其他云端点都正常工作。

com.google.appengine.repackaged.com.google.protobuf.UnsafeUtil supportsUnsafeByteBufferOperations
WARNING: platform method missing - proto runtime falling back to safer methods: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.misc")
com.google.appengine.repackaged.com.google.protobuf.UnsafeUtil supportsUnsafeArrayOperations
WARNING: platform method missing - proto runtime falling back to safer methods: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.misc")
com.google.appengine.repackaged.com.google.protobuf.UnsafeUtil supportsUnsafeCopyMemory
WARNING: copyMemory is missing from platform - proto runtime falling back to safer methods.
com.google.api.server.spi.SystemServiceServlet init
INFO: SPI restricted: true
com.google.api.server.spi.SystemService invokeServiceMethod
SEVERE: exception occurred while calling backend method
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;)V
    at com.google.firebase.FirebaseApp.checkNotDeleted(FirebaseApp.java:314)
    at com.google.firebase.FirebaseApp.getOptions(FirebaseApp.java:260)
    at com.google.firebase.auth.FirebaseAuth.<init>(FirebaseAuth.java:74)
    at com.google.firebase.auth.FirebaseAuth.<init>(FirebaseAuth.java:61)
    at com.google.firebase.auth.FirebaseAuth.<init>(FirebaseAuth.java:52)
    at com.google.firebase.auth.FirebaseAuth$FirebaseAuthService.<init>(FirebaseAuth.java:316)
    at com.google.firebase.auth.FirebaseAuth.getInstance(FirebaseAuth.java:98)
    at com.google.firebase.auth.FirebaseAuth.getInstance(FirebaseAuth.java:85)

有人可以提供建议吗?

我查看了类似的报告,这些报告表明存在相互矛盾的番石榴依赖版本。运行mvn dependency:tree时,它显示只有一个Guava依赖项(v20.0),它包含在Firebase Admin SDK中。

1 个答案:

答案 0 :(得分:0)

不知道发生了什么,但用mvn clean修复了它。