JeffreySu / WeiXinMPSDK

微信全平台 .NET SDK, Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 8.0。已支持微信公众号、小程序、小游戏、微信支付、企业微信/企业号、开放平台、JSSDK、微信周边等全平台。 WeChat SDK for C#.
https://weixin.senparc.com
Apache License 2.0
8.43k stars 4.35k forks source link

Tencent.WXBizMsgCrypt.DictionarySort.Compare异常System.NullReferenceException #270

Closed lishewen closed 7 years ago

lishewen commented 7 years ago

今天看日志发现的异常,但貌似不影响系统运作

ExceptionType System.NullReferenceException Method Tencent.WXBizMsgCrypt.DictionarySort.Compare(Object oLeft, Object oRight)

Stack Trace

System.InvalidOperationException: Failed to compare two elements in the array.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Tencent.WXBizMsgCrypt.DictionarySort.Compare(System.Object oLeft, System.Object oRight) at offset 7
at System.Array.SorterObjectArray.InsertionSort(System.Int32 lo, System.Int32 hi) at offset 96
at System.Array.SorterObjectArray.IntrospectiveSort(System.Int32 left, System.Int32 length) at offset 6
--- End of inner exception stack trace ---
at System.Array.SorterObjectArray.IntrospectiveSort(System.Int32 left, System.Int32 length) at offset 66
at System.Array.Sort(System.Array keys, System.Array items, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) at offset 277
at System.Collections.ArrayList.Sort(System.Int32 index, System.Int32 count, System.Collections.IComparer comparer) at offset 76
at Tencent.WXBizMsgCrypt.GenarateSinature(System.String sToken, System.String sTimeStamp, System.String sNonce, System.String sMsgEncrypt, System.String& sMsgSignature) at offset 49
at Tencent.WXBizMsgCrypt.VerifySignature(System.String sToken, System.String sTimeStamp, System.String sNonce, System.String sMsgEncrypt, System.String sSigture) at offset 20
at Tencent.WXBizMsgCrypt.VerifyURL(System.String sMsgSignature, System.String sTimeStamp, System.String sNonce, System.String sEchoStr, System.String& sReplyEchoStr) at offset 40
at Senparc.Weixin.QY.Signature.VerifyURL(System.String token, System.String encodingAESKey, System.String corpId, System.String msgSignature, System.String timeStamp, System.String nonce, System.String echoStr) at offset 8
at 微信企业号.Controllers.SalesController.Index(Senparc.Weixin.QY.Entities.PostModel postModel, System.String echostr) in H:\Agent\_work\1\s\微信企业号\src\微信企业号\Controllers\SalesController.cs:line 25:col 4

URL:http://xxx.com/sales?msg_signature=05c9f58740c3f2d976ec74eefb353549335bf7e9&timestamp=1477043945&nonce=1612452620

lishewen commented 7 years ago

最近一次更新Nuget包才出现的,以前没有的,但系统目前没收到功能不能用的反馈,貌似不影响运作,不过会逼死强迫症

JeffreySu commented 7 years ago

嗯嗯,我来观察一下。是企业号里面的吗?

lishewen commented 7 years ago

是的