Comments (6)
I talked to the Dart team and they are convinced it's a bug in mysql1.
I don't understand how it's so transient... I run it one time and it fails... then, run it a minute later and it succeeds.
from mysql1_dart.
I'm with the same error, but in another context. I'm using msix for generate a installer (MSI) where I need to do a certificate (using SSL). Follow the erro itself:
flutter pub run msix:create
running "flutter build windows"... 113.8s
building msix files... \Unhandled exception:
FormatException: Missing extension byte (at offset 45)
#0 _Utf8Decoder.convertChunked (dart:convert-patch/convert_patch.dart:1859:7)
#1 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:314:28)
#2 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:310:5)
#3 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
#4 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#5 _RootZone.runUnaryGuarded (dart:async/zone.dart:1618:10)
#6 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#7 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#8 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#9 _StreamController._add (dart:async/stream_controller.dart:648:7)
#10 _StreamController.add (dart:async/stream_controller.dart:596:5)
#11 _Socket._onData (dart:io-patch/socket_patch.dart:2314:41)
#12 _RootZone.runUnaryGuarded (dart:async/zone.dart:1618:10)
#13 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#14 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#15 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#16 _StreamController._add (dart:async/stream_controller.dart:648:7)
#17 _StreamController.add (dart:async/stream_controller.dart:596:5)
#18 new _RawSocket. (dart:io-patch/socket_patch.dart:1839:33)
#19 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1322:14)
#20 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#21 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#22 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:122:13)
#23 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)
pub finished with exit code 255
from mysql1_dart.
String readString(int length) {
var s = utf8.decode(_list.sublist(_readPos, _readPos + length)); <= HERE
_readPos += length;
return s;
}
from mysql1_dart.
I don't understand your code, but it's dying in the decode routine, that does this:
Converts the UTF-8 codeUnits (a list of unsigned 8-bit integers) to the corresponding string
https://api.dart.dev/stable/2.10.0/dart-convert/Utf8Decoder/convert.html
But the FUNNY thing is that my table doesn't even have any strings!!!
`symID` smallint(4) unsigned not null,
`qs` smallint(5) unsigned not null,
`open` decimal(8,2) unsigned default null,
`high` decimal(8,2) unsigned default null,
`low` decimal(8,2) unsigned default null,
`lp` decimal(8,2) unsigned default null,
`v` int(8) unsigned default null,
primary key (symID, qs)
from mysql1_dart.
/// Converts the UTF-8 [codeUnits] (a list of unsigned 8-bit integers) to the
/// corresponding string.
///
/// Uses the code units from [start] to, but no including, [end].
/// If [end] is omitted, it defaults to `codeUnits.length`.
///
/// If the [codeUnits] start with the encoding of a
/// [unicodeBomCharacterRune], that character is discarded.
String convert(List<int> codeUnits, [int start = 0, int? end]) {
// Allow the implementation to intercept and specialize based on the type
// of codeUnits.
var result = _convertIntercepted(_allowMalformed, codeUnits, start, end);
if (result != null) {
return result;
}
return _Utf8Decoder(_allowMalformed).convertSingle(codeUnits, start, end); <====HERE
}
from mysql1_dart.
There are plenty of places where we are reading a string and assuming it is utf8 when it is not specified in the docs. I've updated the code to soften this assumption.
Can you try running with the master
branch.
from mysql1_dart.
Related Issues (20)
- Please publish a new version to pub.dev HOT 5
- facing the error that my ip is not allowed to connect with mysql server how can i resolve this? HOT 1
- Unhandled Exception: SocketException: Connection refused / Connection timed out, host: HOT 1
- Semicolon HOT 3
- Invalid value: Not in inclusive range 0..5 HOT 3
- MySQL1 not closing connection HOT 2
- Error Problem
- Too much logging on FINE level.
- where ... like with parameter HOT 1
- Import / Export
- MacOS documentation is incomplete
- Store image as medium blob not working HOT 2
- can we delete the data/table or single entity
- Connection Pool
- Is this package still being maintained? HOT 1
- Unexpected Behavior: Need to Run Query Twice to Get Results HOT 2
- how to set session commands
- Slow Performance HOT 1
- Are you interested in helping porting PHP eloquent to dart? HOT 3
- Unable to solve error - SocketException: Socket has been closed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysql1_dart.