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

TimeoutException #15

Closed
emre13k opened this issue Apr 23, 2022 · 23 comments
Closed

TimeoutException #15

emre13k opened this issue Apr 23, 2022 · 23 comments
Assignees

Comments

@emre13k
Copy link

emre13k commented Apr 23, 2022

E/flutter (13703): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: TimeoutException after 0:00:05.000000: Future not completed
E/flutter (13703):
E/flutter (13703): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: MySQL error: Got timeout reading communication packets

its the error code using example.
can anyone help me about this?

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

Please make sure you can access you database. You can check it using telnet or console mysql client or whatever you like

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

I can access my db using console.

mysql> select * from deneme.sehirler where id=1;
+----+-------+
| id | name |
+----+-------+
| 1 | adana |
+----+-------+
1 row in set (0.01 sec)

mysql>

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

Hm. Maybe same as here?
#11

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

it can be but ı don't know how can ı change. do you know?

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

Try to connect to mysql from console, restart flutter app and check if issue still exists

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

if I use my phone ip:
Unhandled Exception: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 192.168.1.100, port = 54336

if I use my pc ip:
Unhandled Exception: TimeoutException after 0:00:05.000000: Future not completed
E/flutter (26589):
E/flutter (26589): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: MySQL error: Got timeout reading communication packets

but if I use emulator and using 10.0.2.2 in the host it working.

I want to use my phone what shold ı do.

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

You want to connect from your phone to what? Where is mysql server?

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

Also check that you have Internet permission in your app

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

mysql server is in my pc

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

My app has a internet permission in the androidmanifest.xml

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

When I use emulator its working but not working in my phone

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

What exception you got when trying from your phone?

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

if I write to host: "127.0.0.1"

I/flutter (15314): Connecting to mysql server...
E/flutter (15314): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 127.0.0.1, port = 32768

if I write to host: "192.168.1.103" //pc ip

I/flutter (15314): Connecting to mysql server...
E/flutter (15314): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: TimeoutException after 0:00:05.000000: Future not completed
E/flutter (15314):
E/flutter (15314): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: MySQL error: Got timeout reading communication packets

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

As I understand you phone and PC are in the same wifi network. And your mysql server is listening on 0.0.0.0 address (not 127.0.0.1)?

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

As I understand you phone and PC are in the same wifi network. ---> yes
And your mysql server is listening on 0.0.0.0 address (not 127.0.0.1)? ---> I don't know

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

You must find
listen
directive in your mysql config file and make sure it is set to 0.0.0.0

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

where can I find this

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

What operation system?

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

windows 10

@zim32
Copy link
Owner

zim32 commented Apr 23, 2022

There should be my.ini or my.cfg file in mysql directory. You can read official mysql documentation

@emre13k
Copy link
Author

emre13k commented Apr 23, 2022

I didn't find anything. the problem will be something else ı guess

@zim32
Copy link
Owner

zim32 commented Apr 26, 2022

Can you try release 0.0.15
There was some fix, maybe your problem depends on that issue

@zim32 zim32 self-assigned this Apr 26, 2022
@zim32
Copy link
Owner

zim32 commented May 16, 2022

Possible duplicate of
#16

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

2 participants