The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

GetFilesAsync COM Exception RRS feed

  • Question

  • I have seen a number of people run into this same problem but I have not been able to find an answer. When I call GetFilesAsync on a folder running on the phone I get a COM Exception.

    _songs = await AlbumFolder.GetFilesAsync();

    The application has the music library capability ENABLED. This is a 8.1 universal application. The same line runs fine on a computer/tablet. The AlbumFolder is a sub folder in the Music Library.

    I have tried several different versions. Including the following:

    _songs = await AlbumFolder.GetFilesAsync(CommonFileQuery.DefaultQuery);
    _songs = await AlbumFolder.GetFilesAsync(CommonFileQuery.DefaultQuery, 0 , 5);

    There are only 10-12 files in the sub folder.

    I would greatly appreciate suggestions to resolve this. So far I have wasted a lot of time on what should be a basic platform capabilities.

    Tuesday, April 28, 2015 4:19 AM

All replies

  • Hi jsullyboy2,

    Thank you very much for reporting this issue.

    I have tested in my side with the following code many days ago:

    I can get the music file, so could you please try to test the above code to see if it works in your side?

    Meanwhile, I will consult our Windows Phone experts to see if this is a known issue or any workaround for it. Once there is any update, I will post it here.

    Thanks for your understanding.

    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, April 29, 2015 9:53 AM