crosswalk-project / crosswalk

A web runtime built on Chrome. This project is currently unmaintained.
https://crosswalk-project.org/blog/crosswalk-final-release.html
BSD 3-Clause "New" or "Revised" License
2.33k stars 651 forks source link

Popup “Failed to open selected file” while trying to pick up a file from file manager on Android 4.2 #808

Closed jinxian-intel closed 10 years ago

jinxian-intel commented 10 years ago

BUG DETAILED DESCRIPTIONS The crosswalk will popup “Failed to open selected file” when finish selecting html files. file picker unable to work. Test steps:

  1. Install XWalkRuntimeLib.apk and XWalkRuntimeShell.apk on Android device
  2. Launch the app which app-url is webtestingserver
  3. Run the tct-fileapi-w3c-tests module, and select the Blob_size_type case.
  4. Click “Choose files” button, and select one file.

Environment: Android IA: crosswalk-1.29.8.0 ZTE V975

EXPECTED OUTCOME: Expect the result is “pass”

ACTUAL OUTCOME: Popup “Failed to open selected file”

yongsheng commented 10 years ago

why do you guys use Runtime shell to do tests? It's not appropriate because it's for internal debugging.

yongsheng commented 10 years ago

anyway, it's a bug and we'll fix it.

jinxian-intel commented 10 years ago

Both Template and Runtime shell are failed. On our normal testing, we using packed apk from the template.

wang16 commented 10 years ago

Can you also verify it on CoreShell, so that we can identify if it's brought by shared mode.

yongsheng commented 10 years ago

ok. In my testing environment, I can't even see the popup dialog to select a file. @jinxian-intel is it same as yours?

@wang16 RuntimeShell is not using the shared mode. firstly I think the permission 'read_external_storage' is not added in the AndroidManifest.xml according to @jinxian-intel 's comment.

wang16 commented 10 years ago

AppTemplate, RuntimeShell, RuntimeClientShell all have WRITE_EXTERNAL_STORAGE permission.

yongsheng commented 10 years ago

we've already included 'WRITE_EXTERNAL_STORAGE' permission. For this case, i think we should add 'READ_EXTERNAL_STORAGE' because it's obviously for reading.

wang16 commented 10 years ago

And i tried to upload an image to weibo, it works for me.

wang16 commented 10 years ago

According to http://developer.android.com/reference/android/Manifest.permission.html, App who has WRITE_EXTERNAL_STORAGE permission will implicitly be granted read permission.

jinxian-intel commented 10 years ago

@wang16 and @yongsheng , I further investigate it, and found that if user packs up file from Gallery, it's ok, if user packs up file from File Manager, error "Failed to open selected file" will pops up.

yongsheng commented 10 years ago

anyone from QA who can help verify it?

ininallen commented 10 years ago

This bug has been migrated to JIRA, please track this issue in https://crosswalk-project.org/jira/browse/XWALK-24 . Thanks.