Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

charles获取的Session没有ddmc-device-token导致运行报错 #20

Closed
csrxff opened this issue May 1, 2022 · 4 comments
Closed

charles获取的Session没有ddmc-device-token导致运行报错 #20

csrxff opened this issue May 1, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@csrxff
Copy link

csrxff commented May 1, 2022

Windows Powershell下运行时提示

PS D:\dingdong-helper-node-main> yarn checkout:normal
yarn run v1.22.18
$ node scripts/checkout_cart
D:\dingdong-helper-node-main\service\session_parser.js:79
"ddmc-device-token": header.find(item => item.name.toLowerCase() == "ddmc-device-token").value,
^

TypeError: Cannot read properties of undefined (reading 'value')
at load_profile (D:\dingdong-helper-node-main\service\session_parser.js:79:97)
at D:\dingdong-helper-node-main\scripts\checkout_cart.js:96:27
at D:\dingdong-helper-node-main\scripts\checkout_cart.js:162:11

Node.js v17.0.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS D:\dingdong-helper-node-main>

看了下charles抓的https://maicai.api.ddxq.mobi/cart/index这个包下也确实没找到ddmc-device-token这个值
在Untitled.chlsj里手动添加token的空值后运行是这样提示了

PS D:\dingdong-helper-node-main> yarn checkout:normal
yarn run v1.22.18
$ node scripts/checkout_cart
[2022-05-01 10:11:25] [DEBUG] 尝试获取不存在的 Param: device_token
[2022-05-01 10:11:26] [INFO] [] 当前默认地址 : *********************
[2022-05-01 10:11:26] [DEBUG] 尝试获取不存在的 Param: device_token
[2022-05-01 10:11:26] [DEBUG] 尝试获取不存在的 Param: device_token
[2022-05-01 10:11:27] [ERROR] 获取购物车内容失败: 购物车无有货商品

这样是正常可运行吗

@Runc2333
Copy link
Owner

Runc2333 commented May 1, 2022

只要能获取收货时间就可以正常运行,这个问题我之后修复一下。

@Runc2333 Runc2333 added the bug Something isn't working label May 1, 2022
@csrxff
Copy link
Author

csrxff commented May 1, 2022

刚才又抓了一次包,这次又有ddmc-device-token这个值,不知道这个值是什么情况下会出现或者不出现

@Runc2333
Copy link
Owner

Runc2333 commented May 1, 2022

刚才又抓了一次包,这次又有ddmc-device-token这个值,不知道这个值是什么情况下会出现或者不出现

对,会增加fallback

@waynez
Copy link

waynez commented May 1, 2022

会不会跟app版本有关系?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants