PintaProject / PintaUploadAddin

An add-in for Pinta that could allow you to upload images directly to internet sites such as imgur.
5 stars 3 forks source link

Unhandled TargetInvocationException #11

Closed ArtemAvramenko closed 7 years ago

ArtemAvramenko commented 8 years ago

Crashes on upload:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Xml.XmlException: 'meta' is expected  Line 63, position 4.
  at Mono.Xml2.XmlTextReader.Expect (System.String expected) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadEndTag () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.XmlFilterReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.XmlFilterReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XDocument.ReadContent (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XDocument.LoadCore (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XDocument.Parse (System.String text, LoadOptions options) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XDocument.Parse (System.String text) [0x00000] in <filename unknown>:0 
  at PintaUploadAddin.ImgurUploadType.ParseResult (System.String result) [0x00000] in <filename unknown>:0 
  at PintaUploadAddin.ImgurUploadType.StartUpload (Gtk.TextBuffer updateWindow) [0x00000] in <filename unknown>:0 
  at PintaUploadAddin.ImgurUploadDialog..ctor (PintaUploadAddin.ImgurUploadType parent) [0x00000] in <filename unknown>:0 
  at PintaUploadAddin.UploadTypeChooserDialog.<UploadTypeChooserDialog>m__0 (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0 
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0 
robpvn commented 8 years ago

Not surprising, I got this mail last month:

Hi Imgur API user!

It looks like you’re using version 1 or 2 of the Imgur API. We’re reaching out now to remind you, starting on March 28, 2016, these versions will no longer be supported.

We encourage you to migrate your application to Imgur API version 3 before this date. If you need some assistance with that, feel free to check out api.imgur.com for documentation. If your application uses authorization, you will also need to upgrade to oauth 2.0.

If you have any questions, we’d be happy to help at api+deprecate@imgur.com.

Best, The Imgur API team

To be honest I'm a bit surprised anyone is still using this add-in, I treated it as more of a demo so I didn't bother working to update the API! Sorry about giving you an unpleasant experience.

I don't expect to have time to work on this soon, but I'll leave the bug open for future reference.

robpvn commented 7 years ago

Turns out it was pretty simple to fix once I bothered taking a look (slooooow development pace here). Have updated it for v3 now. baebc69