File attach/upload gives "unmanaged response code : 400"

Bug #943396 reported by Marcel van der Boom (HS-Development BV)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mustard
New
Undecided
Unassigned

Bug Description

Running a statusnet 1.0 instance, always when I attache files (images) to a notice I get:

  Error posting notice!
  Unmanaged response code: 400

In my notifications.
Mustard 0.3 on a Samsung Galaxy Note

The server log does not mention anything, other than

"2012-02-29 16:51:31 LOG_INFO: [o.mrblog.nl:1372.8fc75d38 POST /api/statuses/update.json] API OAuth authentication for user 'mrb' (id: 1) on behalf of application 'mustard' (id: 3) with read-write access."

Revision history for this message
Michele Azzolari (macno) wrote : Re: [Bug 943396] [NEW] File attach/upload gives "unmanaged response code : 400"

Does uploading an image with another program (for example with curl) work?

Michele
 On Feb 29, 2012 5:55 PM, "Marcel van der Boom (HS-Development BV)" <
<email address hidden>> wrote:

> Public bug reported:
>
> Running a statusnet 1.0 instance, always when I attache files (images)
> to a notice I get:
>
> Error posting notice!
> Unmanaged response code: 400
>
> In my notifications.
> Mustard 0.3 on a Samsung Galaxy Note
>
> The server log does not mention anything, other than
>
> "2012-02-29 16:51:31 LOG_INFO: [o.mrblog.nl:1372.8fc75d38 POST
> /api/statuses/update.json] API OAuth authentication for user 'mrb' (id:
> 1) on behalf of application 'mustard' (id: 3) with read-write access."
>
> ** Affects: mustardroid
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of MuSTArd
> StatusNet Commiters Team, which is subscribed to Mustard.
> https://bugs.launchpad.net/bugs/943396
>
> Title:
> File attach/upload gives "unmanaged response code : 400"
>
> Status in Mustard, a mobile app for StatusNet:
> New
>
> Bug description:
> Running a statusnet 1.0 instance, always when I attache files (images)
> to a notice I get:
>
> Error posting notice!
> Unmanaged response code: 400
>
> In my notifications.
> Mustard 0.3 on a Samsung Galaxy Note
>
> The server log does not mention anything, other than
>
> "2012-02-29 16:51:31 LOG_INFO: [o.mrblog.nl:1372.8fc75d38 POST
> /api/statuses/update.json] API OAuth authentication for user 'mrb'
> (id: 1) on behalf of application 'mustard' (id: 3) with read-write
> access."
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mustardroid/+bug/943396/+subscriptions
>

Revision history for this message
Marcel van der Boom (HS-Development BV) (mrb) wrote :

Sorry, I missed your comments somehow.

I had to look up how to use curl with uploads, closest I got was this:

  curl --verbose --http1.0 -u user:pass -F "media = @ file.png" -F status=testing http://o.mrblog.nl/api/statuses/update.xml

Is that the correct way to test this?

That command runs fine, in the sense that the status is posted and curl does not give me an error, but the attachment is not appearing with the notice, nor is the file on the server. The log does not mention anything.

I have a debug account to which I can give you access if needed.

Revision history for this message
Marcel van der Boom (HS-Development BV) (mrb) wrote :

Also tested with some other clients:

- statusnet mobile: same error (Unmanaged response code: 400)
- webclient statusnet: works fine
- choqok: works fine

Revision history for this message
Marcel van der Boom (HS-Development BV) (mrb) wrote :

Tested on same device with mustard 0.4.0 beta : same result.

Revision history for this message
Marcel van der Boom (HS-Development BV) (mrb) wrote :

Retested with 0.3.4beta1, same result.

I've attached a logcat file, log filtered on 'mustard' and device info included.

Revision history for this message
Marcel van der Boom (HS-Development BV) (mrb) wrote :

I hooked up wireshark to the server, the server issues a bad request with the following value returned :

{"error":"\"image\/jpeg\" is not a supported file type on this server. Try using another image format.","request":"\/api\/statuses\/update.json"}

The Statusnet logging does not mention this, nor mustard logging. Both should IMHO.

After adding image/jpeg to the supported attachment types the posting works like a charm!!

Revision history for this message
David Black (daithib8) wrote :

I get this error just trying to post a notice. I've tried 0.4b8 and 0.32 on nexus s cm9v7

Revision history for this message
David Black (daithib8) wrote :

Forgot to mention I was using identi.ca

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.