brookshi / Hitchhiker

a Restful Api test tool
http://www.hitchhiker-api.com
Other
2.19k stars 402 forks source link

[问题]用户登录出错 #162

Closed pythontf closed 6 years ago

pythontf commented 6 years ago

您好,登录时出错

其他用户登录没有问题

只有一个用户登录时出错

image

用docker部署的

hitchhiker | 0|index | [2018-04-16 02:03:10.914] [ERROR] console - RangeError: Invalid string length hitchhiker | 0|index | at JSON.stringify () hitchhiker | 0|index | at respond (/usr/src/Hitchhiker/node_modules/koa/lib/application.js:244:15) hitchhiker | 0|index | at handleResponse (/usr/src/Hitchhiker/node_modules/koa/lib/application.js:148:34) hitchhiker | 0|index | at process._tickDomainCallback (internal/process/next_tick.js:135:7)

qq 20180416101250

brookshi commented 6 years ago

嗯,看错误是数据库里的数据有不能被解析的,一般出现这种情况的是response是图片或zip数据,我对这两种数据是做了特殊处理,正常应该不会出现的。如果是这个问题,那出问题的数据是scheduler里跑的记录,这就需要直接操作数据库了,要删一些数据。在数据库里找下这个用户的id,然后用这个id在schedule表里找他的schedule,再在schedule_record表里删掉这些schedule跑的记录。 这样用户就能登录了,然后再看下具体的schedule里是哪个造成这个问题的。找到的话麻烦发更新下这个issue,我把它加到特殊处理里

pythontf commented 6 years ago

我直接完全清除了schedule的记录,就可以登录了

brookshi commented 6 years ago

嗯,后面可能还会有问题,需要看下是哪个接口返回了二进制的数据