SocketException:
Failed to create datagram socket (OS Error: Operation not permitted, errno = 1),
address = 0.0.0.0,
port = 65000
--------- beginning of main
02-20 11:06:57.827 12794 12794 E le.udp_sampl: Not starting debugger since process cannot load the jdwp agent.
02-20 11:06:57.929 12794 12794 I ForceDarkHelper: packageName:com.example.udp_sample getForceDarkConfigInfo null forceDarkAppConfigJsonString:null
--------- beginning of system
02-20 11:06:57.929 12794 12794 I ForceDarkHelper: ForceDarkConfigInfo: null
02-20 11:06:57.934 12794 12794 I MiuiForceDarkConfig: MiuiForceDarkConfig setConfig density:2.750000, mainRule:17, secondaryRule:0, tertiaryRule:0
02-20 11:06:57.937 12794 12794 D NetworkSecurityConfig: No Network Security Config specified, using platform default
02-20 11:06:57.938 12794 12794 D NetworkSecurityConfig: No Network Security Config specified, using platform default
02-20 11:06:58.038 12794 12794 W le.udp_sample: type=1400 audit(0.0:1691132): avc: denied { read } for name="max_map_count" dev="proc" ino=57141474 scontext=u:r:untrusted_app:s0:c123,c257,c512,c768 tcontext=u:object_r:proc_max_map_count:s0 tclass=file permissive=0 app=com.example.udp_sample
02-20 11:06:58.093 12794 12794 D View : com.example.udp_sample initForcedUseForceDark: 1
02-20 11:06:58.095 12794 12794 E le.udp_sampl: Invalid ID 0x00000000.
02-20 11:06:58.098 12794 12794 I SurfaceFactory: [static] sSurfaceFactory = com.mediatek.view.impl.SurfaceFactoryImpl@2bda03b
02-20 11:06:58.115 12794 12794 D DecorView[]: getWindowModeFromSystem windowmode is 1
02-20 11:06:58.115 12794 12794 D DecorView: createDecorCaptionView windowingMode:1 mWindowMode 1 isFullscreen: true
02-20 11:06:58.140 12794 12794 D ViewRootImpl[MainActivity]: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
02-20 11:06:58.141 12794 12794 D DecorView[]: getWindowModeFromSystem windowmode is 1
02-20 11:06:58.147 12794 12794 I InputTransport: Create ARC handle: 0xd31c2650
02-20 11:06:58.147 12794 12794 V PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@d62f16e, this = DecorView@1c4800f[MainActivity]
02-20 11:06:58.176 12794 12794 D SurfaceView: UPDATE null, mIsCastMode = false
02-20 11:06:58.620 12794 12833 E ion : ioctl c0044901 failed with code -1: Invalid argument
02-20 11:06:58.731 12794 12818 I le.udp_sampl: ProcessProfilingInfo new_methods=982 is saved saved_to_disk=1 resolve_classes_delay=8000
02-20 11:07:29.071 12794 12826 I GED : ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 29, oppidx_max 29, oppidx_min 0
02-20 11:07:29.073 12794 12794 V PhoneWindow: DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@d62f16e, this = DecorView@1c4800f[MainActivity]
02-20 11:07:29.690 12794 12794 V PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@d62f16e, this = DecorView@1c4800f[MainActivity]
02-20 11:07:29.692 12794 12794 V PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@d62f16e, this = DecorView@1c4800f[MainActivity]
I tested in two devices, one with android 11, and the other with android 8, the same error is thrown in both, the difference is that in android 8 I get Failed to create datagram socket (OS Error: Permission denied, errno = 13),
.
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
Flutter 2.10.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 097d3313d8 (2 days ago) • 2022-02-18 19:33:08 -0600
Engine • revision a83ed0e5e3
Tools • Dart 2.16.1 • DevTools 2.9.2