~soywod/pimalaya#213: 
Make error message more clear when first sync needed

I installed himalaya on macOS using Nix (see my home-manager config), but running it fails as below:

 himalaya
Error:
   0: cannot canonicalize path "/Users/srid/Library/Application Support/pimalaya/email/sync/55b8ecb64d61f069"
   1: No such file or directory (os error 2)

Note: Run with --debug to enable logs with spantrace.
Note: Run with --trace to enable verbose logs with backtrace.

DEBUG logs:

2024-05-30T18:59:22.620094Z  INFO executing list envelopes command
2024-05-30T18:59:22.620840Z DEBUG using default sync dir "/Users/srid/Library/Application Support/pimalaya/email/sync/55b8ecb64d61f069"
2024-05-30T18:59:22.621070Z  INFO building new maildir context
2024-05-30T18:59:22.621794Z DEBUG CanonicalizePathError(Os { code: 2, kind: NotFound, message: "No such file or directory" }, "/Users/srid/Library/Application Support/pimalaya/email/sync/55b8ecb64d61f069")
2024-05-30T18:59:22.626207Z DEBUG ordering before clearing tears: {0: 0}, max_header_stable_lsn: 0
2024-05-30T18:59:22.626234Z DEBUG in clean_tail_tears, found missing item in tail: None and we'll scan segments {0: 0} above lowest lsn 0
2024-05-30T18:59:22.626511Z DEBUG filtering out segments after detected tear at (lsn, lid) 95
2024-05-30T18:59:22.626582Z DEBUG hit max_lsn 95 in iterator, stopping
2024-05-30T18:59:22.626620Z DEBUG zeroing the end of the recovered segment at lsn 0 between lids 96 and 524287 
2024-05-30T18:59:22.631984Z DEBUG gc_blobs removing any blob with an lsn above 96
2024-05-30T18:59:22.632557Z DEBUG SA starting with tip 524288 stable -1 free {}
2024-05-30T18:59:22.632560Z DEBUG starting log at recovered active offset 96, recovered lsn 96
2024-05-30T18:59:22.632566Z DEBUG starting IoBufs with next_lsn: 96 next_lid: 96
2024-05-30T18:59:22.632568Z DEBUG load_snapshot loading pages from 0..4
2024-05-30T18:59:22.633134Z  INFO listing maildir envelopes from folder INBOX
2024-05-30T18:59:22.634251Z DEBUG IoBufs dropped
Status
REPORTED
Submitter
~srid
Assigned to
No-one
Submitted
a month ago
Updated
a month ago
Labels
No labels applied.

~srid a month ago

This is triggered by sync feature. Once I comment out settings.sync.enable = true; in my aforementioned config, everything works.

~srid a month ago

PEBKAC. I should run himalaya account sync first.

I'll leave this issue open, though. Because it is useful to improve this error message telling the user to run the same.

~soywod a month ago

I'll leave this issue open, though. Because it is useful to improve this error message telling the user to run the same.

I agree, let me rename the issue.

Register here or Log in to comment, or comment via email.