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

Throws exception when preview have wrong utf string #2749

Closed
wants to merge 1 commit into from

Conversation

feiyun0112
Copy link
Contributor

#2748

when preview have wrong utf string, syste.text.json cannot convert it to object.

However, the preview only use to print, should not affect the normal operation of the program

}
catch
{
var matchResult = Regex.Match(serverParams.Value.ToString(), "\"preview\":\"(.*)\"");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be a better way to accomplish this. What's the exception you're getting?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead here: microsoft/playwright#28038

Investigation: we trimmed wrongly, it ended up in an invalid utf8 char and the .NET JSON parser didn't like this.

@feiyun0112 feiyun0112 closed this Nov 9, 2023
@feiyun0112 feiyun0112 deleted the issues-2748 branch November 9, 2023 01:55
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