app:url:download crashes with MissingIdentifierField after the download process stops
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 69/100
Hướng nghiên cứu
Bắt đầu với ProcessStoppedListener.php, đặc biệt là onCliProcessStopEvent() và lời gọi find($event->downloadJob->getId()) được mô tả trong issue. Theo dõi cách UrlDownloadCommand tạo DownloadJob và kiểm tra các bài kiểm thử listener hiện có. Xác minh rằng chạy lệnh kết thúc thành công và có bài kiểm thử bao quát một job chưa được lưu trữ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
bin/console app:url:download <url> crashes after the first yt-dlp run. Found while testing #46 / #52:
[Doctrine\ORM\Exception\MissingIdentifierField]
The identifier id is missing for a query of App\Entity\DownloadJob
at ProcessStoppedListener.php:38 ($this->downloadJobRepository->find($event->downloadJob->getId()))
... AbstractCliDownloader->runDownloadProcess()
... UrlDownloadCommand->execute()
UrlDownloadCommand creates a DownloadJob that is never persisted (id is null). ProcessStoppedListener::onCliProcessStopEvent() calls find(null) on it, which throws. The download itself happens, but the command exits with an error, and since #52 the retry without the download archive never runs from this command.
Proposed fix
Either:
- Guard the listener: skip the database work in
ProcessStoppedListenerwhen the job has no id (null === $event->downloadJob->getId()). The command stays a "download only, don't record" tool. - Persist the job in the command: save the job (with downloader and state) before downloading, so CLI downloads behave like API downloads and get events and linked files.
The guard is the smaller fix. Persisting may be preferable if CLI downloads should show up in the admin panel.
Verification
bin/console app:url:download --downloader yt-dlp-cli <url> exits with 0, and a test covering the listener with an unpersisted job.
- Ngôn ngữ chính
- PHP
- Star
- 1
- Fork
- 0
- Merge trung bình
- 3 ngày 50 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của FetchDock/fetchdock-server
-
bug dependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
FetchDock/fetchdock-server#53 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 24/100
FetchDock/fetchdock-server#55 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add site specific settingsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
FetchDock/fetchdock-server#23 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add downloader specifc settingsĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
FetchDock/fetchdock-server#22 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Implement (user) settingsĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
FetchDock/fetchdock-server#21 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của FetchDock/fetchdock-server
Issue tương tự
-
AI effort: [XS] priority: medium severity: minor type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Help-Wanted Needs-Triage Package-Request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
microsoft/winget-pkgs#484368 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Exclude module `require-dev` and `autoload-dev` from the generated `composer.json`Có thể đã có người làm @keiserjb đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
devneet-id/rune#37 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
uiowa/uiowa#10310 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày