Comments (4)
Possibly related: on a Nexus 5X with Android M, API level 24, I'm seeing messages like
W/PluginManager: THREAD WARNING: exec() call to ChromeSocketsTcp.connect blocked the main thread for 458ms. Plugin should use CordovaInterface.getThreadPool().
458 ms seems like a long time. Maybe this is a blocking API that shouldn't be used on this thread?
from cordova-plugin-chrome-apps-sockets-tcp.
I have the same problem on Android 4.1.2
E/PluginManager(10586): Uncaught exception from plugin
E/PluginManager(10586): android.os.NetworkOnMainThreadException
E/PluginManager(10586): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
E/PluginManager(10586): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:84)
E/PluginManager(10586): at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
....
The older cordova-plugin-chrome-apps-socket
works on android 4.1.2.
But that version of ChromeSocket.java
wraps connect in a ConnectThread class. Was there a point of doing this different in the newer cordova-plugin-chrome-apps-sockets-tcp
?
Or is this just the 'new' android way, and there was no basis for keeping compatible with the older android versions?
from cordova-plugin-chrome-apps-sockets-tcp.
Certainly looks like .connect()
should be run on a dedicated background thread.
from cordova-plugin-chrome-apps-sockets-tcp.
Published in v1.3.6
from cordova-plugin-chrome-apps-sockets-tcp.
Related Issues (20)
- onRecieve never fires! HOT 2
- Android is ok, IOS can not connect the server!!!
- Cordova 6 iOS Support
- Long messages are arbitrarily cut HOT 1
- Cordova iOS app not downloading from production server(not appstore)
- Remote socket close should produce error -100, not error -2 HOT 2
- SNI support HOT 2
- chrome.sockets.tcp on iPad: can't disconnect HOT 3
- 'Beta': what is actually still beta? HOT 4
- setKeepAlive function is not added in iOS
- Packets reordered then TCP Window becomes full HOT 1
- how to find port used for listen (typically next available) HOT 1
- getinfo on socket from accept in tcpServer plugin does not provide peerAddress on IOS HOT 3
- Any demo?
- chrome.sockets.tcp throws null error when there is no internet connection on device
- Update to 1.3.9 HOT 2
- Connection reset not detectable
- Could missing setNoDelay() cause incorrect packet sending?
- Android: Fix writes being silently truncated when sending large ArrayBuffers HOT 2
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.