Skip to content

miniapp 模块 发送模板消息, 解析微信服务器返回结果空指针 #260

Closed

Description

@ruying408

java.lang.NullPointerException: null at cn.binarywang.wx.miniapp.api.impl.WxMaMsgServiceImpl.sendTemplateMsg(WxMaMsgServiceImpl.java:34) ~[weixin-java-miniapp-2.7.0.jar:na]
at com.github.binarywang.demo.wechat.controller.WxPortalController.sendMsg(WxPortalController.java:108) ~[classes/:1.0.0-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]

Activity

  1. kareanyi commented on Jun 29, 2017

    @kareanyi

    看了下文档,这里取错了
    if (jsonObject.get("errcode").getAsInt() == 0) {
    return jsonObject.get("msgid").getAsString();
    }

    文档上写的是
    {
    "errcode": 0,
    "errmsg": "ok",
    }

  2. binarywang commented on Jun 29, 2017

    @binarywang
    Owner

    我看了下,确实是有问题,这块儿忘了仔细核对,从公众号代码那里参考过来的。

  3. added 2 commits that reference this issue on Jun 29, 2017
  4. kareanyi commented on Jun 30, 2017

    @kareanyi

    嗯,那块应该就不用return了

  5. binarywang commented on Jul 2, 2017

    @binarywang
    Owner

    2.7.2.BETA版本已修复

  6. added 2 commits that reference this issue on Sep 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions