RSSHub icon indicating copy to clipboard operation
RSSHub copied to clipboard

[twitter] ConfigNotFoundError: Invalid twitter configs:

Open write3371 opened this issue 1 year ago • 3 comments

路由地址

/twitter/tweet/:id/status/:status/:original?

完整路由地址

/twitter/tweet/lookonchain/status/1788404733176373529

相关文档

https://docs.rsshub.app/routes/social-media#tweet-details

预期是什么?

已检查OTP密钥正确,正常登录

 - TWITTER_USERNAME=lookonchain_look
- TWITTER_PASSWORD=BBA.DDERA.DADG
 - TWITTER_AUTHENTICATION_SECRET=****************
``
不知道是不是密码带点影响了什么?


### 实际发生了什么?

 ConfigNotFoundError: Invalid twitter configs: 用户名

### 部署

自建

### 部署相关信息

Docker Git Hash: 0fc62095

### 额外信息

```shell
Helpful Information

Error Message:
ConfigNotFoundError: Invalid twitter configs: lookonchain_look

Route: /twitter/user/:id/:routeParams?

Full Route: /twitter/user/lookonchain

Node Version: v22.7.0

Git Hash: 0fc62095

Git Date: Sun, 25 Aug 2024 05:36:49 GMT

这不是重复的 issue

  • [X] 我已经搜索了 现有 issue,以确保该错误尚未被报告。

write3371 avatar Aug 25 '24 08:08 write3371

Searching for maintainers:
  • /twitter/tweet/:id/status/:status/:original?: @LarchLiu @Rongronggg9

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake. 如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

github-actions[bot] avatar Aug 25 '24 08:08 github-actions[bot]

Searching for maintainers:
  • /twitter/tweet/:id/status/:status/:original?: @LarchLiu @Rongronggg9

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake. 如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

github-actions[bot] avatar Aug 25 '24 08:08 github-actions[bot]

#14447 broken again

ghost avatar Aug 25 '24 08:08 ghost

Same here, back to Git Hash: 13c1eb02, it working

CJN1986 avatar Aug 31 '24 12:08 CJN1986

Same here, back to Git Hash: 13c1eb0, it working rsshub node version plz...

Dz3yu avatar Sep 08 '24 08:09 Dz3yu

Apparently Twitter blocks because the bot makes 84857092874509328409825 login attempts image

weskerty avatar Sep 13 '24 13:09 weskerty

I enabled the debug log:

2024-09-18 17:34:07 
2024-09-18 17:34:07 > [email protected] start
2024-09-18 17:34:07 > cross-env NODE_ENV=production tsx lib/index.ts
2024-09-18 17:34:07 
2024-09-18 17:34:08 info: Sentry inited.
2024-09-18 17:34:09 info: Redis connected.
2024-09-18 17:34:09 info: 🎉 RSSHub is running on port 1200! Cheers!
2024-09-18 17:34:09 info: 💖 Can you help keep this open source project alive? Please sponsor 👉 https://docs.rsshub.app/sponsor
2024-09-18 17:34:09 info: 🔗 Local: 👉 http://localhost:1200
2024-09-18 17:34:09 info: 🔗 Network: 👉 http://172.20.0.3:1200
2024-09-18 17:34:09 info: 🔗 Network: 👉 http://[::]:1200
2024-09-18 17:34:13 info: <-- GET /favicon.ico
2024-09-18 17:34:13 info: --> GET /favicon.ico 200 8ms
2024-09-18 17:34:21 info: <-- GET /
2024-09-18 17:34:21 info: --> GET / 200 2ms
2024-09-18 17:34:43 debug: Outgoing request: POST http://localhost/v1/traces
2024-09-18 17:34:09 (node:47) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
2024-09-18 17:34:09 (Use `node --trace-deprecation ...` to show where the warning was created)
2024-09-18 17:34:50 info: <-- GET /twitter/media/Ame_iroo/showAuthorAvatarInDesc=1&showEmojiForRetweetAndReply=1&addLinkForPics=1&excludeReplies=1&includeRts=0
2024-09-18 17:34:51 debug: Twitter login start.
2024-09-18 17:34:51 debug: Outgoing request: POST https://api.x.com/1.1/guest/activate.json
2024-09-18 17:34:52 debug: Twitter login 1 finished: guest token.
2024-09-18 17:34:52 debug: Outgoing request: POST https://api.x.com/1.1/onboarding/task.json?flow_name=login&api_version=1&known_device_token=&sim_country_code=us
2024-09-18 17:34:52 debug: Twitter login 2 finished: login flow.
2024-09-18 17:34:52 debug: Outgoing request: POST https://api.x.com/1.1/onboarding/task.json
2024-09-18 17:34:52 debug: Twitter login 3 finished: LoginEnterUserIdentifier.
2024-09-18 17:34:52 debug: Outgoing request: POST https://api.x.com/1.1/onboarding/task.json
2024-09-18 17:34:53 warn: Request https://api.x.com/1.1/onboarding/task.json with error 400 remaining retry attempts: 2
2024-09-18 17:34:54 debug: Outgoing request: POST https://api.x.com/1.1/onboarding/task.json
2024-09-18 17:34:54 warn: Request https://api.x.com/1.1/onboarding/task.json with error 400 remaining retry attempts: 1
2024-09-18 17:34:55 debug: Outgoing request: POST https://api.x.com/1.1/onboarding/task.json
2024-09-18 17:34:55 error: Twitter username [email protected] login failed: [POST] "https://api.x.com/1.1/onboarding/task.json": 400 Bad Request
2024-09-18 17:34:55 error: Error in /twitter/media/Ame_iroo/showAuthorAvatarInDesc=1&showEmojiForRetweetAndReply=1&addLinkForPics=1&excludeReplies=1&includeRts=0: ConfigNotFoundError: Invalid twitter configs: [email protected]
2024-09-18 17:34:55 info: --> GET /twitter/media/Ame_iroo/showAuthorAvatarInDesc=1&showEmojiForRetweetAndReply=1&addLinkForPics=1&excludeReplies=1&includeRts=0 503 5s
2024-09-18 17:35:25 debug: Outgoing request: POST http://localhost/v1/traces

Not sure if this is related, recently I found that twitter is requiring verification of your phone number or user id upon login. This happened on both PC and mobile webpage:

image

CXwudi avatar Sep 18 '24 22:09 CXwudi

Has the issue been resolved?

chenweiyi avatar Sep 20 '24 06:09 chenweiyi

No.

ghost avatar Sep 20 '24 08:09 ghost

Currently TWITTER_AUTH_TOKEN workaround works for me, but not TWITTER_AUTHENTICATION_SECRET anymore

https://medium.com/@alialahmed128/how-to-get-a-twitter-auth-token-de955720dedb

Some ppl mentioned it still doesn't work but I haven't encountered it myself

CXwudi avatar Sep 20 '24 13:09 CXwudi

Yeah, use TWITTER_AUTH_TOKEN works! Thank you very much!

chenweiyi avatar Sep 22 '24 04:09 chenweiyi

同样出现了这个问题,确定TWITTER_AUTHENTICATION_SECRET和TWITTER_PASSWORD设置没问题 image image

Mozi71 avatar Sep 22 '24 14:09 Mozi71

同样,回到 Git Hash: 13c1eb0,它是有效的 rsshub 节点版本...

image 尝试自行构筑该版本Docker镜像后,相关Twitter订阅还是失败了

Mozi71 avatar Sep 22 '24 14:09 Mozi71

@Mozi71 用最新版的,参考CXwudi 发的那个呢?

ghost avatar Sep 22 '24 15:09 ghost

我用的最新版镜像,用这个 TWITTER_AUTH_TOKEN 是可以的,没用 TWITTER_AUTHENTICATION_SECRET和 TWITTER_PASSWORD

chenweiyi avatar Sep 24 '24 02:09 chenweiyi

@Mozi71 用最新版的,参考CXwudi 发的那个呢?

经过尝试,使用TWITTER_AUTH_TOKEN成功了,就是不知道稳定性咋样了

Mozi71 avatar Sep 24 '24 04:09 Mozi71