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

Exception has occurred. RangeError (RangeError (byteOffset): Invalid value: Not in inclusive range 0..5: 7) #129

Open
lamynespl opened this issue May 2, 2022 · 2 comments

Comments

@lamynespl
Copy link

Running the code as is I get the error:

var result = await conn.query(
'insert into users (name, email, age) values (?, ?, ?)',
['Bob', 'bob@bob.com', 25]);
// ignore: avoid_print
print('Inserted row id=${result.insertId}');

Exception has occurred.
RangeError (RangeError (byteOffset): Invalid value: Not in inclusive range 0..5: 7)

I can run it if I don't use the question marks and just use the data in it's place.

Sort of blocked.

@SavageTee
Copy link

i get the same error calling multiple STORED PROCEDURES

for(x = 0; x<100; x++){ var stor1 = await Connection.query("CALL Flutter_ServerId(?);",['3',]); var stor2 = await Connection.query("CALL Flutter_FromTo(?);",['3',]); }

E/flutter (24143): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: RangeError (byteOffset): Invalid value: Not in inclusive range 0..5: 7
E/flutter (24143): #0 _ByteDataView.getUint16 (dart:typed_data-patch/typed_data_patch.dart:4822:7)
E/flutter (24143): #1 Buffer.readUint16 (package:mysql1/src/buffer.dart:240:24)
E/flutter (24143): #2 new PrepareOkPacket (package:mysql1/src/prepared_statements/prepare_ok_packet.dart:20:30)
E/flutter (24143): #3 Handler.checkResponse (package:mysql1/src/handlers/handler.dart:68:24)
E/flutter (24143): #4 PrepareHandler.processResponse (package:mysql1/src/prepared_statements/prepare_handler.dart:45:18)
E/flutter (24143): #5 ReqRespConnection._handleData (package:mysql1/src/single_connection.dart:349:32)
E/flutter (24143): #6 ReqRespConnection._handleHeader (package:mysql1/src/single_connection.dart:318:13)
E/flutter (24143):
E/flutter (24143): #7 ReqRespConnection._readPacket (package:mysql1/src/single_connection.dart:303:7)
E/flutter (24143):

most probably its a bug

@dongri727
Copy link

I got exactly same error with trying the example code on pub.dev,
my conditions: m1mac, flutter3, MySql8

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

No branches or pull requests

3 participants