media db dialog appears 7 times asking for permission

RESOLVED INCOMPLETE

Status

()

Core
DOM: Device Interfaces
--
major
RESOLVED INCOMPLETE
5 years ago
a month ago

People

(Reporter: Gerardo Oscar JT, Unassigned)

Tracking

({b2g-testdriver})

Trunk
b2g-testdriver
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11

Steps to reproduce:

I use 'media db' to store image, audio and video in the mobile device.


Actual results:

A dialog appears 7 times asking for permission although permissions settings was 'Grant' or 'Ask'


Expected results:

Fail at permission management
(Reporter)

Updated

5 years ago
Severity: normal → major
Keywords: b2g-testdriver
Priority: -- → P3
Needs more information.

Is this device storage related? What JS code are you running?
Flags: needinfo?(gerardooscarjt)
(Reporter)

Comment 2

5 years ago
Yes, device-storage is related.

The problem is when MediaDB is used.


==== Manifest fragment ====
  "permissions": {
    "systemXHR":{},
    "device-storage:pictures":{ "access": "write" },
    "device-storage:music":{ "access": "write" },
    "device-storage:videos":{ "access": "write" }
  }

==== Using MediaDB ====
var xhr = new XMLHttpRequest({mozSystem:true});
xhr.open('GET', that.url);
xhr.responseType = 'blob';
xhr.onreadystatechange = function(event) {
	if (xhr.readyState == XMLHttpRequest.DONE) {
		if (xhr.status == 200) {
			var imagedb = new MediaDB('pictures');
			imagedb.onready = function() {
				imagedb.addFile(that.model.name, xhr.response);
			};
		} else {
			alert('Download failed');
		}
	}
};
xhr.send();
Flags: needinfo?(gerardooscarjt)

Updated

5 years ago
Summary: media db → media db dialog appears 7 times asking for permission

Updated

5 years ago
Component: General → DOM: Device Interfaces
Flags: needinfo?(doug.turner)
Priority: P3 → --
Product: Boot2Gecko → Core
Version: unspecified → Trunk
Let's see what Doug thinks on this bug.

Comment 4

5 years ago
Gerardo,
Does the problem happen if you request { "access": "readwrite" } ?
Flags: needinfo?(doug.turner) → needinfo?(gerardooscarjt)
(Reporter)

Comment 5

5 years ago
If I request { "access": "readwrite" } it does not work (It does not show confirm nor save the file)
Flags: needinfo?(gerardooscarjt)

Comment 6

5 years ago
gregor, any idea what might be going on?
I would have to run the code in order to test this. Maybe 811026 solves this issue but I am not sure.
FxOS/Gonk has been removed from the codebase. Mass-invalidating FxOS related Device Interface bugs to clean up the component. 

If I incorrectly invalidated something, please let me know.
Status: UNCONFIRMED → RESOLVED
Last Resolved: a month ago
Resolution: --- → INVALID
Bulk correction of resolution of B2G bugs to INCOMPLETE.
Resolution: INVALID → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.