[2018-06-16 17:32:31 084] System.ArgumentException: The output byte buffer is too small to contain the encoded data, encoding 'Unicode (UTF-8)' fallback 'System.Text.EncoderReplacementFallback'.
Parameter name: bytes
at System.Text.Encoding.ThrowBytesOverflow()
at System.Text.Encoding.ThrowBytesOverflow(EncoderNLS encoder, Boolean nothingEncoded)
at System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, EncoderNLS baseEncoder)
at System.Text.EncoderNLS.Convert(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, Boolean flush, Int32& charsUsed, Int32& bytesUsed, Boolean& completed)
at MySqlConnector.Protocol.Serialization.ByteBufferWriter.Write(ReadOnlySpan`1 chars) in C:\projects\mysqlconnector\src\MySqlConnector\Protocol\Serialization\ByteBufferWriter.cs:line 147
at MySql.Data.MySqlClient.MySqlParameter.AppendSqlString(ByteBufferWriter writer, StatementPreparerOptions options, String parameterName) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlParameter.cs:line 191
at MySqlConnector.Core.StatementPreparer.ParameterSqlParser.DoAppendParameter(Int32 parameterIndex, Int32 textIndex, Int32 textLength) in C:\projects\mysqlconnector\src\MySqlConnector\Core\StatementPreparer.cs:line 68
at MySqlConnector.Core.SqlParser.Parse(String sql) in C:\projects\mysqlconnector\src\MySqlConnector\Core\SqlParser.cs:line 112
at MySqlConnector.Core.StatementPreparer.ParseAndBindParameters() in C:\projects\mysqlconnector\src\MySqlConnector\Core\StatementPreparer.cs:line 27
at MySqlConnector.Core.TextCommandExecutor.CreateQueryPayload(String commandText, MySqlParameterCollection parameterCollection) in C:\projects\mysqlconnector\src\MySqlConnector\Core\TextCommandExecutor.cs:line 121
at MySqlConnector.Core.TextCommandExecutor.<ExecuteReaderAsync>d__3.MoveNext() in C:\projects\mysqlconnector\src\MySqlConnector\Core\TextCommandExecutor.cs:line 65
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MySqlConnector.Core.TextCommandExecutor.<ExecuteScalarAsync>d__2.MoveNext() in C:\projects\mysqlconnector\src\MySqlConnector\Core\TextCommandExecutor.cs:line 43
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar() in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlCommand.cs:line 66
at SXLibraryCore.DbConnectionHelper.<>c.<GetObject>b__15_0(DbCommand cmd) in C:\Users\XXXX\Desktop\AreaPlatform\SXLibraryCore\SXLibraryCore\DBHelper.cs:line 465
at SXLibraryCore.DbConnectionHelper.Common[T](DbConnection conn, String sqlStr, CommandType cmdType, IDictionary`2 arguments, Func`2 inner) in C:\Users\XXXX\Desktop\AreaPlatform\SXLibraryCore\SXLibraryCore\DBHelper.cs:line 264
at SXLibraryCore.DbConnectionHelper.GetObject(DbConnection conn, String sqlStr, CommandType cmdType, Dictionary`2 arguments) in C:\Users\XXXX\Desktop\AreaPlatform\SXLibraryCore\SXLibraryCore\DBHelper.cs:line 465
at SXLibraryCore.DbConnectionHelper.GetString(DbConnection conn, String sqlStr, CommandType cmdType, Dictionary`2 arguments) in C:\Users\XXXX\Desktop\AreaPlatform\SXLibraryCore\SXLibraryCore\DBHelper.cs:line 432
at SXLibraryCore.DbConnectionHelper.GetString(DbConnection conn, String sqlStr, Dictionary`2 arguments) in C:\Users\XXXX\Desktop\AreaPlatform\SXLibraryCore\SXLibraryCore\DBHelper.cs:line 425
at PTAdmin.SX.MP.GetTemplateId(String shortId, String name) in C:\Users\XXXX\Desktop\AreaPlatform\PTAdmin\PTAdmin\SX.cs:line 44
at PTAdmin.Controllers.LoginController.LoginToken(String phoneNumber) in C:\Users\XXXX\Desktop\AreaPlatform\PTAdmin\PTAdmin\Controllers\LoginController.cs:line 133
The SQL statement, parameters and query results contain some Chinese characters, could that be the root of this issue?
.NET Core runtime: v2.0.5
MysqlConnector: 0.42.0
The text was updated successfully, but these errors were encountered:
Exception message:
The SQL statement, parameters and query results contain some Chinese characters, could that be the root of this issue?
.NET Core runtime: v2.0.5
MysqlConnector: 0.42.0
The text was updated successfully, but these errors were encountered: