MSApp.createFileFromStorageFile hangs

Confirmed Issue #11749672 • Assigned to Jameson L.

Details

Author
Kagami R.
Created
Apr 21, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
15.15063
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

  1. Create a new JavaScript Blank App (Universal Windows) on Visual Studio
  2. Copy-paste this code on js/main.js
// Your code here!
async function main() {
    let picker = new Windows.Storage.Pickers.FileOpenPicker();
    picker.fileTypeFilter.push(".png", ".jpg", ".jpeg", ".bmp", ".webp", ".gif");
    picker.suggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.picturesLibrary;
    const storageFile = await picker.pickSingleFileAsync();
    return MSApp.createFileFromStorageFile(storageFile);
}
main().then(() => document.body.textContent = "done");

Expected

body should be “done”

Actual

Code hangs on the MSApp.createFileFromStorageFile line with high probability

PS: The file picker dialog correctly appears but then the Promise never resolves even after I selected a file, and the app consumes one full CPU core if you see via Task Manager.

Attachments

1 attachment

Comments and activity

  • Changed Steps to Reproduce

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

    Changed Status to “Not reproducible”

  • Changed Status from “Not reproducible”

  • I can still repro this on build 16232, what do you see? Body should be changed to “done” instead of "Content goes here!".

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Hi Kagami,

    I just noticed that over two months ago I attempted to send you a response with a question.  However, I did not set the response to get published.  I assumed this was no longer an issue as I didn’t get a response.  I apologize for that.  Rather rude of me to just close the ticket.   :-/

    I will continue looking at this but wanted to send this now as I just realized it.

    Steve

    This was my question and response:

    "Steven K
    commented 2 months ago

    Hi Kagami,

    Can you verify the option you used to create the project?  See the attached screenshot.  I have the other option selected as an example.  I.e. not the one you mentioned.  FYI, I tested both types.

    Check this reference for an example.  Replace the WinJS.log with console.log() as needed based on the project type e.g. WinJS App vs JavaScript "Blank App".

    https://docs.microsoft.com/en-us/uwp/api/Windows.Storage.Pickers.FileOpenPicker

    Or this

    https://msdn.microsoft.com/library/df082239-381c-462f-9f97-d2b390a2052e

    …"

  • That’s OK, good to read your previous response :D

    I selected the first option "Blank App (Universal Windows)". The file picker dialog correctly appears but then the Promise never resolves even after I selected a file, and the app consumes one full CPU core if you see via Task Manager.

  • Changed Steps to Reproduce

  • This is a regression, please take care of it X(

  • Hi Kagami,

    I repro’d this in the latest public release and a very recent development release.  Thank you for the submission and pushing the issue.  Apologize for the very long delay,

    Steve

  • Microsoft Edge Team

    Changed Assigned To to “wwatri”

    Changed Assigned To from “wwatri” to “Jameson L.”

    Changed Status to “Confirmed”

You need to sign in to your Microsoft account to add a comment.

Sign in