[CCA 5.2.7] Nocturne: CCA app opened with camera preview black screen and error message "File system error" |
||||||||||||
Issue descriptionChrome 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
,
Dec 5
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.
,
Dec 5
Also reproducible on Eve, Feedback ID: https://listnr.corp.google.com/product/208/report/85826643041
,
Dec 5
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
,
Dec 5
,
Dec 5
Hi Allen, Could you provide console logs in chrome developer tool?
,
Dec 5
,
Dec 6
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.
,
Dec 6
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?
,
Dec 6
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?
,
Dec 6
Hi WeiFang, Could you assign the bug to related engineer? Thanks.
,
Dec 6
,
Dec 6
cc Luciano since he works on MyFiles recently.
,
Dec 6
Hi, Thanks, yes I'm the right person to check this. Can you send me some code pointers for CCA? Cheers.
,
Dec 6
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; }
,
Dec 7
We tried this change. But downloads:MyFiles cannot grant permission from consent provider.
,
Dec 7
What's the consent provider?
,
Dec 7
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.
,
Dec 7
filesystem.requestFileSystem api will go to chromeos_file_system_delegate.cc. https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc?rcl=b38c320095ae37996d50a735f7d2690c9e0eed10&l=331 And query whether the permission is granted in consent_provider.cc. https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/file_system/consent_provider.cc?rcl=b38c320095ae37996d50a735f7d2690c9e0eed10&l=252
,
Dec 9
If we have to make some changes here, should we move these files to "MyFiles/Camera" or something like that now?
,
Dec 10
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.
,
Dec 10
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.
,
Dec 10
,
Dec 11
,
Dec 12
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
,
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
,
Dec 17
,
Dec 17
wait new CCA release to webstore
,
Dec 17
NOT Reproducible: Tested on Eve, Nocturne, Nautilus with build 11316.29.0, 72.0.3626.22 (dev) channel. (CCA 5.3 canery)
,
Dec 18
MyFiles feature is enabled in M73
,
Dec 28
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)
,
Jan 2
Hi Yuli, Could you help confirm that CCA 5.3.1 includes the fix in #27?
,
Jan 2
Yes, it's included in CCA 5.3.1 (comment# 32).
,
Jan 9
Still reproducible on BabyTiger with build 11522.0.0, 73.0.3664.0 Feedback ID: https://listnr.corp.google.com/report/85897944570
,
Jan 10
allendam@, The fix is in CCA 5.3. Could you still repro with CCA 5.3?
,
Jan 10
Not reproducible on BabyTiger PVT with build 11558.0.0, 73.0.3667.0 (dev) channel (CCA 5.3.2 canary)
,
Jan 14
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
,
Jan 15
re #38: The fix is only included in CCA 5.3. CCA 5.2.6 doesn't include that fix. Thanks.
,
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
,
Jan 16
Not reproducible: verified on Nocturne with build 11587.0.0, 73.0.3669.0 (dev) channel. (CCA 5.3.3 canary)
,
Jan 16
,
Jan 16
|
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by allendam@chromium.org
, Dec 5