googleads / googleads-dotnet-lib

Google Ad Manager SOAP API .NET client library
Apache License 2.0
108 stars 199 forks source link

Recent uptake in AdWordsXmlError during campaign import #235

Closed meetaligoel closed 9 months ago

meetaligoel commented 3 years ago

Hi Folks,

We manage a few google ads accounts which involves downloading the campaigns. Recently, we have seen an uptake in the following error:

Google Sync Error Code: AdWordsXmlError and the import fails with GoogleSyncApiInternalError

We are looking for the root cause so it can be avoided in the future. I can share the google account ids and customer ids to help narrow down the requests.

Thanks

AnashOommen commented 3 years ago

Hi,

Try turning on SOAP logging in the client library and look at the failing responses. That usually gives you a good idea about the root cause.

https://github.com/googleads/googleads-dotnet-lib/wiki/How-to-capture-SOAP-messages

meetaligoel commented 3 years ago

The following is the error, we see during campaign read operation:

AdWordsServiceCommonImp.HandleCommunicationXmlException - XmlException=System.Xml.XmlException: The byte 0x08 is not valid at this location. Line 1, position 25119. at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3) at System.Xml.XmlExceptionHelper.ThrowInvalidXml(XmlDictionaryReader reader, Byte b) at System.Xml.XmlUTF8TextReader.Read() at System.Xml.XmlDictionaryReader.ReadContentAsString(Int32 maxStringContentLength) at System.Xml.XmlBaseReader.ReadElementContentAsString() at

AnashOommen commented 3 years ago

Are you sure your code uses this client library? The stack trace doesn't seem to indicate so. Seems to me that the code is directly using WCF, in which case I'm afraid I can't help you much.

meetaligoel commented 3 years ago

Here is the actual StackTrace from the google call. I hope this will help in narrowing down the issue:

at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest) at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest) at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest) at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply(Message message, Object[] parameters) at System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(MethodCall methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(MethodInfo targetMethod, Object[] args)

christopherseeley commented 1 year ago

Closing this since the AdWords API has been sunset.