Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: System.OverflowException in ReviewComment.GetAll #2946

Closed
1 task done
joscol opened this issue Jul 1, 2024 · 3 comments
Closed
1 task done

[BUG]: System.OverflowException in ReviewComment.GetAll #2946

joscol opened this issue Jul 1, 2024 · 3 comments
Labels
Type: Bug Something isn't working as documented

Comments

@joscol
Copy link

joscol commented Jul 1, 2024

What happened?

When calling PullRequest.ReviewComment.GetAll() on dotnet/csharplang#8209, I'm getting a System.OverflowException.

I suspect the issue is that the ReplyToId in https://github.com/octokit/octokit.net/blob/main/Octokit/Models/Response/PullRequestReviewComment.cs is an int and should be a long. The Id field was recently switched here: 6c43183

Versions

Octokit.net 13.0.0

Relevant log output

System.OverflowException: Value was either too large or too small for an Int32.
   at System.Convert.ToInt32(Int64 value)
   at System.Int64.System.IConvertible.ToInt32(IFormatProvider provider)
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Octokit.Reflection.ReflectionUtils.ToNullableType(Object obj, Type nullableType) in /_/Octokit/SimpleJson.cs:line 1843
   at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/SimpleJson.cs:line 1368
   at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/Http/SimpleJsonSerializer.cs:line 205
   at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/SimpleJson.cs:line 1492
   at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/Http/SimpleJsonSerializer.cs:line 205
   at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/SimpleJson.cs:line 1519
   at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/Http/SimpleJsonSerializer.cs:line 205
   at Octokit.SimpleJson.DeserializeObject(String json, Type type, IJsonSerializerStrategy jsonSerializerStrategy) in /_/Octokit/SimpleJson.cs:line 584
   at Octokit.SimpleJson.DeserializeObject[T](String json, IJsonSerializerStrategy jsonSerializerStrategy) in /_/Octokit/SimpleJson.cs:line 596
   at Octokit.Internal.SimpleJsonSerializer.Deserialize[T](String json) in /_/Octokit/Http/SimpleJsonSerializer.cs:line 22
   at Octokit.Internal.JsonHttpPipeline.DeserializeResponse[T](IResponse response) in /_/Octokit/Http/JsonHttpPipeline.cs:line 62
   at Octokit.Connection.<Run>d__67`1.MoveNext() in /_/Octokit/Http/Connection.cs:line 752

Code of Conduct

  • I agree to follow this project's Code of Conduct
@joscol joscol added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jul 1, 2024
@tomgregar
Copy link

I have same problem, but with public int? PullRequestReviewId property - again, int? instead of long

@kfcampbell kfcampbell removed the Status: Triage This is being looked at and prioritized label Jul 1, 2024
@TimLovellSmith
Copy link

Looks like #2948 should fix this for the case where T=Octokit.PullRequestReviewComment.

@kfcampbell
Copy link
Member

Closing as this is fixed in v13.0.1. Please reopen if it's not, or open a new issue if there are other serialization issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
Archived in project
Development

No branches or pull requests

4 participants