Service Worker registration failed (Status code: 15) and Popup malfunction due to uncompiled TypeScript
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, typescript
- Lĩnh vực
- build-system, frontend
Hướng nghiên cứu
The report names background.js, popup.ts and popup.html, where the popup loads popup.js that does not exist in the source. Start by checking whether the repo has any TypeScript build step or config, and whether popup.html points at a compiled file. The maintainer has not chosen between shipping compiled JS and adding a build script, so confirm that direction before editing. Done means the extension loads, the service worker registers and the popup works in Chrome.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description I encountered an issue where the Service Worker failed to register with Status code: 15. Additionally, the popup was not functioning correctly.
Root Cause Upon investigation, I found that the source files (
background.js
and
popup.ts
referenced as
popup.js
) contain TypeScript syntax (interfaces, type annotations).
background.js
: Contains interface definitions and type annotations. Browsers cannot execute this directly, leading to a SyntaxError and Service Worker failure.
popup.html
: References
popup.js
, but only
popup.ts
exists in the source, which also contains TypeScript.
Fix I was able to resolve these issues by transpiling the TypeScript code into valid JavaScript (removing types and interfaces).
Environment
OS: Windows
Browser: Chrome
Suggestions It seems the project is intended to be built with TypeScript, but the distributed/source files are mixed. It would be helpful to either:
Distribute compiled
.js
files.
Or include a build script/instruction to generate the JS files from TS.
GoodDay!
日本から、愛をこめて
P.S:すでに対応済みだったらごめんなさい。何かあったら教えてください。怒らんといてください、16なんで愛嬌的な感じで許してください、何でもしますから!(何でもするとは言っていない)
- Ngôn ngữ chính
- TypeScript
- Star
- 58
- Fork
- 5
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 maxrave-dev/utils
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
maxrave-dev/utils#11 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 12/100
maxrave-dev/utils#10 · 2 reaction ·
-
Login FailedĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
maxrave-dev/utils#9 ·
-
Extract cookies don't worksĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
maxrave-dev/utils#7 · 6 bình luận · 1 reaction ·
-
Login FailedĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 18/100
maxrave-dev/utils#6 ·
Tất cả issue của maxrave-dev/utils
Issue tương tự
-
agentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
opencollective/opencollective-frontend#12789 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Web download page shows a file as Completed when its download from S3 fails with an error responseĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
awslabs/visual-asset-management-system#2097 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
openwatersio/slackwater#591 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
compiler-explorer/compiler-explorer#9738 ·
Maintainer thường phản hồi trong vòng 2 ngày