-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Filesystem doesn't create directory or write files. overall write fails for everything. even with the permissions allowed #2827
Comments
Hi. I'm currently playing with the |
I have tested with 3 different devices, 2 Android, 1 iOS. All fails writing file to storage. I created a fresh app with following commands. ionic start in home.page.html ...................
...................... in home.page.ts ...................
................... and it doesn't ask for permissions on fresh install, and it presents, black "{}" response for first create and then throws catch error saying folder existings. which is expected. then I just close the app, and relaunch it. create the same folder again and it shows success. and then create again fails.
Note
D:\code\DemoDemoDemo>npx cap doctor Installed Dependencies: [success] Android looking great! 👌 |
By your statement "create the same folder again and it shows success. and then create again fails.", you mean, you allow the app to create the folder and it successfully created one? and then when you do it again, it displays the error that the folder already exists? Also, could you try running the following code in Android? I omitted the
The I also encountered this error several hours ago:
But mine was, instead of |
I am able to narrow down that fact that folders and files are created yet. even this, results in error in the catch method. though using the adb-shell command I can see the files and folders are all created fine in data director. (this is private folder).
most strange thing is that when I look a the code in Filesystem.java it says File does not exist but the error here says Entrydoes not exist. |
can you provide a sample app? |
closing as there was no answer |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
npx cap doctor
output:Latest Dependencies:
@capacitor/cli: 2.0.1
@capacitor/core: 2.0.1
@capacitor/android: 2.0.1
@capacitor/electron: 2.0.1
@capacitor/ios: 2.0.1
Installed Dependencies:
@capacitor/electron not installed
@capacitor/ios 2.0.0
@capacitor/core 2.0.0
@capacitor/cli 2.0.0-beta.1
@capacitor/android 2.0.0
Affected Platform(s)
Current Behavior
Filesystem.mkdir({ directory: FilesystemDirectory.Data, path: "pictures"}).catch(err => {
console.log('folder create warning', err.message);
});
doesn't create any folder, doesn't write any files. even after asking for permissions and permission defined from app info, yet fails to do so. I though I was paranoid, so I picked up old project which was working fine, and downloading on device, I uninstalled the app, rebuild it and then it stopped working. no npm install. plain ionic build --prod to run it on device. and this code based was not changed in last week or so.
Expected Behavior
It should be able to write files or create directories.
Sample Code or Sample Application Repo
Reproduction Steps
Other Technical Details
npm --version
output:6.11.3
node --version
output:v12.16.1
pod --version
output (iOS issues only):Other Information
The text was updated successfully, but these errors were encountered: