HowTo: Fix "The response to the metaWeblog.newMediaObject method received from the weblog server was invalid"
Today I got this error message from WLW: “The response to the metaWeblog.newMediaObject method received from the weblog server was invalid“. Why did WLW think the response was “invalid“?? What exactly did it receive from Wordpress??
Luckily, WLW logs a lot more in the background. You can access that log file via Help -> About WLW. Click on the “Show Log Results” link in the dialog box. This will open the log folder.
Mine had this trace dump:
WindowsLiveWriter,21504,Fail,00020,18-Mar-2008 14:00:01.479,”WindowsLive.Writer.Extensibility.BlogClient.BlogClientInvalidServerResponseException: Invalid Server Response - The response to the metaWeblog.newMediaObject method received from the weblog server was invalid:
Invalid response document returned from XmlRpc server
at WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CallMethod(String methodName, XmlRpcValue[] parameters)
at WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.DoBeforePublishUploadWork(IFileUploadContext uploadContext)
at WindowsLive.Writer.PostEditor.WeblogBlogFileUploader.DoUploadWorkBeforePublish(IFileUploadContext uploadContext)
at WindowsLive.Writer.PostEditor.BlogPostReferenceFixer.FileUploadWorker.DoUploadWork(BlogFileUploader fileUploader)
at WindowsLive.Writer.PostEditor.BlogPostReferenceFixer.LocalFileTransformer.Transform(String reference)
at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.LocalFileReferenceFixupFilter.FixReferences(String reference)
at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.OnBeginTag(BeginTag tag)
at WindowsLive.Writer.CoreServices.LightWeightHTMLDocumentIterator.Parse()
at WindowsLive.Writer.CoreServices.HTML.HtmlReferenceFixer.FixLocalFileReferences(String html, ReferenceFixer fixer)
at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.LocalSupportingFileUploader.UploadFilesBeforePublish()
at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.DoWork()
at WindowsLive.Writer.CoreServices.AsyncOperation.InternalStart()”,” at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at WindowsLive.Writer.CoreServices.Diagnostics.LogFileTraceListener.Fail(String message)
at System.Diagnostics.TraceInternal.Fail(String message)
at System.Diagnostics.Trace.Fail(String message)
at WindowsLive.Writer.PostEditor.BlogPostEditingManager.UpdateWeblog(Boolean publish)
at WindowsLive.Writer.PostEditor.BlogPostEditingManager.PostToWeblog(Boolean publish)
at WindowsLive.Writer.PostEditor.PostEditorMainControl.commandPostAndPublish_Execute(Object sender, EventArgs e)
at WindowsLive.Writer.ApplicationFramework.Command.RaiseEvent(Object eventKey, EventArgs e)
at WindowsLive.Writer.ApplicationFramework.Command.OnExecute(EventArgs e)
at WindowsLive.Writer.ApplicationFramework.CommandBarButtonLightweightControl.OnMouseUp(MouseEventArgs e)
at WindowsLive.Writer.Controls.LightweightControl.RaiseMouseUp(MouseEventArgs e)
at WindowsLive.Writer.Controls.LightweightControlContainerControl.OnMouseUp(MouseEventArgs e)
Pretty neat stack trace,eh?
It clearly shows that DoUploadWork() (Invoked by UpdateWebLog()) method fails for some reason. Armed with this knowledge, I took a look at my post. I had many pictures in that and my WLW was setup to upload pictures through XML RPC. So, obviously that was causing some kind of trouble. I traced down the big picture (size: ~0.7MB) in my post, resized it to 40K and published again. Voila, things worked perfectly!
I googled for the error message, since I wanted to know how other people solved this. Looks like increasing the memory size for PHP in the server side will also help. So, one of the following things should help you to solve this problem:
- If you have images embedded that need to be uploaded to the server, make sure they are not big. I don’t have any idea on the *optimal* size. I guess anything less than 100K should be ok.
- If still you are getting the same error, try increasing the memory_limit value in php.ini to 12M or 16M. Check this page for info on memory_limit. If you don’t have access to your server, you may have to talk with your host provider.
I believe the first solution will fix this error, in most of the cases. Do let me know in the comments, if you come across any other solutions.
Subscribe to this blog's RSS feed
Testing Windows Live Writer 2008
Just now installed Windows Live Writer 2008 (Final); The installer they have there is just around 2.3MB, but it downloads the actual Live Writer binaries later. When you execute this "small" file, it scans through your computer for other Live programs (WHY??!!) and offers you a screen full of other Live programs that you *should* […]
Chaos!
Lot of things happening right now in my life; Am stuck in the middle of a group transition, with the additional responsibility of arranging a function in my house (Ahhh!) + my pet projects demanding more and more time….Whew, I wonder how the company senior VPs and GMs manage to squeeze in some time for […]
Coolcode.cn (Wordpress plugin) site down!
Today morning I was surprised to see a couple of mails complaining that the videos I posted earlier here and here are not working! I checked them last night (ok…at 1am..technically it is today morning!) and they were fine. I use the excellent coolplayer 9.3 plugin in my Wordpress blog. I logged in to my […]
Tamil Blog
UPDATE: Mar 01, 2007 - I have updated the links in this post with the latest address.
Started a Tamil Blog @ http://chathurangam.blogspot.com. I’d be happy if you could check it out & may be post a comment or two!
This is for my Tamil speaking friends…
[TAMIL]
எனத௠வலைபà¯à®ªà¯‚ http://chathurangam.blogspot.com/ எனà¯à®± இடதà¯à®¤à®¿à®²à¯ உளà¯à®³à®¤à¯. நேரம௠கிடைகà¯à®•à¯à®®à¯à®ªà¯‹à®¤à¯ பெரியவஙà¯à®• நீஙà¯à®• […]