christopherjwhite / org-toodledo

Emacs enhancement for syncing org-mode tasks with Toodledlo
83 stars 16 forks source link

Error syncing: "byte-code: writing to process: bad file descriptor, api.toodledo.com" #23

Open alphapapa opened 11 years ago

alphapapa commented 11 years ago

Ok, I am confused.

  1. I made a new, empty org file just for Toodledo. I ran org-toodledo-initialize, and it seemed to work. Sync completed. I refiled a few tasks and synced again. It claimed that there was a conflict and asked me to choose the local or server version of the tasks, even though they appeared identical. I don't know why it thought they were conflicted, but I got through all of them and sync completed.
  2. I then went back to my main org file. I ran org-toodledo-initialize, set it to use a new, empty heading, and let it run. I had the folder-headings mode on, so it added all of my Toodledo tasks in new headings in the file. But when it got to the end, it said, "byte-code: writing to process: bad file descriptor, api.toodledo.com", and it didn't write the last sync time to the file. I don't understand what's happening. Here's the Messages buffer:
Starting org-toodledo-sync
org-toodledo buffer at latest version 2.10
Contacting host: api.toodledo.com:80
Server has changes, asking for all modafter="0"
Contacting host: api.toodledo.com:80
Unsupported repeat string format: Every Mon, Tue, Wed, Thu, Fri
Contacting host: api.toodledo.com:80
Unsupported repeat string format: Every Sun
Server has deletes, asking for all after="0"
Contacting host: api.toodledo.com:80 [2 times]
byte-code: writing to process: bad file descriptor, api.toodledo.com

And here's the last few lines of org-toodledo-log:

[01:08:40] [DEBUG] Examining task: 'Contacts'
[01:08:40] [DEBUG] ...new task, no parent
[01:08:40] [DEBUG] Examining task: 'Email'
[01:08:40] [DEBUG] ...new task, no parent
[01:08:40] [DEBUG] Examining task: 'What else...?'
[01:08:40] [DEBUG] ...new task, no parent
[01:08:40] [DEBUG] Examining task: 'Setup Git-annex'
[01:08:40] [DEBUG] ...new task, no parent

The only lines in that buffer with "[ERROR]" in them are errors about the date format strings. There doesn't appear to be anything relevant to the "bad file descriptor" error in org-toodledo-log.

Thanks for your help.

christopherjwhite commented 11 years ago

For your first issue (#1), did you notice if the also saw the "bad file descriptor" problem after the initial sync?

Note that the "Unsupported repeat string format" will mean that the repeat value for these tasks is currently lost. Next time you sync back to the server, it will get cleared. For now, if possible, use the standard "every " variation in Toodledo to avoid this. This may be part of why conflicts.

With regard to the second problem (#2), this is more problematic and is quite possibly a problem at lower layers. Can you try the following:

M-x org-toodledo-toggle-debug

Then sync and look at the end of the org-toodledo-log buffer. That should give a lot more gory detail about the exact HTTP call it was trying to make.

Can you also let me know a few details:

Thanks -- hopefully we can get to the bottom of this one.

alphapapa commented 10 years ago

Thanks for your reply. Sorry it took me a while.

At this point I don't know what to do. I upgraded org-toodledo and now I'm having a different problem. :/ Here is some info:

Ubuntu 13.04 Emacs 24.2+1-2ubuntu2 org-mode 8.0.7 org-toodledo 4aa3fba469ae8dcc7884854e9ff768b6ec279fc3 Not using a pro account anymore, so I can see org-toodledo-initialize try :443 first and then :80.

The problem now is, quite simply, it sticks on contacting api.toodledo.com:80. Nothing happens after that. The log doesn't even have any info:

[14:43:44] [INFO] Starting org-toodledo-sync [14:43:44] [INFO] org-toodledo buffer at latest version 2.15 [14:44:55] [INFO] Starting org-toodledo-sync [14:44:55] [DEBUG] called interactively: nil [14:44:55] [INFO] org-toodledo buffer at latest version 2.15

Emacs is unresponsive until I Ctrl+G, and then...that's it. It never did anything after creating the heading, and apparently never contacted the server on :80, though it obviously tried :443 and then switched.

christopherjwhite commented 10 years ago

Ok -- if you're still working on this, here's a few more things to try:

  1. Grab the latest org-toodledo code. Probably won't make the difference, but just in case ;-)
  2. Next, enable url-debug, this will get you connection level debugging from the url library:

    M-x set-variable url-debug t

    This will send a lot of log messages to the buffer named *URL-DEBUG*

  3. Turn up the org-toodledo debug level:

    M-x set-variable org-toodledo-log-level 3

    You'll get even more debug to *Org-toodledo-log*

  4. Examine url-http.el and see if the patches in the github repository need to be applied. The patches are pretty old at this point, but may still help. I had problems specifically with connections just hanging. It may have been fixed in later versions of Emacs, but if not, check them out:

See what this does for you, hopefully it'll shed more light on the issue.

alphapapa commented 9 years ago

Hey, just an update. I mostly stopped using Toodledo, so I haven't messed with this any more since then. I might give it a whirl again sometime.

Just FYI, I found that the url-http.el and http-post-simple.el were causing problems with paradox and package-install when I upgraded to Emacs 24.4, so I removed them from my config. Hopefully those patches are no longer necessary, because they were breaking too much to keep using them.

I would still like to use org-toodledo, because if I could get it working well, it'd be by far the best way to access my todo items on my phone (using DGT GTD, which has the most powerful UI and best widget I've found). Is it still working for you?

Thanks.