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

browser-e2eテストが[Errno 10013] error while attempting to bind on address ('127.0.0.1', 50021)で落ちることがある #1558

Closed
1 of 3 tasks
sevenc-nanashi opened this issue Sep 16, 2023 · 3 comments

Comments

@sevenc-nanashi
Copy link
Member

不具合の内容

CIが落ちてます。
多分「アクセス許可で禁じられた方法でソケットにアクセスしようとしました。」のやつだと思います。

現象・ログ

https://github.com/VOICEVOX/voicevox/actions/runs/6205442990/job/16848654142

> voicevox@999.999.999 test:browser-e2e
> cross-env VITE_TARGET=browser playwright test --reporter=html


[WebServer] 2023-09-16T05:10:23.749708Z  INFO voicevox_core::publish: 検出されたGPU (DirectMLには1番目のGPUが使われます):
[WebServer] 2023-09-16T05:10:23.752275Z  INFO voicevox_core::publish:   - "Microsoft Basic Render Driver" (0 B)
2023-09-16T05:10:23.752311Z  INFO voicevox_core::publish:   - "Microsoft Basic Render Driver" (0 B)
[WebServer] Warning: cpu_num_threads is set to 0. ( The library leaves the decision to the synthesis runtime )
[WebServer] INFO:     Started server process [1208]
[WebServer] INFO:     Waiting for application startup.
[WebServer] INFO:     Application startup complete.
[WebServer] ERROR:    [Errno 10013] error while attempting to bind on address ('127.0.0.1', 50021): an attempt was made to access a socket in a way forbidden by its access permissions
[WebServer] INFO:     Waiting for application shutdown.
[WebServer] INFO:     Application shutdown complete.

Error: Process from config.webServer was not able to start. Exit code: 1

再現手順

CIを走らせる

期待動作

コケない

VOICEVOXのバージョン

8f779ab

OSの種類/ディストリ/バージョン

  • Windows
  • macOS
  • Linux

その他

@Hiroshiba
Copy link
Member

browser-e2eで落ちてそうですね!
ブラウザ版テストの方はエンジンをPlaywright内で起動しているので、background.ts内にある自動ポート変更機能がなく、50021番がダメならそのまま起動に失敗するのかなとか思いました。

portManagerにあるfindOrCheckPortを引数0で叩くと使えるランダムポートが帰ってくるので、それを指定するようにすればいいかも?

function findOrCheckPort(

@Hiroshiba
Copy link
Member

ちょっとよくわかってないのですが、CIが落ちない感じになってるのでissueのタイトルと優先度を変えさせていただこうと思います。
(たぶんガチャなんですが、逆に言うとガチャすれば解決するので、優先度は最高でなくても良いかなと思った次第です)

@Hiroshiba Hiroshiba changed the title CIが落ちてるのをなんとかする browser-e2eテストが[Errno 10013] error while attempting to bind on address ('127.0.0.1', 50021)で落ちることがある Sep 19, 2023
@Hiroshiba
Copy link
Member

解決策のメモです。

そのポートが使えない時に、別のポートを使うようにコードを書くのが良さそうに感じました。
playwright.config.ts内にportが塞がっていたらスキャンするコードを書くと良さそう・・・?
(無指定だったらスキャンする、とかでもかっこいいかも)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants