New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769012 link

Starred by 24 users

Issue metadata

Status: Fixed
Closed: Nov 2017
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocked on:
issue 797712

Sign in to add a comment

Modules don't work in extensions

Project Member Reported by, Sep 26 2017

Issue description

What steps will reproduce the problem?
1. Load an extension with the content below.

What is the expected result?
The extension should load without error (and should have access to the module).

What happens instead of that?
The module fails to load and gives the error:
"Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec."

---  Extension  ---
// manifest.json
  "name": "foo",
  "description": "bar",
  "version": "0.1",
  "background": {"page": "background.html"}
  "manifest_version": 2

// background.html
<!doctype html>
<script src="background.js" type="module"></script>

// background.js
import {log} from '/module.js'

// module.js
export function log(data) { console.log(data); }

Project Member

Comment 1 by, Sep 28 2017

The following revision refers to this bug:

commit 6449de840aec46116c234a5865c4ba120a0e38d9
Author: Devlin Cronin <>
Date: Thu Sep 28 03:28:51 2017

[Extensions] Include mime type in served extension files

Modules enforce strict mime type requirements, but files served through
extension protocols don't specify a mime type. Include it in the
response headers. This enables modules for chrome extensions.

Add a test to exercise basic module use.

Bug:  769012 
Change-Id: I1eba64e9194c00b9feb39f5fb0f5576a53d34930
Commit-Queue: Devlin <>
Reviewed-by: Istiaque Ahmed <>
Reviewed-by: Matt Menke <>
Cr-Commit-Position: refs/heads/master@{#504885}

Comment 2 by, Sep 28 2017

cc: hiroshige
I think we only need to special case file URLs then.
Status: Fixed (was: Started)

Comment 4 by, Nov 15 2017

Test failed on 64.0.3268.0 (Official Build) canary (64-bit) (cohort: Clang-64)

Comment 5 by, Nov 22 2017

Can reproduce this issue on chrome 64.0.3275.0 (Official Build) canary (64-bit) (cohort: Clang-64).

Why this issue status is fixed? 
Firefox has the same (or a very similar) bug. If you want script modules to also work in Firefox extensions, you can vote here:
This bug seems to be a duplicate of
#c7 did you mean to link to a different issue?
#c8 yes, thanks for pointing out! this is the issue I wanted to refer to:
Re #5: The fix for this issue landed in 63.0.3227.0. If you can still reproduce this issue, please provide a test case.
 Issue 763673  has been merged into this issue.
Re #10: there is an old issue (#c18 find out the reason and give a way to resovle this problem, but this issue mark as won't fix. and now this issue has a wide impact on modules/local-files, consider to deal this suitable, not ignore)
Recent discussions: ~ #c30 (there is no following)
Blockedon: 797712
Components: Blink>HTML>Script
Thanks for heads up. Filed a new  Issue 797712  for tracking the particular issue caused by the local registry key.

(Leaving this issue closed as fixed, because the basic module script+extention issue has been fixed.)
Project Member

Comment 16 by, May 4 2018

The following revision refers to this bug:

commit 17d521bb5afbcc8d6ee95b46a4565351aee6d4fd
Author: Istiaque Ahmed <>
Date: Fri May 04 19:44:07 2018

Extensions: Add a test for importing modules from web

Bug:  769012 
Change-Id: Iae7e7ff1b338c2302476002c28dcc58378292404
Commit-Queue: Istiaque Ahmed <>
Reviewed-by: Devlin <>
Cr-Commit-Position: refs/heads/master@{#556156}

 Issue 728377  has been merged into this issue.

Sign in to add a comment