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

Issue 717442 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Make it easier to debug MTP failures

Project Member Reported by satorux@chromium.org, May 2 2017

Issue description

What steps will reproduce the problem?
1. Select ~1900 photo/video files from a folder on MTP (Android phone)
2. Copy these files to a folder on a USB flash drive

This failed for me (that's a separate issue) after copying 1700 files, with some error message in Files app UI, but the error message alone isn't helpful for debugging.

I think we should make it easier to debug by adding more logging:

1) more logging to MTPD
2) more logging to Files app's dev console (which you can open with Ctrl-Shift-J)

Would be good if we could easily tell if it's an issue on the Chromebook side or the Android phone side.


 
I personally added LOG(INFO) to all the MTP requests in mtpd and it was convenient to debug recent mtpd related bugs.
LOG(INFO) would be a good way if you can debug locally with your custom build of mtpd. My suggestion in the bug was to make it easier to debug on production build.

Does mtpd emit error messages to a log file when something goes wrong? If so, which log file? I'd like to check if my chromebook has relevant error messages. If not, we should change mtpd to do that.

> 2) more logging to Files app's dev console (which you can open with Ctrl-Shift-J)

When copying of a file failed, how about emitting detailed error messages (file name, error reason, etc.) to Files app's dev console?

Comment 3 by tetsui@chromium.org, May 29 2017

> Does mtpd emit error messages to a log file when something goes wrong? If so, which log file?
mtpd emits error messages to /var/log/messages if libmtp functions fail. But it may not be useful in a case such as when a libmtp function never returns.

> When copying of a file failed, how about emitting detailed error messages (file name, error reason, etc.) to Files app's dev console?
It would be good. I would create a CL for this.

Comment 4 by tetsui@chromium.org, May 31 2017

Status: Started (was: Assigned)
I created a simple patch that emits error reason and source file path to dev console. Because file systems are already abstracted inside chromium, it is hard to emit MTP specific error messages to dev console on FilesApp side.

I'm wondering if there are other information to show, and whether it is answering to this bug.

https://codereview.chromium.org/2914773002/
Cc: satorux@chromium.org
satorux@:

Did you imagine something more informative? Or the following is sufficient?

"copy failed. sourceUrl: (entry in MTP) error: (error type)"

error type is one of the following:
https://codesearch.chromium.org/chromium/src/chrome/browser/chromeos/extensions/file_manager/event_router.cc?l=216&rcl=d2ec4830b36d30ebf8ab495d18a6282db1020db1
Sounds like a good start to me. Definitely better than nothing. :)
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 1 2017

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

commit cae7e7b126db785cf7fb1ae7c6ebc558f1c2b5eb
Author: tetsui <tetsui@chromium.org>
Date: Thu Jun 01 05:04:12 2017

Add dev console logging for file copy failure.

BUG= 717442 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2914773002
Cr-Commit-Position: refs/heads/master@{#476197}

[modify] https://crrev.com/cae7e7b126db785cf7fb1ae7c6ebc558f1c2b5eb/ui/file_manager/file_manager/background/js/file_operation_util.js

Status: Fixed (was: Started)

Comment 9 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment