flutter_socket_io icon indicating copy to clipboard operation
flutter_socket_io copied to clipboard

adhara_socket_io is not working in Release apk

Open 0xdhu opened this issue 4 years ago • 4 comments

Hello. how are you? I am working on super simple app with adhara_socket_io.

I have built the simple nodejs server on my local. (http://192.168.110.80:3000) I used adhara_socket_io 0.4.2+1.

It was working in debug apk perfectly. So I have built release apk. But After I build release apk, it was not working. I mean it doesn't have socket communication with server.

I am using Windows 10.

[√] Flutter (Channel dev, v1.18.0-8.0.pre, on Microsoft Windows [Version 10.0.18362.53], locale en-US)
    • Flutter version 1.18.0-8.0.pre at C:\flutter
    • Framework revision e0c63cd35e (6 weeks ago), 2020-04-23 22:29:01 -0400
    • Engine revision d2ec21221e
    • Dart version 2.9.0 (build 2.9.0-3.0.dev b0d35855d8)


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\Administrator\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.45.1)
    • VS Code at C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.11.0

Please help me.

0xdhu avatar Jun 08 '20 04:06 0xdhu

@monkeyMax-SVG have you made sure you are on the same network as your server?

tiholic avatar Jun 08 '20 06:06 tiholic

@monkeyMax-SVG you need to give the app the internet permission. The debug version has it on by default, but the release version doesn't.

XiovV avatar Jul 14 '20 18:07 XiovV

same issue

anhdo9797 avatar Jun 19 '21 04:06 anhdo9797

@monkeyMax-SVG @anhdo9797 were you able to solve the issue by giving internet permissions? If not, here are some details:

Internet permission is already included in the plugin code: https://github.com/infitio/flutter_socket_io/blob/main/android/src/main/AndroidManifest.xml

Try using flutter run --release and see the actual issue (https://flutter.dev/docs/testing/build-modes#release)

tiholic avatar Jun 25 '21 07:06 tiholic