SocketIOUnity icon indicating copy to clipboard operation
SocketIOUnity copied to clipboard

Not working on android

Open ScottasM opened this issue 2 years ago • 8 comments

In editor it's absolutely fine - everything works perfectly. But when i export it on android nothing happens, the adb logcat doesnt show any errors/warnings/messages related to socketio, just nothing happens. Im exporting with il2cpp, ARMv7 disabled, arm64 enabled, internet settings set to required. Unity version - 2021.3.8f1 (maybe it's too old?)

ScottasM avatar Oct 30 '23 19:10 ScottasM

Updated the version to 2022.3.10f1, still the same.

ScottasM avatar Oct 31 '23 13:10 ScottasM

also im building with il2cpp if that matters.

ScottasM avatar Oct 31 '23 17:10 ScottasM

One more thing to note - the android app seems to be reaching my flask socketio server, because it keeps spamming post requests every few seconds (probably trying to reconnect) but the sockets arent established

ScottasM avatar Nov 02 '23 19:11 ScottasM

Okay, after 4 days of this torture i fixed it. for any other lost souls out there here what was wrong : Apparently android didnt trust my ssl certificate, and didnt print anything to logcat, so when i added all the events like OnReconnectFail, OnRecconectAttempt and etc. i finally saw the error.

what i had to do was : cat certificate.crt ca_bundle.crt > chained.pem to generate the chained.pem file for android to trust

and then in my flask socketio app i changed the path to point from certificate.crt to chained.pem

ScottasM avatar Nov 03 '23 14:11 ScottasM

Okay, after 4 days of this torture i fixed it. for any other lost souls out there here what was wrong : Apparently android didnt trust my ssl certificate, and didnt print anything to logcat, so when i added all the events like OnReconnectFail, OnRecconectAttempt and etc. i finally saw the error.

what i had to do was : cat certificate.crt ca_bundle.crt > chained.pem to generate the chained.pem file for android to trust

and then in my flask socketio app i changed the path to point from certificate.crt to chained.pem

Hi, I have been facing same issue on android.

Kindly help how did you resolve it.

Thanks

rehanthedreamer avatar Nov 20 '23 15:11 rehanthedreamer

Okay, after 4 days of this torture i fixed it. for any other lost souls out there here what was wrong : Apparently android didnt trust my ssl certificate, and didnt print anything to logcat, so when i added all the events like OnReconnectFail, OnRecconectAttempt and etc. i finally saw the error. what i had to do was : cat certificate.crt ca_bundle.crt > chained.pem to generate the chained.pem file for android to trust and then in my flask socketio app i changed the path to point from certificate.crt to chained.pem

Hi, I have been facing same issue on android.

Kindly help how did you resolve it.

Thanks

what do you mean? I explained how i fixed it

ScottasM avatar Nov 20 '23 16:11 ScottasM

Okay, after 4 days of this torture i fixed it. for any other lost souls out there here what was wrong : Apparently android didnt trust my ssl certificate, and didnt print anything to logcat, so when i added all the events like OnReconnectFail, OnRecconectAttempt and etc. i finally saw the error. what i had to do was : cat certificate.crt ca_bundle.crt > chained.pem to generate the chained.pem file for android to trust and then in my flask socketio app i changed the path to point from certificate.crt to chained.pem

Hi, I have been facing same issue on android. Kindly help how did you resolve it. Thanks

what do you mean? I explained how i fixed it

so the issue was on server side? not client? its not related to https://github.com/itisnajim/SocketIOUnity/issues/75 ?

BorisMolch avatar Dec 14 '23 08:12 BorisMolch

Okay, after 4 days of this torture i fixed it. for any other lost souls out there here what was wrong : Apparently android didnt trust my ssl certificate, and didnt print anything to logcat, so when i added all the events like OnReconnectFail, OnRecconectAttempt and etc. i finally saw the error. what i had to do was : cat certificate.crt ca_bundle.crt > chained.pem to generate the chained.pem file for android to trust and then in my flask socketio app i changed the path to point from certificate.crt to chained.pem

Hi, I have been facing same issue on android. Kindly help how did you resolve it. Thanks

what do you mean? I explained how i fixed it

so the issue was on server side? not client? its not related to #75 ?

Yeah, it was. Unfortunately the logs didnt show it earlier, so had to torture myself for a few days.

ScottasM avatar Dec 16 '23 10:12 ScottasM