Skip to content

Conversation

@silvanocerza
Copy link
Contributor

Similar approach to other libraries.

I had to update a System.Text.Json because of this security advisory.

On a side note we should probably also update the version of DotNet used for the library as is quite old.

@silvanocerza silvanocerza requested a review from max-ipinfo July 8, 2025 16:52
@silvanocerza silvanocerza self-assigned this Jul 8, 2025
@linear
Copy link

linear bot commented Jul 8, 2025

@silvanocerza
Copy link
Contributor Author

I couldn't test this properly on my Mac as I had several issues trying to run tests.
I though CI would run those but I notice just now that they run only for releases so I took the liberty to add a new one. It will run on PRs and pushes to main.

@silvanocerza
Copy link
Contributor Author

We need to update the token secret.

@max-ipinfo
Copy link
Contributor

We need to update the token secret.

fixed

@max-ipinfo
Copy link
Contributor

@silvanocerza I re-ran the tests and getting this error:

Run dotnet test
  Determining projects to restore...
  All projects are up-to-date for restore.
  IPinfo -> /home/runner/work/csharp/csharp/src/IPinfo/bin/Debug/netstandard2.0/IPinfo.dll
  IPinfo.Tests -> /home/runner/work/csharp/csharp/IPinfo.Tests/bin/Debug/net6.0/IPinfo.Tests.dll
Test run for /home/runner/work/csharp/csharp/IPinfo.Tests/bin/Debug/net6.0/IPinfo.Tests.dll (.NETCoreApp,Version=v6.0)
Microsoft (R) Test Execution Command Line Tool Version 1[7](https://github.com/ipinfo/csharp/actions/runs/16149797539/job/45732337990#step:6:8).3.3 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.90]     IPinfo.Tests.IPApiLiteTest.TestGetDetails [FAIL]
  Failed IPinfo.Tests.IPApiLiteTest.TestGetDetails [29 ms]
[xUnit.net 00:00:00.94]     IPinfo.Tests.IPApiLiteTest.TestGetDetailsIPV6 [FAIL]
  Error Message:
   System.NullReferenceException : Object reference not set to an instance of an object.
  Stack Trace:
     at IPinfo.Tests.IPApiLiteTest.TestGetDetails() in /home/runner/work/csharp/csharp/IPinfo.Tests/IPApiLiteTest.cs:line 21
[xUnit.net 00:00:00.97]     IPinfo.Tests.IPApiLiteTest.TestGetDetailsCurrentIP [FAIL]
  Failed IPinfo.Tests.IPApiLiteTest.TestGetDetailsIPV6 [31 ms]
  Error Message:
   System.NullReferenceException : Object reference not set to an instance of an object.
  Stack Trace:
     at IPinfo.Tests.IPApiLiteTest.TestGetDetailsIPV6() in /home/runner/work/csharp/csharp/IPinfo.Tests/IPApiLiteTest.cs:line 52
  Failed IPinfo.Tests.IPApiLiteTest.TestGetDetailsCurrentIP [39 ms]
  Error Message:
   IPinfo.Exceptions.RequestFailedGeneralException :  StatusCode = 404,
Body = {
  "error": "Endpoint not found. Did you mean /lite/me or /lite/[8](https://github.com/ipinfo/csharp/actions/runs/16149797539/job/45732337990#step:6:9).8.8.8?"
}
---- System.Net.Http.HttpRequestException : Response status code does not indicate success: 404 (Not Found).
  Stack Trace:
     at IPinfo.Utilities.ApiHelper.RunTaskSynchronously(Task t) in /home/runner/work/csharp/csharp/src/IPinfo/Utilities/ApiHelper.cs:line 27
   at IPinfo.Apis.IPApiLite.GetDetails(String ipAddress) in /home/runner/work/csharp/csharp/src/IPinfo/Apis/IPApiLite.cs:line 53
   at IPinfo.Tests.IPApiLiteTest.TestGetDetailsCurrentIP() in /home/runner/work/csharp/csharp/IPinfo.Tests/IPApiLiteTest.cs:line 80
----- Inner Stack Trace -----
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at IPinfo.Apis.BaseApi.ValidateResponse(HttpContext context) in /home/runner/work/csharp/csharp/src/IPinfo/Apis/BaseApi.cs:line [9](https://github.com/ipinfo/csharp/actions/runs/16149797539/job/45732337990#step:6:10)3

@silvanocerza
Copy link
Contributor Author

@max-ipinfo tests are green. 👍

On a side note we should probably make it possible to build the project locally without the need of a Strong Name Keypair, it will ease development quite a bit.

@max-ipinfo max-ipinfo changed the title Add IPApiLite to support Lite API Add IPInfoLite to support Lite API Jul 21, 2025
@max-ipinfo max-ipinfo changed the title Add IPInfoLite to support Lite API Add IPApiLite to support Lite API Jul 21, 2025
@max-ipinfo max-ipinfo merged commit 60151f8 into main Jul 21, 2025
1 check passed
@silvanocerza silvanocerza deleted the silvano/eng-288-add-lite-api-support-to-ipinfocsharp branch November 18, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants