Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop に追従するとログインできない(dc3629e) #13993

Closed
1 task
kanarikanaru opened this issue Jun 14, 2024 · 11 comments · Fixed by #13994
Closed
1 task

Develop に追従するとログインできない(dc3629e) #13993

kanarikanaru opened this issue Jun 14, 2024 · 11 comments · Fixed by #13994
Assignees
Labels
🐛Bug Unexpected behavior 🔥high priority packages/backend Server side specific issue/PR

Comments

@kanarikanaru
Copy link
Contributor

💡 Summary

feat(backend): report `Retry-After` if client hit rate limit (#13949) · misskey-dev/misskey@dc3629e · GitHub
これを適用すると、新規にログインできない等の問題が発生する。
現状Developブランチにのみにあるコミットです。

🥰 Expected Behavior

  • 新規にログインできる
  • デフォルトロールでノートやリアクションが消せる

🤬 Actual Behavior

  • ログインするためにPOSTしても結果が返ってこない
  • nginxのリバースプロキシを経由させなくても発生

📝 Steps to Reproduce

  1. Developに追従する
  2. 新しいブラウザでログインを試みる
  3. ぐるぐる

💻 Frontend Environment

* Model and OS of the device(s): MacBook Pro (14inch, 2021), macOS Sonoma 14.5

* Browser: Chrome 125
* Server URL:misskey.backspace.fm
* Misskey:2024.05(Developに追従、該当コミットをrevertして通常通り動作することを確認)

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service:systemd
* Misskey: 2024.05(Developに追従、該当コミットをrevertして通常通り動作することを確認)
* Node: 20.14
* PostgreSQL: 15
* Redis: 7
* OS and Architecture: Ubuntu 22

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
@kanarikanaru kanarikanaru added the ⚠️bug? This might be a bug label Jun 14, 2024
@tai-cha
Copy link
Contributor

tai-cha commented Jun 14, 2024

追加:新規アカウント作成も通らないかも
→ とても長いローディングのあとデータのみ作成された(アカウントのチュートリアルに進まないもののユーザーは作成された)

@tai-cha tai-cha added 🐛Bug Unexpected behavior and removed ⚠️bug? This might be a bug labels Jun 14, 2024
@tai-cha
Copy link
Contributor

tai-cha commented Jun 14, 2024

ローカルdev環境では再現できず、misskey-tgaでは再現できる

@KisaragiEffective KisaragiEffective self-assigned this Jun 14, 2024
@KisaragiEffective KisaragiEffective added the packages/backend Server side specific issue/PR label Jun 14, 2024
@KisaragiEffective

This comment was marked as resolved.

@u1-liquid
Copy link
Contributor

ローカルdev環境では再現できず

👀

if (process.env.NODE_ENV !== 'production') {
this.disabled = true;
}

@zyoshoka
Copy link
Contributor

記法的に良いのか分かりませんがここをとりあえず

return max.then(ok).catch(e => reject(e));

とすると直りました

@anatawa12
Copy link
Member

anatawa12 commented Jun 14, 2024

その方針で行くのであればmax.then(ok, reject)のほうが良さそう。PRはやします

@tai-cha
Copy link
Contributor

tai-cha commented Jun 14, 2024

自分も
return max.then(ok).catch(reject);
で動くのは確認してPR出そうと思ってました(anatawa12さんのでよさそう)

@KisaragiEffective KisaragiEffective self-assigned this Jun 14, 2024
@anatawa12
Copy link
Member

ok(Promiseのresolveコールバック)がエラー出すこと多分ないけどthen(ok).catch(reject)だと両方呼ばれるリスクがあるので一応thenに2つのほうが良さそうとしました

@KisaragiEffective
Copy link
Collaborator

off-topic(?): resolveを呼んでいないのはESLintのno-floating-promiseで検知されているかと思ったが、CI実行時に--quietがついているためおそらく抑制されている。これも帰ったら見る。

@t1nyb0x t1nyb0x moved this to Triage in [BUG TRACKER] Backend Jun 14, 2024
@t1nyb0x t1nyb0x moved this from Triage to Todo in [BUG TRACKER] Backend Jun 14, 2024
@KisaragiEffective
Copy link
Collaborator

off-topic(?): resolveを呼んでいないのはESLintのno-floating-promiseで検知されているかと思ったが、CI実行時に--quietがついているためおそらく抑制されている。これも帰ったら見る。

c51347d において /misskey/packages/backend $ eslint "src/*/**.ts" を実行してもno-floating-promiseが発火されていない。

@anatawa12
Copy link
Member

voidにreturnしてるところで発火してもいい気はするけど、new Promiseresolveに関してはlimiter.getのコールバックがいつどのように呼ばれるか不定だからlinterがどうにかできる範疇を超えてるきはする

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior 🔥high priority packages/backend Server side specific issue/PR
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

7 participants