Closed
Bug 1026552
Opened 10 years ago
Closed 2 years ago
filehandle getMetadata does not return any result
Categories
(Core :: Storage: IndexedDB, defect, P5)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: guypaskar, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release) Build ID: 20140605174243 Steps to reproduce: var myFile = myFileHandler.open('readwrite'); // Retrieve the size of the file var getmeta = myFile.getMetadata(); getmeta.onsuccess = function (event) { //do something }; getmeta.onerror = function (error) { //do somthing }; Actual results: I do that for several files. and conslole.log the request returns from getMetadata function. I see that sometimes some requests logs a readystate pending and never get into the callback. I don't know yet why this is happening. But it's also the case with other functions (for example truncate) Expected results: getMetadata should work and return either success or error callback
Reporter | ||
Comment 1•10 years ago
|
||
Ok, I'm not sure what's wrong here but it is clear that the db is going into a weird situation. I would mention that it's not happening every time but ~ 1/3 times. what I do is saving creating a resource in an indexedDB of type fileHndler and than write to it. (after I write the entire file it is being downloaded by the browse) Then when I try to access this file again. I can get the filehandler but the onsuccess / onerror callbacks of getMetada or truncate does not fire for some reason. At the same time, I noticed that some other weird stuff happen when this scenario is happening. When I delete the database from the UI (on more information tab) it is getting screwed and can't be open again. afterwards when I restart the browser, the database is there again as if it was not deleted. Only when I delete it again after the restart it is really being deleted. I will keep investigating for more hints. but it seems like a really weird state.
Summary: FileRequest ready state is pending → filehandler getMetadata does not return any result
Comment 2•10 years ago
|
||
Could you also attach the loop (you mentioned that you do that for several files) ?
Reporter | ||
Comment 3•10 years ago
|
||
Here is a console log of the file name being taken from the db, the return value of getMetadata and a trace of onsuccess if it got inside the onsuccess callback You can see that for the last file - onsuccess does not fire. "confirmed_persistent" FileRequest { lockedFile: LockedFile, onprogress: null, readyState: "done", result: Object, error: null, onsuccess: peer5.core.data.FSioFireFox<.isExist/storeReq.onsuccess/getmeta.onsuccess(), onerror: peer5.core.data.FSioFireFox<.isExist/storeReq.onsuccess/getmeta.onerror() } "getmeta.onsuccess" "confirmed_persistent" FileRequest { lockedFile: LockedFile, onprogress: null, readyState: "pending", error: null, onsuccess: peer5.core.data.FSioFireFox<.isExist/storeReq.onsuccess/getmeta.onsuccess(), onerror: peer5.core.data.FSioFireFox<.isExist/storeReq.onsuccess/getmeta.onerror() } peer5.js:8057 "getmeta.onsuccess" "859de7686b2b55a9dd83.fi" FileRequest { lockedFile: LockedFile, onprogress: null, readyState: "done", result: Object, error: null, onsuccess: peer5.core.data.FSioFireFox<.isExist/storeReq.onsuccess/getmeta.onsuccess(), onerror: peer5.core.data.FSioFireFox<.isExist/storeReq.onsuccess/getmeta.onerror() } "getmeta.onsuccess" "859de7686b2b55a9dd83" FileRequest { lockedFile: LockedFile, onprogress: null, readyState: "pending", error: null, onsuccess: peer5.core.data.FSioFireFox<.isExist/storeReq.onsuccess/getmeta.onsuccess(), onerror: peer5.core.data.FSioFireFox<.isExist/storeReq.onsuccess/getmeta.onerror() }
Updated•10 years ago
|
Component: Untriaged → DOM: IndexedDB
Product: Firefox → Core
Summary: filehandler getMetadata does not return any result → filehandle getMetadata does not return any result
Updated•6 years ago
|
Priority: -- → P5
Comment 4•2 years ago
|
||
FileHandle is set to be removed, See also bug 1500343.
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•