Google App Engine 中的 'platform method missing' 和 'NoSuchMethod' 错误
'platform method missing' and 'NoSuchMethod' errors in Google App Engine
我有一个 Google App Engine 服务器,它是 运行 Google Cloud Endpoints v1 和 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)
有人可以指点一下吗?
我查看了类似的报告,这些报告表明存在 Guava 依赖项的版本冲突。当运行mvn dependency:tree
时,说明只有一个Guava依赖(v20.0),被Firebase Admin SDK包含。
不知道发生了什么,但用 mvn clean
修复了它。
我有一个 Google App Engine 服务器,它是 运行 Google Cloud Endpoints v1 和 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)
有人可以指点一下吗?
我查看了类似的报告,这些报告表明存在 Guava 依赖项的版本冲突。当运行mvn dependency:tree
时,说明只有一个Guava依赖(v20.0),被Firebase Admin SDK包含。
不知道发生了什么,但用 mvn clean
修复了它。