Git Product home page Git Product logo

Comments (4)

bemasc avatar bemasc commented on June 29, 2024

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.

profOnno avatar profOnno commented on June 29, 2024

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.

agrieve avatar agrieve commented on June 29, 2024

Certainly looks like .connect() should be run on a dedicated background thread.

from cordova-plugin-chrome-apps-sockets-tcp.

agrieve avatar agrieve commented on June 29, 2024

Published in v1.3.6

from cordova-plugin-chrome-apps-sockets-tcp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.