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

Exception thrown: Requested value 'linecommented' was not found. #1559

Closed
asimonov-msft opened this issue Feb 28, 2017 · 2 comments · Fixed by #1563
Closed

Exception thrown: Requested value 'linecommented' was not found. #1559

asimonov-msft opened this issue Feb 28, 2017 · 2 comments · Fixed by #1563

Comments

@asimonov-msft
Copy link

Here is the short repro case, using the Octokit.net v0.24.0 nuget package:

// https://github.com/Microsoft/WinObjC/pull/2106
var ghClient = new GitHubClient(new Octokit.ProductHeaderValue("crash-repro"));
var issueEvents = ghClient.Issue.Timeline.GetAllForIssue(37950166, 2106).Result;

Stack:

   at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument)
   at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)
   at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
   at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in D:\\repos\\octokit.net\\Octokit\\Http\\SimpleJsonSerializer.cs:line 124
   at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in D:\\repos\\octokit.net\\Octokit\\SimpleJson.cs:line 1478
   at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in D:\\repos\\octokit.net\\Octokit\\Http\\SimpleJsonSerializer.cs:line 165
   at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in D:\\repos\\octokit.net\\Octokit\\SimpleJson.cs:line 1505
   at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in D:\\repos\\octokit.net\\Octokit\\Http\\SimpleJsonSerializer.cs:line 165
   at Octokit.SimpleJson.DeserializeObject(String json, Type type, IJsonSerializerStrategy jsonSerializerStrategy) in D:\\repos\\octokit.net\\Octokit\\SimpleJson.cs:line 583
   at Octokit.SimpleJson.DeserializeObject[T](String json, IJsonSerializerStrategy jsonSerializerStrategy) in D:\\repos\\octokit.net\\Octokit\\SimpleJson.cs:line 595
   at Octokit.Internal.SimpleJsonSerializer.Deserialize[T](String json) in D:\\repos\\octokit.net\\Octokit\\Http\\SimpleJsonSerializer.cs:line 21
   at Octokit.Internal.JsonHttpPipeline.DeserializeResponse[T](IResponse response) in D:\\repos\\octokit.net\\Octokit\\Http\\JsonHttpPipeline.cs:line 62
   at Octokit.Connection.<Run>d__54`1.MoveNext() in D:\\repos\\octokit.net\\Octokit\\Http\\Connection.cs:line 574
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiConnection.<GetPage>d__41`1.MoveNext() in D:\\repos\\octokit.net\\Octokit\\Http\\ApiConnection.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiConnection.<>c__DisplayClass17_0`1.<<GetAll>b__0>d.MoveNext() in D:\\repos\\octokit.net\\Octokit\\Http\\ApiConnection.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiPagination.<GetAllPages>d__0`1.MoveNext() in D:\\repos\\octokit.net\\Octokit\\Clients\\ApiPagination.cs:line 0"	string
@andrejo-msft
Copy link

This looks like another iteration of 'X event type was not found, so Octokit crashes.'

@ryangribble
Copy link
Contributor

Yes, the easy "fix" is to add the missing value to the enumeration, similar to #1536

We are also kicking around a new approach to enums in #1504 which would at least stop exceptions from being thrown whenever GitHub adds a new event type

ryangribble referenced this issue Mar 10, 2017
#1560)

* React to change in the way the API communicates time

Fixes #1558.
The API used to send times as number of seconds from Unix epoch time.
This has changed and is now ISO 8601.

* remove openssl linking in TravisCI when on macOS

# Conflicts:
#	.travis.yml

* change appveyor config - public projects can no longer use account feeds (plus we dont actually need it anyway)
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 a pull request may close this issue.

3 participants