binarywang/weixin-java-miniapp-demo

获取小程序手机号报错

MadWorldLv opened this issue · 5 comments

Caused by: java.lang.IllegalStateException: Serialized class cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo$Watermark must implement java.io.Serializable

看来是没有序列化,是你自己程序的问题,为什么要序列化?

你在wxjava上提个issue吧,后续加一下序列化实现,满足你的这种需求

调用wxService.getUserService().getPhoneNoInfo(session.getSessionKey(), encryptedData, iv);
出现如下报错:再授权一次就好了
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

这个最新版本已经加上序列化了

请问,weixin-java-miniapp的3.9.0版本,去掉了cn.binarywang.wx.miniapp.bean.WxMaTemplateMessage这个类了吗???它的替代类是哪个??