Wesley Van den Eede
Wesley Van den Eede

Reputation: 3

Windows.Storage.KnownFolders.documentsLibrary.createFolderAsync returns network path not found in disconnected application

We are experiencing a very strange behaviour in one of our Typescript/WinJS apps. Basically the following code, returns a network path not found exception when the app is in a disconnected state:

export function getAll() {
    return Windows.Storage.KnownFolders.documentsLibrary.createFolderAsync("mysubfolder", Windows.Storage.CreationCollisionOption.openIfExists).then(function (childFolder) {
            console.log("OK");
            return "OK";
        }, function (error) {
            console.log(error);
    });
}

When the application is connected the function seems to work, it only happens when the device is not connected to a network.

We also specified the Documents Library capability in the appmanifest.

I tried getting more info using Windbg, but no luck:

(590.3fdc): C++ EH exception - code e06d7363 (first chance)
Script error: CONSOLE6002 unexpected error, app will shut down [object Object] (~16348)
Script error: CONSOLE6002 Une erreur inattendue est survenue :
{"exception":null,"error":{"initResult":{"description":"Le chemin réseau n’a pas été trouvé.\r\n","number":-2147024843,"stack":"WinRTError: Le chemin réseau n’a pas été trouvé.\r\n\n   at getResultsOfAsyncOp (Function code:338:5)\n   at op.completed (Function code:427:21)","asyncOpType":"Windows.Foundation.IAsyncOperation`1<Windows.Storage.StorageFolder>","asyncOpCausalityId":635}},"promise":{"_value":{"initResult":{"description":"Le chemin réseau n’a pas été trouvé.\r\n","number":-2147024843,"stack":"WinRTError: Le chemin réseau n’a pas été trouvé.\r\n\n   at getResultsOfAsyncOp (Function code:338:5)\n   at op.completed (Function code:427:21)","asyncOpType":"Windows.Foundation.IAsyncOperation`1<Windows.Storage.StorageFolder>","asyncOpCausalityId":635}},"_isException":false,"_errorId":11},"id":11} FATAL ERROR (~16348)
ModLoad: 00007ffe`112a0000 00007ffe`1145d000   C:\Windows\System32\Windows.UI.Immersive.dll

Any help on finding out what exactly is going on is welcome.

Upvotes: 0

Views: 187

Answers (1)

Sunteen Wu
Sunteen Wu

Reputation: 10627

I cannot reproduce your issue on my side. I created a minimized project for testing here, which can run successfully on my local machine without internet connected. My test platform is windows 10 build 14393, device is PC.You can test it on your device and compare with your project if some configurations are needed. Otherwise it will be something wrong with your environment or other codes.

In additionally, DocumentsLibrary is not recommended for using since with this capability configured you cannot publish your app to windows store. You can try to use PicturesLibrary instead. More details please reference this article.

Upvotes: 1

Related Questions