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

Issue 911902 link

Starred by 5 users

Issue metadata

Status: Verified
Owner:
Closed: Dec 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

[CCA 5.2.7] Nocturne: CCA app opened with camera preview black screen and error message "File system error"

Project Member Reported by allendam@chromium.org, Dec 5

Issue description

Chrome OS Version: 11343.0.0, 73.0.3629.0 (dev) channel 
Android vers: 9
Devices: Nocturne DVT (A70 Main4)

Steps To Reproduce:
1.Open "CCA 5.2.7" app from launcher (desktop/landscape mode) 
Observe behavior below: 

Expected result:
CCA should open without any issue

Actual result:
CCA app opened with camera preview black screen and error message "File system error"

How frequently does this problem reproduce? (100%) 

Feedback ID: https://listnr.corp.google.com/product/5015361/report/85826614369
 
Description: Show this description
It's work fine with build 11316.1.0, 72.0.3626.0 (dev) channel. But after I updated to 11343.0.0, 73.0.3629.0 (dev) channel and the issue occurs.
Also reproducible on Eve, Feedback ID: https://listnr.corp.google.com/product/208/report/85826643041
When I disabled ARC++, open default CCA 5.2.6, still reproducible on Nocturne and Eve. Feedback ID: https://listnr.corp.google.com/product/208/report/85826648623
Cc: henryhsu@chromium.org
Owner: henryhsu@chromium.org
Owner: allendam@chromium.org
Hi Allen,
Could you provide console logs in chrome developer tool?

Nocturne_CCA5.2.7.tgz
2.9 MB Download
Eve_CCA5.2.7.tgz
1.9 MB Download
Please launch CCA first and open CCA 'Details' in chrome://extensions/ to choose 'Inspect views: views/main.html'. It'll invoke 'DevTools' window.
Please send us the screenshot of its 'Console'. Thanks much.
Owner: henryhsu@chromium.org
I reproduced the bug for both public CCA (5.2.6) and canary CCA (5.2.7).
The console log says:
"External file system should be available"

It seems that cca.models.FileSystem.initExternalFs_() failed to obtain the external file system handle. Henry could you take a look?
getVolumeList only returns "downloads:MyFiles".
It seems like kMyFilesVolume feature is enabled.
https://cs.chromium.org/chromium/src/chromeos/chromeos_features.cc?rcl=31c1d53ebce0214351eb9c4e9c7d7f5d7e34a78e&l=54

And it causes VolumeManager only returns MyFiles.

There are several issues here:
1. get_volume_list test should consider kMyFilesVolume feature
https://codesearch.chromium.org/chromium/src/chrome/test/data/extensions/api_test/file_system/get_volume_list/background.js?l=17

2. consent_provider should consider kMyFilesVolume as well.
When an extension has fileSystem.requestDownloads permission, we should grant the permission for Downloads folder.
Now only MyFiles root is returned. ConsentProvider should modify it accordingly.

Hi Shenghao,
Can files app team fix it since they enabled the feature?
Owner: weifangsun@chromium.org
Hi WeiFang,
Could you assign the bug to related engineer?
Thanks.
Cc: lucmult@chromium.org
cc Luciano since he works on MyFiles recently.
Cc: weifangsun@chromium.org
Components: Platform>Apps>FileManager
Status: Assigned (was: Untriaged)
Hi, 

Thanks, yes I'm the right person to check this.

Can you send me some code pointers for CCA?

Cheers.
Hum... I see that it seems to use a different repository:
https://chromium.googlesource.com/apps/camera/

I'm not sure how to change, build and test in this repo, but the change should be something like:

[09:25:03] $ git diff
diff --git a/src/js/models/file_system.js b/src/js/models/file_system.js
index d58a037..f82d6a3 100644
--- a/src/js/models/file_system.js
+++ b/src/js/models/file_system.js
@@ -82,7 +82,7 @@ cca.models.FileSystem.initExternalFs_ = function() {
     chrome.fileSystem.getVolumeList((volumes) => {
       if (volumes) {
         for (var i = 0; i < volumes.length; i++) {
-          if (volumes[i].volumeId.indexOf('downloads:Downloads') !== -1) {
+          if (volumes[i].volumeId.indexOf('downloads:') !== -1) {
             chrome.fileSystem.requestFileSystem(volumes[i], resolve);
             return;
           }

### OR:
[09:25:09] $ git diff
diff --git a/src/js/models/file_system.js b/src/js/models/file_system.js
index d58a037..0fbe0c8 100644
--- a/src/js/models/file_system.js
+++ b/src/js/models/file_system.js
@@ -82,7 +82,8 @@ cca.models.FileSystem.initExternalFs_ = function() {
     chrome.fileSystem.getVolumeList((volumes) => {
       if (volumes) {
         for (var i = 0; i < volumes.length; i++) {
-          if (volumes[i].volumeId.indexOf('downloads:Downloads') !== -1) {
+          if (volumes[i].volumeId.indexOf('downloads:Downloads') !== -1 ||
+              volumes[i].volumeId.indexOf('downloads:MyFiles') !== -1) {
             chrome.fileSystem.requestFileSystem(volumes[i], resolve);
             return;
           }

We tried this change. But downloads:MyFiles cannot grant permission from consent provider.
What's the consent provider? 
Hi Luciano,

You can follow https://sites.google.com/a/google.com/chromeos-video/andromeda-camera#TOC-How-to-make-local-CCA-signed-with-public-release-key-to-utilize-JS-private-APIs- to install extension with unpacked method.

In chrome camera app source tree, you can use the way to build and test.
1. make clean; make
2. scp -r build/camera $DUT:/tmp
3. In $DUT, change to /home/user/$USER/Downloads/ directory.
   mv /tmp/camera . && chown -R chronos:chronos camera/
4. In $DUT, go to chrome://extension, Load unpacked, select camera directory in Downloads/
5. launch Chrome camera app. Please disable ARC++ first.
If we have to make some changes here, should we move these files to "MyFiles/Camera" or something like that now?
We discussed the directory with weifang several times. She told us to use Downloads/.
If we want to change photo directory, Chrome camera app, Google camera app, and photo app should be changed as well.
And the permission name fileSystem.requestDownloads may be also need to modify accordingly.
Owner: henryhsu@chromium.org
Thanks for Luciano's help.
We can request file system for downloads:MyFiles.
CCA needs to know it and changes the saved directory to MyFiles/Downloads.
Status: Started (was: Assigned)
Cc: ajha@chromium.org
 Issue 913407  has been merged into this issue.
Also reproducible on Dru with build 11382.0.0 , 73.0.3636.0. (dev) channel
Feedback ID: https://listnr.corp.google.com/product/208/report/85842467993
Project Member

Comment 27 by bugdroid1@chromium.org, Dec 17

The following revision refers to this bug:
  https://chromium.googlesource.com/apps/camera/+/285aa512ca44c8f0bd7f2e367ac5ab273b627f77

commit 285aa512ca44c8f0bd7f2e367ac5ab273b627f77
Author: Heng-Ruey Hsu <henryhsu@chromium.org>
Date: Mon Dec 17 10:14:13 2018

Generalize downloads folder for external file system

After MyFiles feature is enabled in chromium, downloads
folder is under MyFiles instead of root.

BUG= chromium:911902 
TEST=manually test

Change-Id: Ie3f3f4d3347b9e0f9281cf7c26bb85a1d210f0e4
Reviewed-on: https://chromium-review.googlesource.com/c/1369474
Reviewed-by: yuli <yuli@chromium.org>
Tested-by: Heng-ruey Hsu <henryhsu@chromium.org>

[modify] https://crrev.com/285aa512ca44c8f0bd7f2e367ac5ab273b627f77/src/js/models/file_system.js
[modify] https://crrev.com/285aa512ca44c8f0bd7f2e367ac5ab273b627f77/src/js/views/browser.js
[modify] https://crrev.com/285aa512ca44c8f0bd7f2e367ac5ab273b627f77/src/js/views/camera/gallerybutton.js
[modify] https://crrev.com/285aa512ca44c8f0bd7f2e367ac5ab273b627f77/src/js/models/gallery.js

Status: Fixed (was: Started)
wait new CCA release to webstore
NOT Reproducible: Tested on Eve, Nocturne, Nautilus with build 11316.29.0, 72.0.3626.22 (dev) channel. (CCA 5.3 canery)
MyFiles feature is enabled in M73
NOT Reproducible: Tested on Eve, Nocturne, Nautilus with build 11316.50.0, 72.0.3626.38. and 11480.0.0, 73.0.3644.0 (dev) channel. (CCA 5.3.1 canary)
Hi Yuli,

Could you help confirm that CCA 5.3.1 includes the fix in #27?
Yes, it's included in CCA 5.3.1 (comment# 32).
Still reproducible on BabyTiger with build 11522.0.0, 73.0.3664.0
Feedback ID: https://listnr.corp.google.com/report/85897944570
Owner: allendam@chromium.org
allendam@,
The fix is in CCA 5.3. Could you still repro with CCA 5.3?
Not reproducible on BabyTiger PVT with build 11558.0.0, 73.0.3667.0 (dev) channel (CCA 5.3.2 canary) 
still reproducible again on Nocturne with build 11578.0.0, 73.0.3669.0. (dev) channel..with ARC++ disabled (CCA 5.2.6)
Feedback ID: https://listnr.corp.google.com/report/85908401368
re #38: The fix is only included in CCA 5.3. CCA 5.2.6 doesn't include that fix. Thanks.
Project Member

Comment 40 by bugdroid1@chromium.org, Jan 15

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

commit 285aa512ca44c8f0bd7f2e367ac5ab273b627f77
Author: Heng-Ruey Hsu <henryhsu@chromium.org>
Date: Mon Dec 17 10:14:13 2018

Generalize downloads folder for external file system

After MyFiles feature is enabled in chromium, downloads
folder is under MyFiles instead of root.

BUG= chromium:911902 
TEST=manually test

Change-Id: Ie3f3f4d3347b9e0f9281cf7c26bb85a1d210f0e4
Reviewed-on: https://chromium-review.googlesource.com/c/1369474
Reviewed-by: yuli <yuli@chromium.org>
Tested-by: Heng-ruey Hsu <henryhsu@chromium.org>

[modify] https://crrev.com/285aa512ca44c8f0bd7f2e367ac5ab273b627f77/src/js/models/file_system.js
[modify] https://crrev.com/285aa512ca44c8f0bd7f2e367ac5ab273b627f77/src/js/models/gallery.js
[modify] https://crrev.com/285aa512ca44c8f0bd7f2e367ac5ab273b627f77/src/js/views/browser.js
[modify] https://crrev.com/285aa512ca44c8f0bd7f2e367ac5ab273b627f77/src/js/views/camera/gallerybutton.js

Not reproducible: verified on Nocturne with build 11587.0.0, 73.0.3669.0 (dev) channel. (CCA 5.3.3 canary)
Status: Verified (was: Fixed)
Cc: jcliang@chromium.org slangley@chromium.org
 Issue 916686  has been merged into this issue.

Sign in to add a comment