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]: InvalidCastException during String to StringEnum Conversion in WorkflowJobStatus Deserialization #551

Open
1 task done
Monica-Zhang-git opened this issue Aug 8, 2024 · 2 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@Monica-Zhang-git
Copy link

What happened?

What happened?

After upgrading Octokit.Webhooks.AspNetCore from 1.5.1 to 2.2.2 we noticed the test failed. we encountered an InvalidCastException while attempting to deserialize webhook payloads into the WorkflowJobStatus enum using the SimpleJsonSerializer in the Octokit.Webhooks library.

The error message is as following:

System.InvalidCastException : Invalid cast from 'System.String' to 'Octokit.Webhooks.Extensions.StringEnum1[[Octokit.Webhooks.Models.WorkflowJobEvent.WorkflowJobStatus, Octokit.Webhooks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=xxx]]'.`

Could you please provide guidance or a potential fix for this issue? Any help from the Octokit team would be greatly appreciated.

Versions

Octokit.Webhooks.AspNetCore v2.2.2

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Monica-Zhang-git Monica-Zhang-git added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@Monica-Zhang-git Monica-Zhang-git changed the title [BUG]: InvalidCastException during String to Enum Conversion in WorkflowJobStatus Deserialization [BUG]: InvalidCastException during String to StringEnum Conversion in WorkflowJobStatus Deserialization Aug 8, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Aug 16, 2024
@JamieMagee
Copy link
Contributor

@Monica-Zhang-git are you able to provide a sample payload or some sample code to help reproduce the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

3 participants