[08:43] could anybody help in ubuntuone developer question? [09:05] Good morning all! Happy Tuesday, and happy Tolkien Reading Day! :-D [09:06] tbarat, possibly - best to just ask and if someone can help, they will. [09:07] I would like to find karni, he wrote the code [09:07] but sadly he is unreachable [09:08] but my problem is in ubuntuOne api, exactly INFO: Magic upload failure, status code: 400 hung up the execution [09:08] jamesTait [09:09] thanks, JamesTait [09:09] * JamesTait has a hazy, distant memory of magic uploads.... [09:39] tbarat, it's been a while since I looked at this, is this when doing an HTTP PUT to /api/v1/~/ [09:41] JamesTait, yes exactly this is a put, in my version I'd like to upload a file, after when I modified it. In my opinion that something confusing [09:41] with the filewrite(stream) and the upload (stream) [09:45] tbarat, as an aside, it looks like karni is away due to national holidays and will be back on Thursday. [09:46] JamesTait, Thanks for this information. [09:47] tbarat, yes, he is in CET time, if I see him I'll ping him [09:47] tbarat, are you the one that posted on reddit? because in that case I can tell him to go straight to the post (easier to connect there than in irc) [09:48] mandel, I am also in CET, not sure what you mean reedit [09:49] reddit, sorry [09:49] tbarat, => http://www.reddit.com/r/Ubuntu/comments/20k2z8/updated_ubuntu_one_qml_mockup/ [09:50] no, I did not write there any comment [09:50] mandel, [09:51] tbarat, ok, then someone else is working on a u1 client for the phone :) [09:54] mandel, ubuntuOne is the best choice nowadays for integrate in your own code in my opinion, not surprised that someone else also need assistance [09:57] currently I am connecting it with Iaas [09:58] really? [09:58] wow, well I think karni is your man for the rest api [10:04] yes I know, 'cause we also consulted a few weeks ago. [10:05] well, I will reach him after the polish holidays [10:07] tbarat, another person who might be able to help you, though I don't see him around now, is aquarius. [10:08] JamesTait, maybe the time difference, I am in CET [10:09] tbarat, AFAIK aquarius is still in the UK (same as me), but I'm not sure what his current situation is. Worth keeping a look out for, though. [10:12] tbarat, I'm assuming you're working from the docs at https://one.ubuntu.com/developer/files/store_files/cloud [10:16] JamesTait,more than less yes, I am reusing karni's samples or libs [10:19] tbarat, AIUI, a 400 response there means the content isn't in the cloud, or isn't reusable in the cloud, and you should proceed with a normal file upload (HTTP PUT with the content of the file as the request body, and appropriate Content-Length and Content-Type headers). [10:20] tbarat, did I understand correctly that you have a file that you've uploaded, and then you modified it locally and want to re-upload it? [10:20] JamesTait, you understand correctly, yes [10:21] tbarat, so in that instance I don't think the magic upload would work, because the content of the file has changed. In any event, your code should be prepared to receive a 400 response and revert to a normal (non-magic) upload. [10:22] in Karni's sample put method switching automatically to normal upload [10:23] and that interesting that upload it as well, but the code execution hung up in the error. [10:23] JamesTait, [10:23] Ah, I'm not familiar with that code, I'm afraid. I'm strictly server-side. :) [10:24] http://bazaar.launchpad.net/~ubuntuone-android-hackers/ubuntuone-files-java-library/trunk0.x/view/head:/src/main/com/ubuntuone/api/files/U1FileAPI.java [10:24] tbarat, I was just about to ask for that! :) [10:26] that is okay, to finish the upload in real but the execution hang up in this time, and does not return to the main function :D [10:26] where I have to call another methods [10:29] JamesTait, Is it possible that confusing the filewriter stream and the html put stream? [10:29] because the trouble only stand with those files what I have modified in that source [10:30] btw, I closed the file after modification ( bufferedreader/writer(.closed)) [10:31] tbarat, so is it hanging somewhere around l.855 of that file? [10:31] JamesTait, sorry what is l.855? [10:32] tbarat, http://bazaar.launchpad.net/~ubuntuone-android-hackers/ubuntuone-files-java-library/trunk0.x/view/head:/src/main/com/ubuntuone/api/files/U1FileAPI.java#L855 [10:32] JamesTait, oh yes :D exactly in the 856 line [10:34] tbarat, IOW, you get the 400 response from the magic upload, log the warning, but it's hanging somewhere between l.855 and l.876? [10:35] JamesTait, I think it hanging in the 873 line, because I realised that the file uploaded in the real [10:36] but the execution hang up [10:36] and there is one Inputstream as well, possible that this is confused !? [10:45] tbarat, my best guess would be something to do with the U1OnProgressListener. [10:45] tbarat, but I am really just guessing at this point - I'm not familiar with the client library, so I'd have to do some digging to make sense of it. [10:46] I am going to switch of the listener in put, and let see what happening [10:51] JamesTait, no the listener seems that works correctly 'cause it returns successful finish, but the execution hang up [10:56] tbarat, I think at this stage it comes down to inserting log statements at lines 877, 879 and 881 and progressively digging deeper to pinpoint the exact point at which it stops. :-/ === gatox_ is now known as gatox [12:22] JamesTait, so it is not easy to figure out? [13:46] tbarat, well, not for me - I'm not familiar with karni's code, so I don't have any useful insights, I'm afraid. [13:47] JamesTait, okay thats also was great help, thanks === gatox is now known as gatox_lunch === gatox_lunch is now known as gatox === jono is now known as Guest59567