添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

void main() {
// add interceptors
dio.interceptors..add(CookieManager(CookieJar()))..add(LogInterceptor());
(dio.transformer as DefaultTransformer).jsonDecodeCallback = parseJson;
dio.options.receiveTimeout = 15000;
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate =
(client) {
client.findProxy = (uri) {
//proxy to my PC(charles)
return "PROXY xx.xx.xx.xx:8888";
runApp(MyApp());

flutter: DioError [DioErrorType.DEFAULT]: SocketException: Connection failed (OS Error: Permission denied, errno = 13), address = xx.xx.xx.xx, port = 8888

@shuyanzi
Are you facing this issue when trying to proxy the traffic on your mobile phone with Charles setup on your machine(Mac etc)?

yes,I want to see the package information on Charles

If your AndroidManifest.xml is missing this line:

<uses-permission android:name="android.permission.INTERNET"/>

...then when we try to hook up the observatory port we will get an error 13 (permission denied).
We should catch this case and explain what to do about it.

Duplicate of #2138

sunyongsheng, caseyryan, mmcib, megataps, qanastek, IanWambai, and deucks reacted with thumbs up emoji qanastek reacted with hooray emoji mmcib and IanWambai reacted with heart emoji qanastek and IanWambai reacted with rocket emoji All reactions

@shuyanzi
I've reproduced this error by removing the <uses-permission android:name="android.permission.INTERNET"/> section, just as @cakipaul said.

When the android.permissions.INTERNET is specified in the AndroidManifest.xml, I've catched the flutter http traffic using Charles, as below:

I'm closing this issue now.
If you are still seeing this issue, comment below and I will reopen this issue.

I am facing the same problem. Your solution does work for me. Below is the screenshot of my code base and the error log:
I am trying to display the user's display photo after loggin in with his/her google account. Pls help me.