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

Synchronization error, always re-appearing "Errands was updated - restart" dialog and crash #275

Closed
major-mayer opened this issue May 13, 2024 · 12 comments

Comments

@major-mayer
Copy link

When I start Errands and capture the logs in the console, I see a couple of synchronization errors:

LANG=C errands                                                                   INT ✘  1m 7s  

(errands:32473): Gtk-WARNING **: 18:50:43.045: Unknown key gtk-button-images in /home/laurenz/.config/gtk-4.0/settings.ini

(errands:32473): Gtk-WARNING **: 18:50:43.045: Unknown key gtk-menu-images in /home/laurenz/.config/gtk-4.0/settings.ini

(errands:32473): Gtk-WARNING **: 18:50:43.045: Unknown key gtk-modules in /home/laurenz/.config/gtk-4.0/settings.ini

(errands:32473): Gtk-WARNING **: 18:50:43.045: Unknown key gtk-toolbar-style in /home/laurenz/.config/gtk-4.0/settings.ini

-------------------------------------------------
Starting Errands 46.0.6 at "2024 13 Mai 18:50:43"
-------------------------------------------------

[DEBUG] Application: Startup
[DEBUG] Data: Initialize
[DEBUG] Data: Read data
[DEBUG] GSettings: Initialize
[DEBUG] Application: Checking autostart
[DEBUG] Main Window: Load
[DEBUG] Today Page: Load
[DEBUG] Today Page: Update UI
[DEBUG] Trash Page: Load
[DEBUG] Sidebar: Load Task Lists
[DEBUG] Sidebar: Add Task List 'mein-kalendar'
[INFO] Task List mein-kalendar: Load Tasks
[DEBUG] Task List 'mein-kalendar': Update title
[DEBUG] Task List Row: Update UI 'mein-kalendar'
[DEBUG] Sidebar: Add Task List 'familienkalender'
[INFO] Task List familienkalender: Load Tasks
[DEBUG] Data: Write data
[DEBUG] Task List 'familienkalender': Update title
[DEBUG] Task List Row: Update UI 'familienkalender'
[DEBUG] Sidebar: Add Task List 'fbe9db1e-f3b8-4fd9-a4b7-e72ffd4af2eb'
[INFO] Task List fbe9db1e-f3b8-4fd9-a4b7-e72ffd4af2eb: Load Tasks
[DEBUG] Data: Write data
[DEBUG] Task List 'fbe9db1e-f3b8-4fd9-a4b7-e72ffd4af2eb': Update title
[DEBUG] Task List Row: Update UI 'fbe9db1e-f3b8-4fd9-a4b7-e72ffd4af2eb'
[DEBUG] Sidebar: Select last opened page
[INFO] Sync: Initialize sync provider
[DEBUG] Application: Activate
[INFO] Sync: Initialize 'Nextcloud' sync provider
[DEBUG] Sync: Checking credentials
[DEBUG] Sync: Checking URL
[DEBUG] Sync: URL is set to https://nc.example.com/remote.php/dav
[DEBUG] Sync: Attempting connection
[DEBUG] Sidebar: Open Today
[DEBUG] Today Page: Update UI
[INFO] Sync: Connected to Nextcloud server at 'https://nc.example.com/remote.php/dav'
[INFO] Sync: Sync tasks with remote
[DEBUG] Sidebar: Switch to list 'mein-kalendar'
[DEBUG] Sync: Getting tasks for list 'mein-kalendar'
[DEBUG] Sync: Update remote task '319909893423415050'
[ERROR] Sync: Can't update task on remote '319909893423415050'. At line 9: In transformToNative, unhandled exception on line 9: <class 'AttributeError'>: 'datetime.date' object has no attribute 'tzinfo' (<COMPLETED{'VALUE': ['DATE']}20240513>)
[DEBUG] Sync: Update remote task '208654062485186486'
[ERROR] Sync: Can't update task on remote '208654062485186486'. At line 9: In transformToNative, unhandled exception on line 9: <class 'AttributeError'>: 'datetime.date' object has no attribute 'tzinfo' (<COMPLETED{'VALUE': ['DATE']}20240513>)
[DEBUG] Sync: Update remote task '2642709390126514361'
[ERROR] Sync: Can't update task on remote '2642709390126514361'. PutError at '415 Unsupported Media Type

b'<?xml version="1.0" encoding="utf-8"?>\n<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">\n  <s:exception>Sabre\\DAV\\Exception\\UnsupportedMediaType</s:exception>\n  <s:message>Validation error in iCalendar: The supplied value (20240427T000000\\) is not a correct DATE-TIME</s:message>\n</d:error>\n'', reason no reason
[DEBUG] Sync: Update remote task '494771547503334086'
[ERROR] Sync: Can't update task on remote '494771547503334086'. At line 9: In transformToNative, unhandled exception on line 9: <class 'AttributeError'>: 'datetime.date' object has no attribute 'tzinfo' (<COMPLETED{'VALUE': ['DATE']}20240513>)
[DEBUG] Sync: Getting tasks for list 'familienkalender'
[DEBUG] Sync: Getting tasks for list 'fbe9db1e-f3b8-4fd9-a4b7-e72ffd4af2eb'
[DEBUG] Data: Clean deleted
[DEBUG] Sync: Update UI
[DEBUG] Data: Write data
[DEBUG] Data: Write data
[DEBUG] Task List 'fbe9db1e-f3b8-4fd9-a4b7-e72ffd4af2eb': Update title
[DEBUG] Task List 'mein-kalendar': Update title
[DEBUG] Task List 'familienkalender': Update title
[DEBUG] Notifications: Check
[DEBUG] Notifications: Check
[DEBUG] Notifications: Check
[DEBUG] Notifications: Check
[DEBUG] Notifications: Check
[DEBUG] Notifications: Check
[DEBUG] Notifications: Check
[DEBUG] Notifications: Check
[DEBUG] Notifications: Check
Failed to register: Timeout was reached

I am syncing my tasks to a Nextcloud instance.

This wouldn't bother me much, since everything else seems to be working, but for some reason this dialog always appears after a few minutes:
grafik
The app freezes and I can't click on the restart button.
Eventually it will crash anyway.

If there's anything you could need for debugging, feel free to tell me.

@32GBRat
Copy link
Contributor

32GBRat commented May 13, 2024

As far as I can tell this dialog means that there is newer version of Errands installed than you are currently running. This should be resolved by hard closing the application using system monitor or any alternative method (just closing the window won't work since the app is still running in the background).

Regarding the crash, it is hard to tell what is the cause. The logs don't show much and I'm not able to reproduce on the latest build. I was able to reproduce similar symptoms only by purposefully setting the command that should restart the app (application.py:51) to something that does not exit (eg. the yes command) and runs forever.

@mrvladus
Copy link
Owner

mrvladus commented May 13, 2024

I disabled update message here 9d5943a for now. About sync error, I can't replicate it, maybe python-caldav bug. I wanted to just write ical data directly instead of relying on caldav library for types conversion anyway, so maybe it will fix it.

@major-mayer
Copy link
Author

major-mayer commented May 13, 2024

Weird... So I checked if the message appears again when i forcefully close the app using the tasks manager and it's still the case.
However, I noticed that when i click the restart button, it actually spawns a second instance of Errands, but still the original application freezes and the new instance never appears.
Maybe the original application doesn't really crash (I also can't find any core dumps or so) but just exists after a while when this timeout, mentioned in the logs, is reached?
Could it be that the command to launch another instance of the app needs to be modified so that the new process gets detached?

And thanks for the information about the caldav error. Let me know when you made the change, so I can test it.

Edit: Yeah, it really seems like the use of os.system() could cause issues when restarting the app, since it waits on some platforms for the return value: https://stackoverflow.com/questions/8246520/does-pythons-os-system-wait-for-an-end-of-the-process

@mrvladus
Copy link
Owner

I'll change it to use subprocess module tomorrow and make new release. Should fix the issue.

@major-mayer
Copy link
Author

Sounds great. Thanks for the fast response.

@AlexanderShad
Copy link

Hello. This error is reproduced on ALT Regular Sisyphus (ALT Linux) DE: GNOME 46.1

@mrvladus
Copy link
Owner

I've pushed new update to flathub.

@7system7
Copy link

7system7 commented May 14, 2024

Omg. This issue is so frustrating. And sadly, it occurs in every ~1 minute. 😢 In the last 5-10 days there are a lot of error, before that it was an awesome app...

Another issue is that, I had a test task what has a due date. After a while I checked it out, after I deleted it, but it notifies me absolute randomly since then. (Today, I emptied the trash bin, so I hope...)

Sorry for the attitude, I really loved this app until now.

@major-mayer
Copy link
Author

I've pushed new update to flathub.

All right, I will wait until the update is also on the AUR and let you know if it fixed my issue then.

@32GBRat
Copy link
Contributor

32GBRat commented May 14, 2024

@7system7 You should probably open a new issue so it can get resolved.

Another issue is that, I had a test task what has a due date. After a while I checked it out, after I deleted it, but it notifies me absolute randomly since then. (Today, I emptied the trash bin, so I hope...)

@mrvladus
Copy link
Owner

@32GBRat it's already opened: #276. And I fixed it in 344ac17. Will be in 46.1.1

@32GBRat
Copy link
Contributor

32GBRat commented May 14, 2024

Sorry, missed that. Thanks for notifying me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants