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

Issue 837401 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Extension management page shows "ERROR" for console logs

Project Member Reported by crystallambert@chromium.org, Apr 26 2018

Issue description

Chrome Version:  67.0.3396.10 (Official Build) dev (64-bit)
OS: Mac OS

What steps will reproduce the problem?
(1)Place any console.log in extension script
(2)Load extension
(3)View extension on extension management page - displays bold red "ERROR" 

Showing an error for an intentional log can be alarm to extension developers. Maybe remove console.logs from causing extension management to display error. 
 
Cc: hcarmona@chromium.org dpa...@chromium.org
Components: UI>Browser>ExtensionsManagement
Labels: OS-Chrome OS-Linux OS-Mac OS-Windows
Owner: rdevlin....@chromium.org
Status: Assigned (was: Untriaged)
Given the UI treatment we use for the error console (a big scary red ERRORS button), I do wonder if it's a bit misleading for developers.  Perhaps we should limit the logs shown to only error LOG_ERROR and higher, so that console.log()s don't show up.

dpapad@, hcarmona@, any thoughts?

The ErrorConsole code in C++ actually supports per-extension settings, but we don't have UI to set that preference (and I'm not sure it's worth adding).
Logs can be useful, and a red "Error" button does seem more severe than it should be if you only have logs. Maybe making it black and re-labeling to "Error Console" or "Developer Console"?
Logs can be useful, but then you'd probably just open up dev tools, I'd think.  I think relabeling is a bit tricky because of length concerns, and also because some other errors (that are really errors) are shown there.

Maybe leave warnings, but omit logs, and keep the UX treatment the same to avoid significant UX changes?  And then if developers see they have an error and want to dive deeper and see the logs, they could inspect the page throwing the errors?  WDYT?

Comment 4 by dpa...@chromium.org, Apr 30 2018

I would prefer to stop showing console.log() messages in the "error console", than renaming the error console to be something more generic. 

As a general direction, I think reducing (or at least not increasing) the overlap between error console and DevTools would be better, both in terms of maintenance, but also for the users (to not confuse them about the purpose of "error console" feature).
Project Member

Comment 5 by bugdroid1@chromium.org, May 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5bc471caffeecea5f1b4b2d4fa99c58520571949

commit 5bc471caffeecea5f1b4b2d4fa99c58520571949
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Fri May 04 22:58:27 2018

[Extensions] Don't store logs in the error console

The error console shows errors that were reported across all the
different contexts an extension runs in (e.g., content scripts,
background pages, etc). It should ignore logs, though, so as to
avoid being overly noisy. Keep reporting warnings for now.

Add a unittest for the same.

Bug:  837401 
Change-Id: I4a0d89f85f2cfd31f2cb3a29051b8598bd78fafc
Reviewed-on: https://chromium-review.googlesource.com/1043156
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556232}
[modify] https://crrev.com/5bc471caffeecea5f1b4b2d4fa99c58520571949/chrome/browser/extensions/api/developer_private/extension_info_generator_unittest.cc
[modify] https://crrev.com/5bc471caffeecea5f1b4b2d4fa99c58520571949/chrome/browser/extensions/error_console/error_console.cc
[modify] https://crrev.com/5bc471caffeecea5f1b4b2d4fa99c58520571949/chrome/browser/extensions/error_console/error_console_browsertest.cc
[modify] https://crrev.com/5bc471caffeecea5f1b4b2d4fa99c58520571949/chrome/browser/extensions/error_console/error_console_unittest.cc
[modify] https://crrev.com/5bc471caffeecea5f1b4b2d4fa99c58520571949/chrome/test/data/extensions/error_console/content_script_log_and_runtime_error/content_script.js
[modify] https://crrev.com/5bc471caffeecea5f1b4b2d4fa99c58520571949/extensions/browser/extension_error_test_util.cc
[modify] https://crrev.com/5bc471caffeecea5f1b4b2d4fa99c58520571949/extensions/common/constants.cc
[modify] https://crrev.com/5bc471caffeecea5f1b4b2d4fa99c58520571949/extensions/common/constants.h
[modify] https://crrev.com/5bc471caffeecea5f1b4b2d4fa99c58520571949/extensions/renderer/extensions_render_frame_observer.cc

Status: Fixed (was: Assigned)
Cc: phanindra.mandapaka@chromium.org
 Issue 837089  has been merged into this issue.
Cc: sandeepkumars@chromium.org
 Issue 740404  has been merged into this issue.
 Issue 859334  has been merged into this issue.

Sign in to add a comment