This is fixed now in git. https://github.com/codenameone/CodenameOne/commit/8927c64972a0f1c838b4401b1bdf475b2560abc6
It will be included in next update on Friday. Best regards Steve On Tue, Sep 4, 2018 at 4:00 PM, Steve Hannah <[email protected]> wrote: > Thanks. I should have a fix for this shortly. > > On Tue, Sep 4, 2018 at 3:30 PM, Thomas <[email protected]> wrote: > >> OK. I was able to track down the issue. It appears that the >> android.webview.chromium >> previously-failed class messages in logcat where actually unrelated to my >> problem (the also appear in my working test cases). Actually, the issue is >> that it seems that now, on android, a BrowserComponent can no longer be >> used or controlled (to execute some js code) if not displayed. In the >> simulator this is not the case (the BrowserComponent can still be used if >> not displayed). I don't know if this is the garbage collector that acts >> differently on android and on the simulator or if this is some other code >> in the CN1 code that triggered this change but this is a real issue in my >> test case. Actually, I am using a BrowserComponent to control a socketio >> connection with my server (that is used during the whole life time of my >> app). With the new BrowserComponent behaviour, this is no longer possible... >> I updated my SocketIOTest test case (https://github.com/ramsestom/ >> CN1SocketIO_test) to test for this issue. If I have the line >> >> hi.add(BorderLayout.CENTER, browser); >> >> in my main MyAppplication class, everything is working. But If I comment >> it (so the BrowserComponent handeling the socketio connection is no >> longer displayed), the socketio connection do not work anymore (and if I >> have a logger in my BrowserComponent it would fail with a null message like >> in my first post). >> Would it be possible to reverse the BrowserComponent behaviour back to >> what it was a few weeks ago so that it can be used to execute js code in >> background on any platform supporting it? >> Thanks >> >> >> On Tuesday, September 4, 2018 at 6:42:46 PM UTC+2, Steve Hannah wrote: >> >>> A self-contained test case always helps. In any case, please file an >>> issue in the issue tracker so this doesn't get lost. >>> >>> On Tue, Sep 4, 2018 at 9:32 AM, Thomas <[email protected]> wrote: >>> >>>> Actually, the issue seems to be related to webview that fails to be >>>> loaded on my android device using CN1. >>>> I commented the logger part in my code and my app still doesn't work >>>> properly on my android device with this kind of message in the debugger >>>> logcat: >>>> >>>> I/WebViewFactory: Loading com.google.android.webview version >>>> 68.0.3440.91 (code 344009150) >>>> I/art: Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.ServiceWorkerCo >>>> ntrollerAdapter> >>>> Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.ServiceWorkerCo >>>> ntrollerAdapter> >>>> I/art: Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.TokenBindingMan >>>> agerAdapter> >>>> Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.TokenBindingMan >>>> agerAdapter> >>>> I/cr_LibraryLoader: Time to load native libraries: 1 ms (timestamps >>>> 8819-8820) >>>> E/cr_VariationsUtils: Failed reading seed file >>>> "/data/data/org.tbdlab.myapp/app_webview/variations_seed_new": >>>> /data/data/org.tbdlab.myapp/app_webview/variations_seed_new: open >>>> failed: ENOENT (No such file or directory) >>>> Failed reading seed file "/data/data/org.tbdlab. >>>> myapp/app_webview/variations_seed": >>>> /data/data/org.tbdlab.myapp/app_webview/variations_seed: >>>> open failed: ENOENT (No such file or directory) >>>> I/chromium: [INFO:library_loader_hooks.cc(36)] Chromium logging >>>> enabled: level = 0, default verbosity = 0 >>>> I/cr_LibraryLoader: Expected native library version number >>>> "68.0.3440.91", actual native library version number "68.0.3440.91" >>>> I/cr_BrowserStartup: Initializing chromium process, singleProcess=true >>>> I/cr_base: Android Locale: en_US requires .pak files: [] >>>> I/art: Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.WebResourceErrorAdapter> >>>> Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.WebResourceErrorAdapter> >>>> I/art: Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.WebViewContents >>>> ClientAdapter$6> >>>> Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.WebViewContents >>>> ClientAdapter$6> >>>> Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.SafeBrowsingRes >>>> ponseAdapter> >>>> Rejecting re-init on previously-failed class >>>> java.lang.Class<com.android.webview.chromium.SafeBrowsingRes >>>> ponseAdapter> >>>> >>>> >>>> my android test device is using android 5.1.1 and has the latest >>>> chromium vebview version available for this device (I checked on the >>>> playstore). >>>> So I don't know if this issue was triggered by changes you made in CN1 >>>> that may have broke compatibility with some versions of android/webview or >>>> if this is the latest vebview version that is bugged (my device may have >>>> performed an autoupdate of webview chromium since last month) >>>> I can probably make you a self-contained test case if necessary but I >>>> am not sure it would help as the issue seems to be with webview that can >>>> not load (so just trying to open a componentbrowser using webview might be >>>> enaugh as a test) >>>> What version of vebview runs on your Nexus 5. Is it the latest one? >>>> >>>> >>>> >>>> >>>> On Tuesday, September 4, 2018 at 2:15:09 PM UTC+2, Steve Hannah wrote: >>>> >>>>> I just copied and pasted your sample into my own test case and it >>>>> works fine in Android 6 on Nexus 5. What version of Android are you >>>>> using? Can you provide a self-contained test case that will reproduce it? >>>>> >>>>> On Mon, Sep 3, 2018 at 10:50 PM, Shai Almog <[email protected]> >>>>> wrote: >>>>> >>>>>> Steve made some performance improvements to JS interconnect which >>>>>> might have triggered a race condition. We'll look into it. >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "CodenameOne Discussions" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected] >>>>>> . >>>>>> Visit this group at https://groups.google.com/grou >>>>>> p/codenameone-discussions. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/codenameone-discussions/39 >>>>>> 9db7a2-33a8-451d-b788-504b0d86ab92%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/codenameone-discussions/399db7a2-33a8-451d-b788-504b0d86ab92%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Steve Hannah >>>>> Software Developer >>>>> Codename One >>>>> http://www.codenameone.com >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "CodenameOne Discussions" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> Visit this group at https://groups.google.com/grou >>>> p/codenameone-discussions. >>>> To view this discussion on the web visit https://groups.google.com/d/ms >>>> gid/codenameone-discussions/38d0a677-a0bc-42c4-9b0e-001fe5ad >>>> 0f68%40googlegroups.com >>>> <https://groups.google.com/d/msgid/codenameone-discussions/38d0a677-a0bc-42c4-9b0e-001fe5ad0f68%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Steve Hannah >>> Software Developer >>> Codename One >>> http://www.codenameone.com >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "CodenameOne Discussions" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> Visit this group at https://groups.google.com/grou >> p/codenameone-discussions. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/codenameone-discussions/3581ecb7-9a45-44ed-b90f-e8dba540 >> 6be0%40googlegroups.com >> <https://groups.google.com/d/msgid/codenameone-discussions/3581ecb7-9a45-44ed-b90f-e8dba5406be0%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Steve Hannah > Software Developer > Codename One > http://www.codenameone.com > -- Steve Hannah Software Developer Codename One http://www.codenameone.com -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKWby4PHFb3tEHs7wtH_1buvWinjoYBe7yYL24vv3CM2FA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
