Comments (4)
@gdeiorio as I don't have an Android 9 device handy for a reproduction, I'd suggest forking this package and looking at the connect or finishConnect functions in the code where you can see the following:
} catch (IOException e) {
callbackContext.error(buildErrorInfo(-104, e.getMessage()));
}
The -104 indicates something went wrong in the connection process and the message indicates a timeout was the source of the issue.
Does it never work? Or only when the connection takes a lot of time?
This might also help:
https://stackoverflow.com/questions/5632279/how-to-set-timeout-on-client-socket-connection
from cordova-plugin-chrome-apps-sockets-tcp.
It turned out it was not an Android 9 related issues, since other devices with that version are not giving trouble.
Actually, the issue happens, most of the times, after a really short time, like 200 or 300ms.
Another strange is behaviour is that the device can connect to the socket via TCP Telnet Terminal, it just can't connect via app.
Am I missing some permissions (but, if so, I don't get why other devices have no problems)?
from cordova-plugin-chrome-apps-sockets-tcp.
Some links which might be relevant:
https://stackoverflow.com/questions/6586443/android-tcp-permission-denied-error
https://stackoverflow.com/questions/53081049/local-socket-access-denied-in-api23-working-in-api21
In some other blog I read about these two permissions:
from cordova-plugin-chrome-apps-sockets-tcp.
Hi,
Looks like the problem is solved.
Apparently it happens when there are both wifi and 4g connection on, some new devices switch automatically to the 4g if the wifi net hasn't access to internet or it has a low quality connection.
Since the device needed to be connected to a specific wifi net, turning off the 4g connection worked.
from cordova-plugin-chrome-apps-sockets-tcp.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-chrome-apps-sockets-tcp.