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

Bugdash often loads with BugDash is unable to start as your browser does not support the "importMap" feature, usually after session-restore (with web console showing error Uncaught TypeError: The specifier “dialog” was a bare specifier, but was not remapped to anything. #15

Closed
dholbert opened this issue May 16, 2023 · 7 comments

Comments

@dholbert
Copy link

I have a bugdash pinned tab, and I've noticed that often after a session-restore, it gets restored with the following contents:

Starting BugDash…

BugDash is unable to start as your browser does not support the "importMap" feature.

For Firefox you'll require at least version 108.

I also noticed this in my web console, this most recent time (I didn't check web console on previous times):

Uncaught TypeError: The specifier “dialog” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”.
https://bugdash.moz.tools/app/bugdash.mjs?a0cda95231806432bcebb9f4547c3296

That's pointing to this line in the .mjs file:

import * as Dialog from "dialog";

If I reload, everything works just fine.

I'm using latest Firefox Nightly 115.

@dholbert dholbert changed the title Bugdash often loads with BugDash is unable to start as your browser does not support the "importMap" feature, usually after session-restore Bugdash often loads with BugDash is unable to start as your browser does not support the "importMap" feature, usually after session-restore (with web console showing error Uncaught TypeError: The specifier “dialog” was a bare specifier, but was not remapped to anything. May 16, 2023
@globau
Copy link
Collaborator

globau commented May 16, 2023

I suspect this is a browser bug.

Because Firefox only supports inline importMaps they are defined in index.html here:

bugdash/index.html

Lines 71 to 108 in 54ca692

<script type="importmap">
{
"imports": {
"bugdash": "./app/bugdash.mjs?a0cda95231806432bcebb9f4547c3296",
"buglist": "./app/buglist.mjs?700eecd2a5ef0de46b74e55189b960c7",
"buglists/assigned-inactive": "./app/buglists/assigned-inactive.mjs?eb293460f7086ff0e0477c3b48c940bf",
"buglists/blockers": "./app/buglists/blockers.mjs?754eae0719cca2ba526458bda07b0c7a",
"buglists/blockers-unassigned": "./app/buglists/blockers-unassigned.mjs?c57177a234f4d35815de8886a6ab750a",
"buglists/criticals": "./app/buglists/criticals.mjs?c2fff7b5906df31886e42ffb80b94655",
"buglists/criticals-unassigned": "./app/buglists/criticals-unassigned.mjs?98c21f0c57d3800c63f4f3f4c8190d7a",
"buglists/long-defects": "./app/buglists/long-defects.mjs?8d3d04236516147ed258f9f40185bf26",
"buglists/long-enhancements": "./app/buglists/long-enhancements.mjs?4992d75f4d38794ee8b12d54fa158e58",
"buglists/long-tasks": "./app/buglists/long-tasks.mjs?ca775452630c1b1338974fbffb645aec",
"buglists/needinfo-escalated": "./app/buglists/needinfo-escalated.mjs?9eab064556e50d1774384940f11fa1e8",
"buglists/needinfo-stale": "./app/buglists/needinfo-stale.mjs?58af5abb6a5d44feacfd66ebbf59ceec",
"buglists/recent-regressions": "./app/buglists/recent-regressions.mjs?496f04b8658d2189cdfa4655c603ba6a",
"buglists/regressions": "./app/buglists/regressions.mjs?2f757dcb4a70dcfd3461cfc8b594d26b",
"buglists/reo": "./app/buglists/reo.mjs?55c45bd5e92fd0393b7c3a50771d24e0",
"buglists/stalled": "./app/buglists/stalled.mjs?3132d2e3c741835f497f50e8b0ab6f66",
"buglists/topcrashers": "./app/buglists/topcrashers.mjs?44dc47a319517b2e9e8e8f54cd6eff15",
"buglists/tracked": "./app/buglists/tracked.mjs?ead55634a136b55d47f8a3b999769ba3",
"buglists/triage-needed": "./app/buglists/triage-needed.mjs?f4e896bba4c0b93a67cb13b47e9a5c51",
"bugzilla": "./app/bugzilla.mjs?4f5250875365850a915c6b51ec15cf85",
"dialog": "./app/dialog.mjs?8c2b0b6af0aa3d362f724856cba39482",
"global": "./app/global.mjs?b9d59adec739a4d4b00d9a2f0e6fcb4e",
"tabs": "./app/tabs.mjs?b41b908abaea235adfca1707f40b541f",
"tabs/components": "./app/tabs/components.mjs?d1711147d1ba4f31e69ba28514fac85d",
"tabs/help": "./app/tabs/help.mjs?66e69d9c2570a97ccd2a2e8bfd147e72",
"tabs/important": "./app/tabs/important.mjs?3171e0565ca29ac681d90abdd420fef9",
"tabs/reo": "./app/tabs/reo.mjs?afead088b7f915068f9b3edb71f0df72",
"tabs/stalled": "./app/tabs/stalled.mjs?4b6f20adbb97d1f2aa199460b60e5f37",
"tabs/tracked": "./app/tabs/tracked.mjs?f416cd08cf5dc3101d75d0ccbd41a05f",
"tabs/triage": "./app/tabs/triage.mjs?95c3bd3b27b0fc054e47350eaa3f1578",
"tooltips": "./app/tooltips.mjs?f6ce915e9ef0058cae9ecc157ad8a1a9",
"util": "./app/util.mjs?6cfd0192d12dee40c10bf38fb81ee8ec"
}
}
</script>

Later on in the same file the following inline script tests for importMap support:

        <script>
            import("bugdash").catch(() => {
                document.querySelector("#no-importmap").classList.remove("hidden");
            });
        </script>

From your report it looks like Firefox might not be loading the inline importMap during session restore?

@globau
Copy link
Collaborator

globau commented May 16, 2023

I suspect this is a browser bug.

Actually, I'm pretty sure this is a browser bug so I'm going to close this issue.

Want me to file this on Bugzilla for you?

@globau globau closed this as completed May 16, 2023
@dholbert
Copy link
Author

I suspect this is a browser bug.

Actually, I'm pretty sure this is a browser bug so I'm going to close this issue.

Want me to file this on Bugzilla for you?

If you wouldn't mind, that would be great. (I think you have more context about what's expected here, why it's a bug, etc.)

Thanks!

@dholbert
Copy link
Author

Hmm, I can't reproduce the issue in a fresh profile (where I enabled session restore by default), for what it's worth. So there may be some additional strangeness, or a race condition of some sort.

I tried pinning the bugdash tab and adding some more foreground tabs to try to recreate my main browser profile experience, but still haven't been able to repro in the fresh profile.

@dholbert
Copy link
Author

(It also worked just fine when I just quit & reopend my main browsing session. So this doesn't reproduce 100% of the time there. But I did notice it once or twice yesterday, and first thing this morning when I reported the bug.)

@globau
Copy link
Collaborator

globau commented May 16, 2023

I suspect this is https://bugzilla.mozilla.org/show_bug.cgi?id=1762595, checking with Yoshi.

@globau
Copy link
Collaborator

globau commented May 17, 2023

Yes, this is a known Firefox issue - https://bugzilla.mozilla.org/show_bug.cgi?id=1803984 is what we're seeing.

Firefox is preloading bugdash.mjs, however preloading doesn't involve importmaps so imports can fail if preloading wins the loading race.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants