Skip to content

Service Worker registration failed (Status code: 15) and Popup malfunction due to uncompiled TypeScript #3

Description

@reac1246

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なんで愛嬌的な感じで許してください、何でもしますから!(何でもするとは言っていない)

SimpMusic様改善済み_utils-main.zip

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions