首页 > 解决方案 > 带有谷歌包的奇怪 NullPointerException WebSocketHandshake.verifyServerHandshakeHeaders

问题描述

在我更新了 android studio 3.0->3.2 以开始使用 google bundles apk 之后,我收到了这个奇怪的错误

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
       at com.google.firebase.database.tubesock.WebSocketHandshake.verifyServerHandshakeHeaders(SourceFile:111)
       at com.google.firebase.database.tubesock.WebSocket.runReader(SourceFile:418)
       at com.google.firebase.database.tubesock.WebSocket.access$000(SourceFile:47)
       at com.google.firebase.database.tubesock.WebSocket$2.run(SourceFile:143)
       at java.lang.Thread.run(Thread.java:818)

奇怪的是:

在我将 apk 包上传到 google play 后,此错误会在 30-50 次之间注册(因此尚无法在 Play 商店下载)

100% 记录此错误的设备是:

Device
Brand: LGE
Model: Nexus 5X
Orientation: Portrait
RAM free: 3.19 GB
Disk free: 2.04 GB
Operating System
Version: 6.0.1
Orientation: Portrait
Rooted: Yes

并且错误只是在上传后的这些初始时间发生......在正常运行情况下没有其他人得到

这似乎是谷歌上的一个错误,但这很烦人,因为每次我关闭应用程序更新时,它都会向我发送一条警报,说“错误又回来了”

有谁知道它是什么?怎么解决?

标签: androidandroid-studionullpointerexceptionandroid-app-bundle

解决方案


这似乎是 Google Play 在某些设备上测试您的应用程序是否存在恶意软件。这个特定的设备似乎有一些东西会触发 Firebase 中的错误。


推荐阅读