js.map & css.map thows error

115 views
Skip to first unread message

Inter Net

unread,
Jun 5, 2021, 5:23:57 AM6/5/21
to Chromium Extensions
Hi, I use a custom self made Reactjs boilerplate and my extension works fine but I'm still not able to get rid of these errors 819062a5a222b8e05e41cb8ae4ecf00b.png

Are the chunks witch contain .map safe to ignore? It seems to the extension works fine even without defining them in the manifest content_scripts.

What can I do to fix this? 
Thanks

Cuyler Stuwe

unread,
Jun 7, 2021, 10:38:10 AM6/7/21
to Inter Net, Chromium Extensions
These missing map files represent sourcemaps.

Sourcemaps are files that enable you to view transformed code as it was originally written, generally for debugging purposes.

The only impact they might have on production is regarding extension approval, where they might prove helpful if your code is selected for manual review.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/c2fb2e25-1329-41f0-add7-4fc92553e9a4n%40chromium.org.

Inter Net

unread,
Jun 11, 2021, 4:33:51 AM6/11/21
to Chromium Extensions, salem...@gmail.com, Chromium Extensions, Inter Net
I'm not including source maps anymore in my bundle, I assume the chance of getting approval is now higher, The only error left is now `Manifest: property 'icons' ignored, type array expected.` I checked all the extension development docs and it does not expect an array, but the error still insists that it should be one, converting it to an error results in the extension not working at all.

````
"icons": { "192": "icon192.png" },
```
This is how I have it and how the Documentation wants it, but the console says `Manifest: property 'icons' ignored, type array expected.` what can it be maybe some react side code causing this? Thanks

apell...@copper.com

unread,
Jun 11, 2021, 10:38:12 AM6/11/21
to Chromium Extensions, zela...@gmail.com, salem...@gmail.com, Chromium Extensions
If you are trying to make sourcemaps work while developing your extension, there is a longstanding Chrome bug preventing them from loading via chrome-extension:// urls. I encourage you to follow the bug so it gets more attention. It really degrades the extension developer experience that this doesn't work.


If you have a local server running, and the ability to control your sourcemap URL declarations, you could make them accessible over http/s and then they would load. I would be worried about going to production with this solution as it may look like remote code loading to the CWS reviewers.

If you're not using sourcemaps, you could exclude them from your build output (consult your build tool and/or framework docs).

Cuyler Stuwe

unread,
Jun 11, 2021, 10:42:45 AM6/11/21
to apell...@copper.com, Chromium Extensions, zela...@gmail.com
I just use inline sourcemaps for debugging in Chrome. 

Works for me, at least.

Assuming you’re using Webpack:

Inter Net

unread,
Jun 11, 2021, 12:26:58 PM6/11/21
to Chromium Extensions, apell...@copper.com, Inter Net, salem...@gmail.com, Chromium Extensions
I excluded all source map from my build but what worries me now what if the day of the manual review comes and there are no source maps in the build and the reviewer requests it? Will in cases like this the extension be immediately shut down or is there any chance to file information like this later in case the reviewers need it?

Jackie Han

unread,
Jun 11, 2021, 2:59:14 PM6/11/21
to Inter Net, Chromium Extensions, apell...@copper.com, salem...@gmail.com
You don't need to waste time thinking about how they review your code. That's a black box for developers.

Reply all
Reply to author
Forward
0 new messages