You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2020-07-13 17:13:56,351 [http-nio-8080-exec-3] ERROR c.p.c.e.GlobalExceptionHandler 112 - 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 $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
at com.google.gson.Gson.fromJson(Gson.java:932)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.google.gson.Gson.fromJson(Gson.java:846)
at com.google.gson.Gson.fromJson(Gson.java:817)
at cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo.fromJson(WxMaPhoneNumberInfo.java:23)
at cn.binarywang.wx.miniapp.api.impl.WxMaUserServiceImpl.getPhoneNoInfo(WxMaUserServiceImpl.java:56)
The text was updated successfully, but these errors were encountered:
简要描述
调用小程序解密用户手机号接口,Gson偶尔出现异常
模块版本情况
详细描述
接口:wxMaService.getUserService().getPhoneNoInfo()
第一次授权手机号时总会异常,第二次就好了,打断点发现报错是解析时会出现乱码导致的
日志
2020-07-13 17:13:56,351 [http-nio-8080-exec-3] ERROR c.p.c.e.GlobalExceptionHandler 112 - 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 $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
at com.google.gson.Gson.fromJson(Gson.java:932)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.google.gson.Gson.fromJson(Gson.java:846)
at com.google.gson.Gson.fromJson(Gson.java:817)
at cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo.fromJson(WxMaPhoneNumberInfo.java:23)
at cn.binarywang.wx.miniapp.api.impl.WxMaUserServiceImpl.getPhoneNoInfo(WxMaUserServiceImpl.java:56)
The text was updated successfully, but these errors were encountered: