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

[Bug]: error messages in browser console when opening local file with file:// url #30001

Open
Dromantor opened this issue Jan 30, 2025 · 0 comments
Labels
external-contributor regression-prod-12.6.2 Regression bug that was found in production in release 12.6.2 type-bug

Comments

@Dromantor
Copy link

Describe the bug

When opening a html document via file:// url, i.e. a local file, the following two error messages appear in the console every time.

Image

Extension ed7763e0-afa2-4da4-bee8-4d7f58fd6704 is metamask, verified by opening moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/home.html.

(empty.html is just <!DOCTYPE html><html><head></head><body></body></html>)

Opening the same file via temporary local server does not cause these errors.

Expected behavior

No errors polluting the log.

Screenshots/Recordings

No response

Steps to reproduce

Make a html file, open it directly without a local server, i.e. via file:// url, observe browser console.

Error messages or log output

SyntaxError: An invalid or illegal string was specified contentscript.js:1
    _postMessage moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    _write moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    _handshake moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    d moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    initStreams moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    initStreams moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    [3]< moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    i moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    e moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    <anonym> moz-extension://ed7763e0-afa2-4da4-bee8-4d7f58fd6704/scripts/contentscript.js:1
    #injectIntoIsolatedWorld resource://gre/modules/ExtensionContent.sys.mjs:687
    inject resource://gre/modules/ExtensionContent.sys.mjs:672
    AsyncFunctionNext self-hosted:800
DOMException: An invalid or illegal string was specified
    _postMessage file:///D:/Desktop/empty.html:1
    _write file:///D:/Desktop/empty.html:1
    _handshake file:///D:/Desktop/empty.html:1
    f file:///D:/Desktop/empty.html:1
    [1]</</< file:///D:/Desktop/empty.html:1
    [1]</< file:///D:/Desktop/empty.html:1
    [1]< file:///D:/Desktop/empty.html:1
    s file:///D:/Desktop/empty.html:1
    e file:///D:/Desktop/empty.html:1
    <anonymous> file:///D:/Desktop/empty.html:1

Detection stage

In production (default)

Version

12.6.2

Build type

None

Browser

Firefox

Operating system

Windows

Hardware wallet

No response

Additional context

No response

Severity

No response

@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Jan 30, 2025
@metamaskbot metamaskbot added external-contributor regression-prod-12.6.2 Regression bug that was found in production in release 12.6.2 labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor regression-prod-12.6.2 Regression bug that was found in production in release 12.6.2 type-bug
Projects
Status: To be fixed
Development

No branches or pull requests

2 participants