The error of Server Error: SocketException: Failed to create server socket in release mode while running example in release code at the time of installation of the app on real devices but working fine in debug mode.
`[ +2 ms] Stopping app 'app.apk' on Samsung device.
[ ] executing: E:\Android\Sdk\platform-tools\adb.exe -s RF8M31KVFRK shell am force-stop pk.digit.psp512
[ +143 ms] executing: E:\Android\Sdk\platform-tools\adb.exe -s RF8M31KVFRK shell pm list packages pk.digit.psp512
[ +132 ms] package:pk.digit.psp512
[ ] executing: E:\Android\Sdk\platform-tools\adb.exe -s RF8M31KVFRK shell cat /data/local/tmp/sky.pk.digit.psp512.sha1
[ +83 ms] 70ff7451cc2a7b7ceb3814ff84b954977b2bceaf
[ ] Installing APK.
Installing build\app\outputs\flutter-apk\app.apk...
[{"event":"app.progress","params":{"appId":"0ecd9132-8bc0-4716-9602-fff31dace201","id":"1","progressId":null,"message":"Installing build\app\outputs\flutter-apk\app.apk...","finished":false}}]
[ ] executing: E:\Android\Sdk\platform-tools\adb.exe -s RF8M31KVFRK install -t -r D:\Applications\StudioProjects\psp512\build\app\outputs\flutter-apk\app.apk
[+24193 ms] Performing Streamed Install
adb: failed to install D:\Applications\StudioProjects\psp512\build\app\outputs\flutter-apk\app.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package pk.digit.psp512 signatures do not match previously installed version; ignoring!]
[{"event":"app.progress","params":{"appId":"0ecd9132-8bc0-4716-9602-fff31dace201","id":"1","progressId":null,"finished":true}}]
[ ] Warning: Failed to install APK.
[ ] Uninstalling old version...
[ ] executing: E:\Android\Sdk\platform-tools\adb.exe -s RF8M31KVFRK uninstall pk.digit.psp512
[ +1 ms] Error: ADB exited with exit code 1
[ ] Performing Streamed Install
adb: failed to install D:\Applications\StudioProjects\psp512\build\app\outputs\flutter-apk\app.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package pk.digit.psp512 signatures do not match previously installed version; ignoring!]
[+1828 ms] Success
Installing build\app\outputs\flutter-apk\app.apk...
[{"event":"app.progress","params":{"appId":"0ecd9132-8bc0-4716-9602-fff31dace201","id":"2","progressId":null,"message":"Installing build\app\outputs\flutter-apk\app.apk...","finished":false}}]
[ ] executing: E:\Android\Sdk\platform-tools\adb.exe -s RF8M31KVFRK install -t -r D:\Applications\StudioProjects\psp512\build\app\outputs\flutter-apk\app.apk
[+28195 ms] Performing Streamed Install
Success
[{"event":"app.progress","params":{"appId":"0ecd9132-8bc0-4716-9602-fff31dace201","id":"2","progressId":null,"finished":true}}]
[ ] executing: E:\Android\Sdk\platform-tools\adb.exe -s RF8M31KVFRK shell echo -n c3717545dcb851d2ff0a7f615f7d02a41ae418b8 > /data/local/tmp/sky.pk.digit.psp512.sha1
[ +74 ms] executing: E:\Android\Sdk\platform-tools\adb.exe -s RF8M31KVFRK shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x20000000 --ez enable-dart-profiling true pk.digit.psp512/pk.digit.psp512.MainActivity
[ +218 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000 cmp=pk.digit.psp512/.MainActivity (has extras) }
[ +1 ms] Application running.
[{"event":"app.started","params":{"appId":"0ecd9132-8bc0-4716-9602-fff31dace201"}}]
[ +429 ms] I/flutter (21016): Server Error: SocketException: Failed to create server socket (OS Error: Operation not permitted, errno = 1), address = localhost, port = 53053 #0 _NativeSocket.bind (dart:io-patch/socket_patch.dart:996)
[ ] I/flutter (21016): `
here is flutter doctor v
`[β] Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.19045.2604], locale en-US)
β’ Flutter version 3.3.10 on channel stable at E:\Android\flutter
β’ Upstream repository https://github.com/flutter/flutter.git
β’ Framework revision 135454af32 (10 weeks ago), 2022-12-15 07:36:55 -0800
β’ Engine revision 3316dd8728
β’ Dart version 2.18.6
β’ DevTools version 2.15.0
[β] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
β’ Android SDK at E:\Android\Sdk
β’ Platform android-33-ext4, build-tools 33.0.1
β’ Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
β’ Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
β’ All Android licenses accepted.
[β] Chrome - develop for the web
β’ Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[β] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.1)
β’ Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
β’ Visual Studio Community 2022 version 17.4.33110.190
β’ Windows 10 SDK version 10.0.22000.0
[β] Android Studio (version 2022.1)
β’ Android Studio at C:\Program Files\Android\Android Studio
β’ Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
β’ Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
β’ Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
[β] VS Code (version 1.75.1)
β’ VS Code at C:\Users\DIGIT\AppData\Local\Programs\Microsoft VS Code
β’ Flutter extension version 3.58.0
[β] Connected device (4 available)
β’ SM G973F (mobile) β’ RF8M31KVFRK β’ android-arm64 β’ Android 12 (API 31)
β’ Windows (desktop) β’ windows β’ windows-x64 β’ Microsoft Windows [Version 10.0.19045.2604]
β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 110.0.5481.104
β’ Edge (web) β’ edge β’ web-javascript β’ Microsoft Edge 110.0.1587.50
[β] HTTP Host Availability
β’ All required HTTP hosts are available
β’ No issues found!`