New issue
Advanced search Search tips

Issue 884964 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Error when Drive is to ready: TypeError: Cannot read property 'isDirectory' of null

Project Member Reported by lucmult@chromium.org, Sep 18

Issue description

After an system upgrade the Drive volume takes a while to be ready to use, for unknown reason atm, however the UI can raise the error when clicking on the "Google Drive" root.

See attached screenshot of the console with error and the export of the error messages.
 
hhaomjibdihmijegdhdafkllkbggdgoj-1537234905936.log
19.3 KB View Download
Screenshot 2018-09-18 at 11.42.05 AM.png
487 KB View Download
Owner: lucmult@chromium.org
Status: Assigned (was: Untriaged)
The issue seems to be caused in file_manager_commands.js:

* CommandHandler listens to different events, like "drive-connection-changed" [1].
* Most events execute "updateAvailability" which checks for "canExecuteChange" in every command.
* "paste-into-folder" command uses "CommandUtil.getCommandEntries" [2].
* "CommandUtil.getCommandEntries" [3] can return "directory_tree.selectedItem.entry" which can be null.  <-- we should guard against null here.

[1] - https://cs.chromium.org/chromium/src/ui/file_manager/file_manager/foreground/js/file_manager_commands.js?l=347-348&rcl=994c3fc22de4fce492a63f6825fb83c52d0d73b2
[2] - https://cs.chromium.org/chromium/src/ui/file_manager/file_manager/foreground/js/file_manager_commands.js?l=1072&rcl=994c3fc22de4fce492a63f6825fb83c52d0d73b2
[3] - https://cs.chromium.org/chromium/src/ui/file_manager/file_manager/foreground/js/file_manager_commands.js?l=50&rcl=994c3fc22de4fce492a63f6825fb83c52d0d73b2

Sign in to add a comment