sinaPicHostingApi icon indicating copy to clipboard operation
sinaPicHostingApi copied to clipboard

Cannot read property '1' of null

Open athlonreg opened this issue 5 years ago • 7 comments

按照README配置完,启动index.js报错了,是新浪的api有变化了吗

xnip2018-12-02_01-34-49 xnip2018-12-02_01-36-06

athlonreg avatar Dec 01 '18 17:12 athlonreg

把8088端口换成80端口试试

Logan-017 avatar Mar 19 '19 08:03 Logan-017

我也出了这样的问题 同问怎么解决

xiaoLit avatar Apr 01 '19 06:04 xiaoLit

我运行起来没问题 点击验证时候 无法通过 80 和 8088都报这个错误 MWeb报错请求超时

xiaoLit avatar Apr 01 '19 06:04 xiaoLit

(node:26120) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null at login (/Users/light/sinaPicHostingApi/helper.js:63:70) at process._tickCallback (internal/process/next_tick.js:68:7) (node:26120) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) (node:26120) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null at login (/Users/light/sinaPicHostingApi/helper.js:63:70) at process._tickCallback (internal/process/next_tick.js:68:7) (node:26120) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)

xiaoLit avatar Apr 01 '19 06:04 xiaoLit

我运行起来没问题 点击验证时候 无法通过 80 和 8088都报这个错误 MWeb报错请求超时

检查一下config.json和Mweb的配置发布服务是否都用80端口,单独检查一下登录的账号密码能否登录新浪微博,我这边是直接在终端CD到index.js在的文件夹,然后输入node index.js,保持终端开启。就能上传了。如果再解决不了,可能会不会是Mweb版本问题,我的是3.1.6,如果再解决不了,很抱歉,你只能求助博主了

Logan-017 avatar Apr 01 '19 07:04 Logan-017

用80和8088端口都运行不起来了 同样的报错 ` sinaPicHosting - app run at 80 events.js:167 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE :::80 at Server.setupListenHandle [as _listen2] (net.js:1286:14) at listenInCluster (net.js:1334:12) at Server.listen (net.js:1421:7) at Object. (/Users/light/sinaPicHostingApi/index.js:59:4) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3) at Function.Module.runMain (internal/modules/cjs/loader.js:741:12) Emitted 'error' event at: at emitErrorNT (net.js:1313:8) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:744:11) at startup (internal/bootstrap/node.js:285:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3) `

xiaoLit avatar Apr 01 '19 07:04 xiaoLit

@xiaoLit

Cannot read property '1' of null

这是因为被风控了,登录需要验证码 所以登录失败了

参考https://github.com/J3n5en/sinaPicHostingApi/issues/1

kooritea avatar Jul 02 '19 14:07 kooritea