External Feeds - NuGet - Failing with Xml Exception

Hi,

We are currently using TeamCity for our Build & Deployments. Artifacts are being pushed to TeamCity NuGet feed.

We are doing a POC to move our deployments from TeamCity to Octopus. And we would like to continue use our TeamCity NuGet feed for Artifacts. TeamCity NuGet feed is working fine from Visual Studio and NuGet Package Manager.

When I try to configure & test TeamCity guest auth NuGet feed in Octopus as External Feed it is failing with the following exception.

Please can you kindly help.

Octopus v2018.2.3

Reference to undeclared entity ‘trade’. Line 81, position 44.
System.Xml.XmlException
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.HandleGeneralEntityReference(String name, Boolean isInAttributeValue, Boolean pushFakeEntityIfNullResolver, Int32 entityStartLinePos)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
at System.Xml.XmlTextReaderImpl.FinishPartialValue()
at System.Xml.XmlTextReaderImpl.get_Value()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at NuGet.Protocol.V2FeedParser.<>c__DisplayClass52_0.<LoadXmlAsync
at NuGet.Protocol.HttpSource.ProcessResponseAsync
at NuGet.Protocol.V2FeedParser.LoadXmlAsync
at NuGet.Protocol.V2FeedParser.QueryV2Feed
at NuGet.Protocol.V2FeedParser.Search
at NuGet.Protocol.PackageSearchResourceV2Feed.SearchAsync
at Octopus.Shared.Util.TaskExtensions.PrepareForRethrow(Exception exception)
at Octopus.Shared.Util.TaskExtensions.SafeResult[T](Task1 task, CancellationToken cancellationToken) at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.SearchForPackagesNamedLike(String packageId, Int32 take, CancellationToken cancellationToken, Boolean exactPackageIdMatch) at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.SearchPackages(String term, CancellationToken cancellationToken, Int32& total, Int32 skip, Int32 take) at Octopus.Server.Web.Api.Actions.PackageSearchAction.ExecuteRegistered() at Octopus.Server.Web.Infrastructure.Api.Responder1.Respond(TDescriptor options, NancyContext context)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)

Hi,

Thanks for reaching out.

Couple of questions to see if I can reproduce this on my end:

  • Which version of TeamCity are you running?
  • What does the URL of the TC feed that you are using in Octopus look like?
  • Can you show me a screenshot of the configuration of the External Feed in Octopus?
  • You mentioned that you are using guest auth. Can you try using a specific account instead of guest and see if that works?

Thanks,
Dalmiro

Hi Dalmiro,

Thanks for your response. Kindly check my response below

Which version of TeamCity are you running?
TeamCity Enterprise 2017.2.2 (build 50909)

What does the URL of the TC feed that you are using in Octopus look like?
http://teamcity/guestAuth/app/nuget/v1/FeedService.svc/

Can you show me a screenshot of the configuration of the External Feed in Octopus?

You mentioned that you are using guest auth. Can you try using a specific account instead of guest and see if that works?
Same result when I use httpauth with username and password

Regards,
Vijay

Hi Vijay,

In 2018.2 we made some changes to how our feeds work, which we kept improving in the next couple of releases. Is there any chance you can upgrade your Octopus to at least 2018.3.13? If you can upgrade to the latest, that’ll be even better.

Below is the full list of changes between your version and the latest. Pay special attention to the Breaking changes over there before upgrading.

Best regards,
Dalmiro

Hi Dalmiro,

We have now upgraded Octopus to latest version. External feed (TeamCity feed) is still failing with same exception.

Octopus v2018.5.7

Reference to undeclared entity ‘trade’. Line 81, position 44.
System.Xml.XmlException
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.HandleGeneralEntityReference(String name, Boolean isInAttributeValue, Boolean pushFakeEntityIfNullResolver, Int32 entityStartLinePos)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
at System.Xml.XmlTextReaderImpl.FinishPartialValue()
at System.Xml.XmlTextReaderImpl.get_Value()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at NuGet.Protocol.V2FeedParser.<>c__DisplayClass52_0.<LoadXmlAsync
at NuGet.Protocol.HttpSource.ProcessResponseAsync
at NuGet.Protocol.V2FeedParser.LoadXmlAsync
at NuGet.Protocol.V2FeedParser.QueryV2Feed
at NuGet.Protocol.V2FeedParser.Search
at NuGet.Protocol.PackageSearchResourceV2Feed.SearchAsync
at Octopus.Shared.Util.TaskExtensions.PrepareForRethrow(Exception exception)
at Octopus.Shared.Util.TaskExtensions.SafeResult[T](Task1 task, CancellationToken cancellationToken) at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.SearchForPackagesNamedLike(String packageId, Int32 take, CancellationToken cancellationToken, Boolean exactPackageIdMatch) at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.SearchPackages(String term, CancellationToken cancellationToken, Int32& total, Int32 skip, Int32 take) at Octopus.Server.Web.Api.Actions.PackageSearchAction.ExecuteRegistered() at Octopus.Server.Web.Infrastructure.Api.Responder1.Respond(TDescriptor options, NancyContext context)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)

Please, can you advise.

Kind Regards,
Vijay

Hi Vijay,

Sorry to hear its still not working after the upgrade. Have you tried to consume that same NuGet feed but from another source other than Octopus? i.e Using Visual Studio or Nuget.exe list ?

This will at least help us know if its a problem with Octopus or the feed itself.

Best regards,
Dalmiro

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.