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

Unhandled exception: Invalid argument(s): Failed to load dynamic library 'serialport.dll': error code 126 #55

Open
jaxram opened this issue Mar 14, 2022 · 5 comments

Comments

@jaxram
Copy link

jaxram commented Mar 14, 2022

import 'package:libserialport/libserialport.dart';

// ignore_for_file: avoid_print

void main() {
print('Available ports:');
var i = 0;
for (final name in SerialPort.availablePorts) {
final sp = SerialPort(name);
print('${++i}) $name');
print('\tDescription: ${sp.description}');
print('\tManufacturer: ${sp.manufacturer}');
print('\tSerial Number: ${sp.serialNumber}');
print('\tProduct ID: 0x${sp.productId!.toRadixString(16)}');
print('\tVendor ID: 0x${sp.vendorId!.toRadixString(16)}');
sp.dispose();
}
}
SerialPort.availablePorts throws the error
Unhandled exception: Invalid argument(s): Failed to load dynamic library 'serialport.dll': error code 126
in windows machine..
I also tried in linux there it shows --- Unhandled exception: Invalid argument(s): Failed to load dynamic library 'serialport.so': error code 126
...Any solutions..

@aniss42
Copy link

aniss42 commented Mar 22, 2022

Hello , same issue here , any updates ?

@willianrosner
Copy link

Hello, I have Flutter version 2.10.4, Dart version 2.16.2 and DevTools version 2.9.2;

I use Win11

And it gives the same error when compiling the program.

Observed that in version 2.10.3 on Win 10, error does not occur.

I look forward to any news...

@aniss42
Copy link

aniss42 commented Apr 8, 2022

Hello ,
Anyone facing this issue please use this package instead :
flutter_libserialport 0.2.3

Best regards
Aniss

@willianrosner
Copy link

Hello, I used this other lib and it worked normally.

thanks

@UserDebS
Copy link

UserDebS commented Mar 6, 2024

Hello , Anyone facing this issue please use this package instead : flutter_libserialport 0.2.3

Best regards Aniss

Thank you, this actually worked for me.

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

4 participants