Issue with NuGet Package Download While Integrating Telerik Report Server in .NET Project Using Jenkins

2 Answers 43 Views
Getting started with ASP.NET Telerik Trainer Telerik TV
Prabesh
Top achievements
Rank 1
Prabesh asked on 05 Feb 2025, 08:17 AM | edited on 05 Feb 2025, 08:17 AM
Hello,

We are attempting to use the Telerik Report Server for our project. We have installed the Telerik control panel on the server and also hosted it. The Telerik Report Server is connected to our project in the .NET application. However, while building the project with the Telerik Report Server, we are unable to download the required nugget packages for the project. This issue was encountered on January 30, 2025.

What did we do?

Step 1. We managed the Telerik credentials in the NuGet config file, as mentioned in the following URL: https://docs.telerik.com/aspnet-core/installation/nuget-install. The configuration added is as follows:

<?xml version="1.0" encoding="utf-8"?>
    <configuration>
     <packageSources>
        <!--To inherit the global NuGet package sources remove the <clear/> line below -->
        <clear />
        <add key="nuget" value="https://api.nuget.org/v3/index.json" />
        <add key="telerik" value="https://nuget.telerik.com/v3/index.json" />
     </packageSources>
     <packageSourceCredentials>
        <telerik>
          <add key="Username" value="telerik account email" />
          <add key="ClearTextPassword" value="plain text password" />
       </telerik>
     </packageSourceCredentials>
    </configuration>

Note: We found no issues with the credentials.

Step 2. We are using Jenkins (auto-deployment) to download the NuGet packages for the project to build also. The following command was used, but it resulted in an error stating that the packages could not be downloaded from the source.
nuget.exe restore "source\Leslinq.sln"

Running the same command in the local command prompt results in the same error, as shown in the Jenkins console log.

Here is a sample of the error log, and the attached files contain additional details:
********************************************************
https://api.nuget.org/v3/index.json: Unable to load the service index for source https://api.nuget.org/v3/index.json.
  An error occurred while sending the request.
  Unable to connect to the remote server
  A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 103.211.149.24:443
  https://nuget.telerik.com/v3/index.json: Package 'SQLitePCLRaw.core.2.0.4' is not found on source 'https://nuget.telerik.com/v3/index.json'.
************************************************************

Step 3: We are unable to proceed due to the "service unavailable" error message.

Could you please advise on how we can use the Telerik Report Server with our .NET project and automatically build it using Jenkins?

Thanks!


Regards,
Prabesh Shrestha

2 Answers, 1 is accepted

Sort by
0
Justin
Telerik team
answered on 05 Feb 2025, 05:01 PM

Hi Prabesh,

The package SQLitePCLRaw.core.2.0.4 is not a Telerik NuGet package so it is not hosted on nuget.telerik.com. It is however a dependency of the Telerik.Reporting package. I don't see anything here to suggest a connection issue with the Telerik NuGet server or incorrect credentials, if this were the case, you would see a 401 Unauthorized error. 

That being said, the shared error suggests a connection issue getting the package from nuget.org

https://api.nuget.org/v3/index.json: Unable to load the service index for source https://api.nuget.org/v3/index.json.
  An error occurred while sending the request.
  Unable to connect to the remote server
  A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 103.211.149.24:443

I see also that, since the package was not resolved from nuget.org an attempt was made to fetch it from nuget.telerik.com. This will always fail, as the package is not hosted by Telerik. 

To avoid the fallback, you can enable Package source mapping as described in this Microsoft article. Keep in mind, that this will not fix the first issue. For this, I can recommend taking a look at these two Microsoft articles.

Regards,
Justin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Prabesh
Top achievements
Rank 1
commented on 06 Feb 2025, 05:12 AM

Hi Justin,

I am not trying to download the package from Visual Studio. Instead, I want to manually download the required Telerik NuGet packages using the NuGet command:

nuget.exe restore "source\sln file"

As I already mentioned, when I try to download the related packages using this method, I encounter issues. I have attached a file showing the errors I faced.
Is there any solution to manually download the related packages, including Telerik.Reporting and Telerik.ReportViewer.Mvc, along with their dependency packages?

How can I properly download the packages manually? Do I need any additional keys or configurations?
Additionally, I am facing another issue: it shows that the download was successful, but later, the packages are not found.

We have already managed the Telerik credentials in the NuGet config file as per the Telerik documentation:
Here is our nuget.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <!--To inherit the global NuGet package sources remove the <clear/> line below -->
        <clear />
        <add key="nuget" value="https://api.nuget.org/v3/index.json" />
        <add key="telerik" value="https://nuget.telerik.com/v3/index.json" />
    </packageSources>
    <packageSourceCredentials>
        <telerik>
            <add key="Username" value="telerik account email" />
            <add key="ClearTextPassword" value="plain text password" />
        </telerik>
    </packageSourceCredentials>
</configuration>

Note: We found no issues with the credentials.

Regards,
Prabesh Shrestha
0
Justin
Telerik team
answered on 10 Feb 2025, 08:56 PM

Hi Prabesh,

Thank you for the provided Log.

Yes, I am glad to hear we agree that, as I stated in my last response, there does not seem to be an issue with the Telerik Credentials or the connection to the Telerik NuGet Server. In fact, it shows that packages served from the Telerik NuGet source are restored correctly. For example, here where Telerik.Reporting.18.3.245.1218 is restored successfully: 

Restoring NuGet package Telerik.Reporting.18.3.24.1218.
  GET https://nuget.telerik.com/v3/package/telerik.reporting/18.3.24.1218/telerik.reporting.18.3.24.1218.nupkg
  OK https://nuget.telerik.com/v3/package/telerik.reporting/18.3.24.1218/telerik.reporting.18.3.24.1218.nupkg 1216ms
Installed Telerik.Reporting 18.3.24.1218 from https://nuget.telerik.com/v3/index.json with content hash

I can confirm that you can download the Telerik packages mentioned at Product Download | Your Account. They are also included with the installation of Reporting by default at (C:\Program Files (x86)\Progress\Telerik Reporting 2024 Q4\Bin).

I can also confirm that the Nuget config file looks correct. Restoring Telerik packages and there dependencies from https://api.nuget.org/v3/index.json should work with the shared NuGet.config. I suspect some system specific issue related to getting resources from NuGet not Telerik. 

Instructions for manually downloading third-party packages via an automation server is not something that is Telerik Reporting specific, but more of a general programming issue. 

I still recommend package source mapping as described in Package Source Mapping to ensure that the Telerik server is used for ONLY relevant packages. It avoids erroneously searching the Telerik server for non-Telerik packages. Something like this: 

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <!--To inherit the global NuGet package sources remove the <clear/> line below -->
        <clear />
        <add key="nuget" value="https://api.nuget.org/v3/index.json" />
        <add key="telerik" value="https://nuget.telerik.com/v3/index.json" />
    </packageSources>
    <packageSourceCredentials>
        <telerik>
            <add key="Username" value="telerik account email" />
            <add key="ClearTextPassword" value="plain text password" />
        </telerik>
    </packageSourceCredentials>
	<packageSourceMapping>
    <!-- Use the nuget.org for everything else -->
    <packageSource key="nuget.org">
      <package pattern="*" />
      <!-- These are the only 2 packages on nuget.org that needs to be matched before falling to the next mapping-->
      <package pattern="Telerik.FontIcons" />
      <package pattern="Telerik.SvgIcons" />
    </packageSource>
    
    <!-- This mapping group will use the Telerik server for ONLY relevant packages. It avoids erroneously searching the Telerik server for non-Telerik packages-->
    <packageSource key="telerik">
      <package pattern="JustMock*" />
      <package pattern="Telerik*" />
      <package pattern="Kendo*" />
      <package pattern="UI.for*" />
    </packageSource>
  </packageSourceMapping>
</configuration>

Regards,
Justin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Getting started with ASP.NET Telerik Trainer Telerik TV
Asked by
Prabesh
Top achievements
Rank 1
Answers by
Justin
Telerik team
Share this question
or