JacobLinCool / JacobLinCool/LeetCode-Query
Unable to get User Information
- 主要语言
- TypeScript
- 星标
- 130
- 派生
- 23
- PR 合并指标
- 30 天内没有已合并 PR
描述
# Unable to get user information
## Code used to reproduce
```js
import { LeetCode } from "leetcode-query";
const leetcode = new LeetCode();
const user = await leetcode.user("username");
```
## Error
```bash
Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
at _fetch (index.js:71:1)
at get_csrf (index.js:87:1)
at Credential.init (index.js:111:1)
at getUser (Card.js:10:1)
at Card (Card.js:15:1)
at renderWithHooks (react-dom.development.js:15486:1)
at mountIndeterminateComponent (react-dom.development.js:20103:1)
at beginWork (react-dom.development.js:21626:1)
at beginWork$1 (react-dom.development.js:27465:1)
at performUnitOfWork (react-dom.development.js:26596:1)
```
Help me with this. @JacobLinCool
贡献指南
这个仓库没有索引到贡献指南
调研方向
该故障通过 index.js 中的 _fetch、get_csrf 和 Credential.init 报告,其中 Card.js 调用 getUser。复现 issue 中所示的浏览器调用,并跟踪 fetch 的调用;当 leetcode.user("username") 返回用户信息且不再出现 Illegal invocation 错误时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, typescript
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100