[GH-ISSUE #5160] [Issue]: Prevent unsupported long-task and mozInputSource console warnings #2854

Closed
opened 2026-10-21 05:56:56 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Aug 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5160

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The browser console shows two noisy compatibility/deprecation messages during Marinara Engine use:

Ignoring unsupported entryTypes: longtask. content.js:30:34318
MouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead.

Ensure Marinara-owned code does not emit either warning. Determine whether the content.js callsite belongs to the app, a bundled dependency, or an injected browser extension before changing behavior.

Expected behavior

  • Do not attempt to register a longtask PerformanceObserver when the browser does not advertise support for that entry type.
  • If Marinara or a bundled dependency accesses MouseEvent.mozInputSource, replace that path with PointerEvent.pointerType and an appropriate compatibility fallback.
  • A normal Marinara session should not produce either app-owned warning.
  • Do not monkey-patch console or broadly filter browser warnings merely to hide them.
  • If content.js is confirmed to be injected by a browser extension, record that finding because application code cannot safely suppress extension-owned console output.

Suggested proof:

  • Cover the unsupported-longtask path by stubbing PerformanceObserver.supportedEntryTypes without longtask and verify that observe() is never called.
  • Verify the supported path still installs diagnostics when mariPerfVerbose is enabled.
  • Reproduce the mozInputSource warning in a clean browser profile with extensions disabled to establish whether Marinara owns it.

Actual behavior

installLongTaskWarner() in packages/client/src/lib/perf-diagnostics.ts currently calls:

observer.observe({ entryTypes: ["longtask"] });

inside a try/catch. Some browsers warn about the unsupported entry type before throwing or ignoring it, so catching the call does not prevent console noise. The code should check PerformanceObserver.supportedEntryTypes first.

A repository-wide search, including installed dependencies, found no mozInputSource access. The reported content.js filename commonly denotes an injected extension content script, so ownership of that second warning must be verified rather than papered over.

Steps to reproduce

  1. Open Marinara Engine in the affected browser.
  2. Open the developer console.
  3. Enable or use the path that installs performance diagnostics.
  4. Observe the unsupported longtask entry-type message.
  5. Interact with the page and observe the MouseEvent.mozInputSource deprecation warning.

Environment

  • Marinara Engine version: Not provided
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided; console wording indicates a Mozilla-family browser

Logs, screenshots, or video

20:24:08.681 Ignoring unsupported entryTypes: longtask. content.js:30:34318
20:24:32.402 MouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead.

Additional context

Relevant app-owned code: packages/client/src/lib/perf-diagnostics.ts, called from packages/client/src/App.tsx. The diagnostics are opt-in through localStorage.mariPerfVerbose, but unsupported APIs should still be feature-detected before use.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Aug 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5160 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The browser console shows two noisy compatibility/deprecation messages during Marinara Engine use: ```text Ignoring unsupported entryTypes: longtask. content.js:30:34318 MouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead. ``` Ensure Marinara-owned code does not emit either warning. Determine whether the `content.js` callsite belongs to the app, a bundled dependency, or an injected browser extension before changing behavior. ## Expected behavior - Do not attempt to register a `longtask` `PerformanceObserver` when the browser does not advertise support for that entry type. - If Marinara or a bundled dependency accesses `MouseEvent.mozInputSource`, replace that path with `PointerEvent.pointerType` and an appropriate compatibility fallback. - A normal Marinara session should not produce either app-owned warning. - Do not monkey-patch `console` or broadly filter browser warnings merely to hide them. - If `content.js` is confirmed to be injected by a browser extension, record that finding because application code cannot safely suppress extension-owned console output. Suggested proof: - Cover the unsupported-`longtask` path by stubbing `PerformanceObserver.supportedEntryTypes` without `longtask` and verify that `observe()` is never called. - Verify the supported path still installs diagnostics when `mariPerfVerbose` is enabled. - Reproduce the `mozInputSource` warning in a clean browser profile with extensions disabled to establish whether Marinara owns it. ## Actual behavior `installLongTaskWarner()` in `packages/client/src/lib/perf-diagnostics.ts` currently calls: ```ts observer.observe({ entryTypes: ["longtask"] }); ``` inside a `try/catch`. Some browsers warn about the unsupported entry type before throwing or ignoring it, so catching the call does not prevent console noise. The code should check `PerformanceObserver.supportedEntryTypes` first. A repository-wide search, including installed dependencies, found no `mozInputSource` access. The reported `content.js` filename commonly denotes an injected extension content script, so ownership of that second warning must be verified rather than papered over. ## Steps to reproduce 1. Open Marinara Engine in the affected browser. 2. Open the developer console. 3. Enable or use the path that installs performance diagnostics. 4. Observe the unsupported `longtask` entry-type message. 5. Interact with the page and observe the `MouseEvent.mozInputSource` deprecation warning. ## Environment - Marinara Engine version: Not provided - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided; console wording indicates a Mozilla-family browser ## Logs, screenshots, or video ```text 20:24:08.681 Ignoring unsupported entryTypes: longtask. content.js:30:34318 20:24:32.402 MouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead. ``` ## Additional context Relevant app-owned code: `packages/client/src/lib/perf-diagnostics.ts`, called from `packages/client/src/App.tsx`. The diagnostics are opt-in through `localStorage.mariPerfVerbose`, but unsupported APIs should still be feature-detected before use. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [x] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:56:56 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 16, 2026):

PR #5166 feature-detects PerformanceObserver.supportedEntryTypes before requesting longtask, so the app-owned warning is prevented before the browser can emit it.

I also rechecked Engine client/server/shared sources and the lockfile: there is no mozInputSource access. The reported callsite is content.js, consistent with injected extension code. Marinara cannot safely suppress another extension's console output without the prohibited broad console monkey-patch; if it reproduces with extensions disabled and DevTools identifies a Marinara bundle URL, please attach that source URL and we can reopen the ownership finding.

<!-- gh-comment-id:5310015246 --> @SpicyMarinara commented on GitHub (Aug 16, 2026): PR #5166 feature-detects `PerformanceObserver.supportedEntryTypes` before requesting `longtask`, so the app-owned warning is prevented before the browser can emit it. I also rechecked Engine client/server/shared sources and the lockfile: there is no `mozInputSource` access. The reported callsite is `content.js`, consistent with injected extension code. Marinara cannot safely suppress another extension's console output without the prohibited broad console monkey-patch; if it reproduces with extensions disabled and DevTools identifies a Marinara bundle URL, please attach that source URL and we can reopen the ownership finding.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2854
No description provided.