Skip to content
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

Saving files in custom data dir not working #1223

Open
2 tasks done
bqcrabtree opened this issue Apr 21, 2024 · 15 comments · May be fixed by #1448
Open
2 tasks done

Saving files in custom data dir not working #1223

bqcrabtree opened this issue Apr 21, 2024 · 15 comments · May be fixed by #1448
Labels
bug Something isn't working

Comments

@bqcrabtree
Copy link

Before submitting an issue, please check the following

  • I have searched for similar issues (both open and closed) and cannot find a duplicate
  • I agree to follow the Code of Conduct

Describe the bug

On the newest Saber version, custom data dirs selected via the UI (in this case a Syncthing directory) do not allow notes to be saved, and thereby the editor cannot be exited without closing the app manually.

To reproduce

  1. Be on the newest (v0.21.4) version of Saber on Android
  2. Set a custom data directory via the Settings UI
  3. Create a note and attempt to save it by either backing out or by clicking the save icon at the top left

Expected behavior

The file to save and the editor to close as normal

Saber version

v0.21.4

Device

  • Device: Samsung SM-X510
  • OS: Android 14 (OneUI 6.0)

Anything else?

No response

@bqcrabtree bqcrabtree added the bug Something isn't working label Apr 21, 2024
@Appel-flappen
Copy link

Can reproduce on pixel 6 with grapheneos.
Notably I cannot find any option to enable storage scopes for the Saber app, which would normally be required by any other app using shared storage space. seems like it might not be requesting permissions for storage?

@Luciogi
Copy link

Luciogi commented Apr 29, 2024

I guess that newly created directory has permission issue

@deepu2
Copy link

deepu2 commented May 18, 2024

I wanted to use Synching so I changed the directory and lost all my files (I didn't have much but still..). I can't create new notes too.

@faisal-kursheedali
Copy link

Getting this error message in saving the note in the custom directory

Exception has occurred. PathAccessException (PathAccessException: Cannot open file, path = '/storage/emulated/0/Eg/24-05-25 Untitled.sbn2' (OS Error: Operation not permitted, errno = 1))


This exception is thrown from the file: lib/pages/editor/editor.dart at line number 905 when running the app in the debug mode

@Iey4iej3
Copy link

Getting this error message in saving the note in the custom directory

Exception has occurred. PathAccessException (PathAccessException: Cannot open file, path = '/storage/emulated/0/Eg/24-05-25 Untitled.sbn2' (OS Error: Operation not permitted, errno = 1)) This exception is thrown from the file: lib/pages/editor/editor.dart at line number 905 when running the app in the debug mode

I think that this should be due to the permission of access of storage. I look at the list of permissions of Saber, and it does not contain such a permission, and thus this error is expected.

@aqazzu
Copy link

aqazzu commented Sep 24, 2024

I also have an issue with scoped permessions. Saber doesn't ask for the permission to access the custom folder on my galaxy tab S6 lite. I also wanted to use this approach to locally sync using Syncthing (sadly this manouver made me lose some notes I havent exported yet).

I'm asking about this bug's priority on the list of things to be done, I'd imagine solving this is important :)

@Iey4iej3
Copy link

I'm asking about this bug's priority on the list of things to be done, I'd imagine solving this is important :)

Simply click 👍 in the original post to raise the issue in #1196.

@ComputerElite
Copy link

I've forked saber and added the MANAGE_EXTERNAL_STORAGE permission. After enabling it the issues went away so I do support the idea that it has something to do with permissions. I'm now able to sync everything via syncthing

@bbenjadol
Copy link

I've forked saber and added the MANAGE_EXTERNAL_STORAGE permission. After enabling it the issues went away so I do support the idea that it has something to do with permissions. I'm now able to sync everything via syncthing

Are you able to release your compiled apk? I keep on facing build issues when trying to compile

@ComputerElite
Copy link

Will do that later in like 4h

@ComputerElite
Copy link

You can find a compiled version of my fork here https://github.com/ComputerElite/saber/releases/latest

@Iey4iej3
Copy link

You can find a compiled version of my fork here https://github.com/ComputerElite/saber/releases/latest

Could you please make this a pull request for Saber? Thanks.

@ComputerElite
Copy link

Could you please make this a pull request for Saber? Thanks.

Somebody already made a pull request with my commit (#1442 ). However I'll add a pop up informing you to enable the permission when setting the directory before putting you in the settings and then make a own one.

@ComputerElite
Copy link

Made a pr #1448

@TillF
Copy link

TillF commented Mar 28, 2025

Made a pr #1448

Solved #1242 for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants