-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
EF Core + MySQL Empty JSON Stack Traces #376
Comments
I have gone through all database records and ensured a ShortDescription is set and all Tags are set to at least have something like I'm still getting the error. For reference, I am trying to access this route: If I access something like this: It all works as expected (no exception, and records load in the UI) |
Hey Nick, I am pretty sure that has nothing to do with the approach of manually converting your blog posts. I suspect more MySQL or the MySQL driver for Entity Framework. I tested all the implementation details against MariaDB, which seems to have much better support for that (at least the more I dig into the topic). So I have to check what is the way forward (and don't use MariaDB for my tests :D) PS: Also |
Another quick update: If I run everything locally from visual studio and I point at my prod database, all of the mentioned routes work without issue. Of course, if I use a tag that doesn't exist it just "works" by not showing content -- but there are no page issues or anything like that. The only differences I can think of:
I can't see how either of these would cause the SQL query to get botched though. |
That makes the issue even more interesting. I try to find some time the upcoming days. |
There should be a new EF 9 Version of the |
Probably caused by: PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#1933 |
Disclaimer: This might have been because I migrated posts manually, but I am not entirely sure. They seem to render completely fine in the UI from what I can see, but I am getting application exceptions flooding Azure:
An exception occurred while iterating over the results of a query for context type 'LinkDotNet.Blog.Infrastructure.Persistence.Sql.BlogDbContext'. MySqlConnector.MySqlException (0x80004005): Invalid JSON text in argument 1 to function json_table: "The document is empty." at position 0. at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 894 at MySqlConnector.Core.ResultSet.ScanRowAsync(IOBehavior ioBehavior, Row row, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ResultSet.cs:line 244 at MySqlConnector.Core.ResultSet.ReadAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ResultSet.cs:line 207 at MySqlConnector.MySqlDataReader.ReadAsync(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 38 at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable 1.AsyncEnumerator.MoveNextAsync()
As you can see, it's spamming pretty good:
I am not exactly sure what to check here -- but I think tags might be the only thing that is JSON-esque in the database columns for a blog post? I could be wrong. I cannot access my MySQL instance from this machine, but I can try to query directly and see if I find any obvious records.
Posting this simply for visibility in case it pops up anywhere else for anyone. But I may be able to close it out if I find I made an invalid record manually.
The text was updated successfully, but these errors were encountered: