[08:43] <tbarat> could anybody help in ubuntuone developer question?
[09:05] <JamesTait> Good morning all! Happy Tuesday, and happy Tolkien Reading Day! :-D
[09:06] <JamesTait> tbarat, possibly - best to just ask and if someone can help, they will.
[09:07] <tbarat> I would like to find karni, he wrote the code
[09:07] <tbarat> but sadly he is unreachable
[09:08] <tbarat> but my problem is in ubuntuOne api, exactly INFO: Magic upload failure, status code: 400 hung up the execution
[09:08] <tbarat> jamesTait
[09:09] <tbarat> thanks, JamesTait
[09:09]  * JamesTait has a hazy, distant memory of magic uploads....
[09:39] <JamesTait> tbarat, it's been a while since I looked at this, is this when doing an HTTP PUT to /api/v1/~/<something>
[09:41] <tbarat> 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] <tbarat> with the filewrite(stream) and the upload (stream)
[09:45] <JamesTait> tbarat, as an aside, it looks like karni is away due to national holidays and will be back on Thursday.
[09:46] <tbarat> JamesTait, Thanks for this information.
[09:47] <mandel> tbarat, yes, he is in CET time, if I see him I'll ping him
[09:47] <mandel> 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] <tbarat> mandel, I am also in CET, not sure what you mean reedit
[09:49] <mandel> reddit, sorry
[09:49] <mandel> tbarat, => http://www.reddit.com/r/Ubuntu/comments/20k2z8/updated_ubuntu_one_qml_mockup/
[09:50] <tbarat> no, I did not write there any comment
[09:50] <tbarat> mandel,
[09:51] <mandel> tbarat, ok, then someone else is working on a u1 client for the phone :)
[09:54] <tbarat> 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] <tbarat> currently I am connecting it with Iaas
[09:58] <mandel> really?
[09:58] <mandel> wow, well I think karni is your man for the rest api
[10:04] <tbarat> yes I know, 'cause we also consulted a few weeks ago.
[10:05] <tbarat> well, I will reach him after the polish holidays
[10:07] <JamesTait> tbarat, another person who might be able to help you, though I don't see him around now, is aquarius.
[10:08] <tbarat> JamesTait, maybe the time difference, I am in CET
[10:09] <JamesTait> 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] <JamesTait> tbarat, I'm assuming you're working from the docs at https://one.ubuntu.com/developer/files/store_files/cloud
[10:16] <tbarat> JamesTait,more than less yes, I am reusing karni's samples or libs
[10:19] <JamesTait> 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] <JamesTait> 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] <tbarat> JamesTait, you understand correctly, yes
[10:21] <JamesTait> 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] <tbarat> in Karni's sample put method switching automatically to normal upload
[10:23] <tbarat> and that interesting that upload it as well, but the code execution hung up in the error.
[10:23] <tbarat> JamesTait,
[10:23] <JamesTait> Ah, I'm not familiar with that code, I'm afraid.  I'm strictly server-side. :)
[10:24] <tbarat> 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] <JamesTait> tbarat, I was just about to ask for that! :)
[10:26] <tbarat> 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] <tbarat> where I have to call another methods
[10:29] <tbarat> JamesTait, Is it possible that confusing the filewriter stream and the html put stream?
[10:29] <tbarat> because the trouble only stand with those files what I have modified in that  source
[10:30] <tbarat> btw, I closed the file after modification ( bufferedreader/writer(.closed))
[10:31] <JamesTait> tbarat, so is it hanging somewhere around l.855 of that file?
[10:31] <tbarat> JamesTait, sorry what is l.855?
[10:32] <JamesTait> 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] <tbarat> JamesTait, oh yes :D exactly in  the 856 line
[10:34] <JamesTait> 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] <tbarat> JamesTait, I think it hanging in the 873 line, because I realised that the file uploaded in the real
[10:36] <tbarat> but the execution hang up
[10:36] <tbarat> and there is one Inputstream as well, possible that this is confused !?
[10:45] <JamesTait> tbarat, my best guess would be something to do with the U1OnProgressListener.
[10:45] <JamesTait> 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] <tbarat> I am going to switch of the listener in put, and let see what happening
[10:51] <tbarat> JamesTait, no the listener seems that works correctly 'cause it returns successful finish, but the execution hang up
[10:56] <JamesTait> 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. :-/
[12:22] <tbarat> JamesTait, so it is not easy to figure out?
[13:46] <JamesTait> 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] <tbarat> JamesTait, okay thats also was great help, thanks