[ 
https://issues.apache.org/jira/browse/CB-12928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16082000#comment-16082000
 ] 

Alexander Sorokin commented on CB-12928:
----------------------------------------

I'm trying to reproduce it, and when I clone your sample repository and try to 
run launch the app using ionic, I'm getting the following error:

{noformat}
 C:\Cordova\Cordova_Windows_UWP_Shared_Local_Folder> ionic cordova run windows
✔ Creating .\www directory for you - done!
> cordova platform add --save windows
✖ Running command - failed!
[ERROR] An error occurred while running cordova platform add --save windows 
(exit code 1):

        Warning: using prerelease version 7.0.2-dev ([email protected])
        Using cordova-fetch for cordova-windows@~5.0.0
        Adding windows project...
        Creating Cordova Windows Project:
        Path: platforms\windows
        Namespace: com.ionicframework.filesavepoc970326
        Name: FileSavePOC
        Windows project created with [email protected]
        Installing "com-myfuelmaster-file-save" for windows
        Error during processing of action! Attempting to revert...
        Failed to install 'com-myfuelmaster-file-save': Error: Uh oh!
        ENOENT: no such file or directory, open
        
'C:\Cordova\Cordova_Windows_UWP_Shared_Local_Folder\plugins\com-myfuelmaster-file-save\www\FileSavePlugin.js'
        at Error (native)
        at Object.fs.openSync (fs.js:640:18)
        at Object.fs.readFileSync (fs.js:508:33)
        at handlers.js-module.install
        
(C:\Cordova\Cordova_Windows_UWP_Shared_Local_Folder\platforms\windows\cordova\lib\PluginHandler.js:171:36)
        at Object.ActionStack.process
        
(C:\Cordova\Cordova_Windows_UWP_Shared_Local_Folder\platforms\windows\cordova\node_modules\cordova-common\src\ActionStack.js:56:25)
        at PluginManager.doOperation
        
(C:\Cordova\Cordova_Windows_UWP_Shared_Local_Folder\platforms\windows\cordova\node_modules\cordova-common\src\PluginManager.js:117:20)
        at PluginManager.addPlugin
        
(C:\Cordova\Cordova_Windows_UWP_Shared_Local_Folder\platforms\windows\cordova\node_modules\cordova-common\src\PluginManager.js:147:17)
        at Api.addPlugin 
(C:\Cordova\Cordova_Windows_UWP_Shared_Local_Folder\platforms\windows\cordova\Api.js:219:10)
        at handleInstall (C:\Cordova\cordova-lib\src\plugman\install.js:619:6)
        at C:\Cordova\cordova-lib\src\plugman\install.js:379:28
        Error: Uh oh!
        ENOENT: no such file or directory, open
        
'C:\Cordova\Cordova_Windows_UWP_Shared_Local_Folder\plugins\com-myfuelmaster-file-save\www\FileSavePlugin.js'
{noformat}

> Windows UWP shared Local Folder being removed
> ---------------------------------------------
>
>                 Key: CB-12928
>                 URL: https://issues.apache.org/jira/browse/CB-12928
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-windows
>    Affects Versions: 6.5.0
>         Environment: When running on a Windows 10 platform
>            Reporter: Jon Hoffman
>            Assignee: Jesse MacFadyen
>            Priority: Critical
>              Labels: windows
>
> We are writing an application using Ionic 2 for Windows 10. The application 
> will need to share data between different users on the same machine therefore 
> we are using the shared local folder to save the data to as described in the 
> “Using Shared Local” section of this page: 
> https://blogs.windows.com/buildingapps/2016/05/24/sharing-your-local-app-data
> This method works great and we made changes to the Cordova-Sqlite-Storage 
> plugin so it will write the database file to the shared local folder. The 
> problem is when we update our application the shared local folder is removed 
> thereby erasing all of the saved data.
> I created a native C# application to see if we had the same behavior when we 
> updated a native application. When we updated the native app the shared local 
> folder was not removed therefore this is an issue specific to our hybrid 
> application.
> My first thought was maybe the Add-AppDevPackage.ps1 scripts were different 
> between the native and Ionic 2 application since that is the script that we 
> used to perform the installation and update. I ran a comparison tool to 
> compare the scripts from the Ionic2 and native applications however the two 
> files are exactly the same.
> I can also verify that the user local folder for the application is not 
> removed when we perform an update however that folder is specific to the 
> individual user and we can not share data from that folder. Does anyone know 
> why the shared local folder is removed when we perform an update of an Ionic 
> 2 application?
> I put a proof of concept application that simply writes a text file to the 
> shared local folder and the application local folder that can be used to see 
> how the shared local folder is removed when we update the app.  The 
> repository is located here: 
> https://github.com/hoffmanjon/Cordova_Windows_UWP_Shared_Local_Folder  and 
> includes a windows plugin to write to the shared local folder.  
> You will need to set a group policy to get the shared local folders working.  
> In the in the “Using Shared Local” section of this page: 
> https://blogs.windows.com/buildingapps/2016/05/24/sharing-your-local-app-data 
>  it describes how to change the policy and which one to change.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to