I am trying to connect a CN1 app to a distant server using socket.io . For
this, I use the native socket.io javascript lib that I call through a
BrowserComponent. In the simulator, it works just fine. However, when I try
on a real android device, nothing happen. My server do not receive any
connection attempt but I don't see any error thrown in the console by the
CN1 app. I made a custom logger to see what was going on on the javascript
part and actually it appears that none of the call I made with
BrowserComponent.execute() are executed when I am on the real android
device. On the simulator, they are (I see the output of my logger in the
console) but not in the real device (I don't see any output in my logger
whereas it is called into each of my javascript calls passed through
BrowserComponent.execute() and I also did an
internalBrowser.execute("logger.log(\"SocketIO
bridge started\")"); inside my internalBrowser.addWebEventListener("onLoad",
...) event but I don't see it either)
The BrowserComponent, that I made to display a "hello word" html message is
correctly displayed though. So it seems that it is just the js bridge that
is broken on the real android device (the Webview works as the "hello word"
message is correctly displayed by the BrowserComponent).
I don't know what can be the origin of this error and how to fix it.
Here is the content of my device logcat:
I/Timeline( 4964): Timeline: Activity_launch_request time:526015920
I/ActivityManager( 2315): START u0 {act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x10200000
cmp=org.tbdlab.socketiotest/.MyApplicationStub bnds=[53,468][175,590] (has
extras)} from uid 10023 on display 0
I/WtProcessController( 3763): mCurTask:1695
V/WindowManager( 2315): addAppToken: AppWindowToken{3d8c65ad
token=Token{363692c4 ActivityRecord{5d79d7 u0
org.tbdlab.socketiotest/.MyApplicationStub t1695}}} to stack=1 task=1695 at
0
I/ViewRootImpl( 2315): CPU Rendering VSync enable = true
V/WindowManager( 2315): Adding window Window{2e13aae1 u0 Starting
org.tbdlab.socketiotest} at 2 of 8 (after Window{1053c9dc u0
com.miui.home/com.miui.home.launcher.Launcher})
D/ScreenElementRoot( 4964): pause
D/ScreenElementRoot( 4964): pause
D/ScreenElementRoot( 4964): pause
D/ScreenElementRoot( 4964): pause
I/NotifierManager( 4964): onUnregister:
miui.maml.NotifierManager$MultiBroadcastNotifier@19834b1e
I/RenderThread( 4964): RenderThread paused, waiting for signal
I/ActivityManager( 2315): Start proc 10827:org.tbdlab.socketiotest/u0a309
for activity org.tbdlab.socketiotest/.MyApplicationStub
D/TidaProvider(10827): TidaProvider()
I/WtProcessController( 3763): MOVE TO FOREGROUND: org.tbdlab.socketiotest
10309
I/StatusController( 3763): Last foreground:com.miui.home uid:10023 Current
foreground:org.tbdlab.socketiotest uid:10309
I/WtProcessController( 3763): FOREGROUND INFO: name=org.tbdlab.socketiotest
uid=10309 pid=10827 TaskId:1695
I/Timeline( 2315): Timeline: App_transition_ready time:526016049
I/ActivityManager( 2315): Killing
10273:fr.bouyguestelecom.ecm.android:equalone/u0a140 (adj 15): empty #17
D/ActivityManagerInjector( 2315): fr.bouyguestelecom.ecm.android:equalone
is killed by AMS with adj 15 ,do not allow restart
D/ActivityManager( 2315): cleanUpApplicationRecord -- 10273
I/ViewRootImpl(10827): CPU Rendering VSync enable = true
D/OpenGLRenderer(10827): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
D/Atlas (10827): Validating map...
I/art (10827): Background sticky concurrent mark sweep GC freed
5402(352KB) AllocSpace objects, 1(20KB) LOS objects, 0% free, 10MB/10MB,
paused 29.805ms total 79.645ms
V/WindowManager( 2315): Adding window Window{eaec863 u0
org.tbdlab.socketiotest/org.tbdlab.socketiotest.MyApplicationStub} at 2 of
9 (before Window{2e13aae1 u0 Starting org.tbdlab.socketiotest})
I/Adreno-EGL(10827): <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM
build: Nondeterministic_AU_msm8916_64_LA.BR.1.2.4_RB1__release_AU
(Ic8ede1fb34)
I/Adreno-EGL(10827): OpenGL ES Shader Compiler Version: E031.25.03.04
I/Adreno-EGL(10827): Build Date: 12/10/15 Thu
I/Adreno-EGL(10827): Local Branch:
I/Adreno-EGL(10827): Remote Branch: quic/LA.BR.1.2.4_rb1.30
I/Adreno-EGL(10827): Local Patches: NONE
I/Adreno-EGL(10827): Reconstruct Branch: NOTHING
I/OpenGLRenderer(10827): Initialized EGL, version 1.4
D/OpenGLRenderer(10827): Enabling debug mode 0
I/qdutils (10827): PartialUpdate status: Disabled
I/qdutils (10827): Left Align: 0
I/qdutils (10827): Width Align: 0
I/qdutils (10827): Top Align: 0
I/qdutils (10827): Height Align: 0
I/qdutils (10827): Min ROI Width: 0
I/qdutils (10827): Min ROI Height: 0
I/qdutils (10827): Needs ROI Merge: 0
I/qdutils (10827): Dynamic Fps: Disabled
I/qdutils (10827): Min Panel fps: 0
I/qdutils (10827): Max Panel fps: 0
I/Codename One(10827): Resource not found: theme_phone.ovr
I/Codename One(10827): Resource not found: theme_android.ovr
I/Codename One(10827): Resource not found: theme_android-phone.ovr
I/Timeline( 2315): Timeline: App_transition_stopped time:526016330
I/ActivityManager( 2315): Displayed
org.tbdlab.socketiotest/.MyApplicationStub: +407ms
I/Timeline( 2315): Timeline: Activity_windows_visible id:
ActivityRecord{5d79d7 u0 org.tbdlab.socketiotest/.MyApplicationStub t1695}
time:526016350
I/GoogleInputMethod( 4372): onFinishInput() : Dummy InputConnection bound
I/GoogleInputMethod( 4372): onStartInput() : Dummy InputConnection bound
I/Timeline(10827): Timeline: Activity_idle id:
android.os.BinderProxy@22b1edbd time:526016365
D/SocketIOTest(10827): [EDT] 0:0:0,0 - Codename One revisions:
87d32ad479573c56f774b68faf42bfeb2ca86a22
D/SocketIOTest(10827): [EDT] 0:0:0,2 - WARNING: Theme sets the
commandBehavior constant which is deprecated. Please update the theme to
NOT include this theme constant. Using commandBehavior may cause your app
to perform in unexpected ways. In particular, using SIDE command behavior
in conjunction with Toolbar.setOnTopSideMenu(true) may result in runtime
exceptions.
D/SocketIOTest(10827): [EDT] 0:0:0,3 - WARNING:
Display.setCommandBehavior() is deprecated, Using it may result in
unexpected behaviour. In particular, using COMMAND_BEHAVIOR_SIDE_NAVIGATION
in conjunction with Toolbar.setOnTopSideMenu(true) may result in runtime
errors.
I/System.out(10827): showKeyboard false
W/linker (10827):
/data/app/com.google.android.webview-1/lib/arm64/libwebviewchromium.so:
unused DT entry: type 0x6ffffffe arg 0x16450
W/linker (10827):
/data/app/com.google.android.webview-1/lib/arm64/libwebviewchromium.so:
unused DT entry: type 0x6fffffff arg 0x3
D/Codename One(10827): sizechanged: 720 1230
com.codename1.impl.android.i@2ef5b5f1
D/BatteryService( 2315): Processing new values: chargerAcOnline=false,
chargerUsbOnline=true, chargerWirelessOnline=false, batteryStatus=5,
batteryHealth=2, batteryPresent=true, batteryLevel=100,
batteryTechnology=Li-ion, batteryVoltage=4361, batteryTemperature=152,
mBatteryLevelCritical=false, mPlugType=2
D/BatteryService( 2315): zhaoqf_sh batteryServices call state : 0 mPlugType
: 2
I/WebViewFactory(10827): Loading com.google.android.webview version
65.0.3325.109 (code 332510950)
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/cr_LibraryLoader(10827): Time to load native libraries: 1 ms (timestamps
6502-6503)
I/chromium(10827): [INFO:library_loader_hooks.cc(36)] Chromium logging
enabled: level = 0, default verbosity = 0
I/cr_LibraryLoader(10827): Expected native library version number
"65.0.3325.109", actual native library version number "65.0.3325.109"
I/cr_BrowserStartup(10827): Initializing chromium process,
singleProcess=true
I/cr_base (10827): Android Locale: en_US requires .pak files: []
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$7>
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$7>
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$3>
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$3>
D/ConnectivityService( 2315): listenForNetwork for NetworkRequest [
id=2858, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
D/ConnectivityService( 2315): handleRegisterNetworkRequest checking
NetworkAgentInfo [WIFI () - 159]
D/ConnectivityManager.CallbackHandler(10827): CM callback handler got msg
524290
D/ConnectivityService( 2315): apparently satisfied. currentScore=100
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<org.chromium.content.browser.selection.FloatingActionModeCallback>
I/art (10827): Rejecting re-init on previously-failed class
java.lang.Class<org.chromium.content.browser.selection.FloatingActionModeCallback>
D/EgretLoader(10827): EgretLoader(Context context)
D/EgretLoader(10827): The context is not activity
D/ConnectivityService( 2315): listenForNetwork for NetworkRequest [
id=2859, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
D/ConnectivityManager.CallbackHandler(10827): CM callback handler got msg
524290
D/ConnectivityService( 2315): handleRegisterNetworkRequest checking
NetworkAgentInfo [WIFI () - 159]
D/ConnectivityService( 2315): apparently satisfied. currentScore=100
D/Codename One(10827): native focus gain
I/System.out(10827): showKeyboard false
I/SurfaceFlinger( 320): FPS: 35
E/libEGL (10827): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
D/BluetoothManagerService( 2315): Message: 20
D/BluetoothManagerService( 2315): Added callback:
android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@4dc2dc1:true
D/BluetoothAdapter(10827): 877159755: getState() : mService = null.
Returning STATE_OFF
W/ContentCatcher(10827): Failed to notify a WebView
W/AudioCapabilities(10827): Unsupported mime audio/evrc
W/AudioCapabilities(10827): Unsupported mime audio/qcelp
W/VideoCapabilities(10827): Unrecognized profile 2130706433 for video/avc
I/ViewRootImpl(10827): CPU Rendering VSync enable = true
V/WindowManager( 2315): not Base app: Adding window Window{2031e8bb u0
org.tbdlab.socketiotest/org.tbdlab.socketiotest.MyApplicationStub} at 3 of 9
W/AudioCapabilities(10827): Unsupported mime audio/qcelp
W/AudioCapabilities(10827): Unsupported mime audio/evrc
W/VideoCapabilities(10827): Unsupported mime video/mpeg2
W/VideoCapabilities(10827): Unsupported mime video/mpeg2
W/VideoCapabilities(10827): Unsupported mime video/x-ms-wmv
W/VideoCapabilities(10827): Unsupported mime video/divx
W/VideoCapabilities(10827): Unsupported mime video/divx311
W/Utils (10827): could not parse size range '64x64-1920X1088'
W/VideoCapabilities(10827): Unsupported mime video/divx4
W/Utils (10827): could not parse size range '64x64-1920X1080'
I/GoogleInputMethod( 4372): onFinishInput() : Dummy InputConnection bound
I/GoogleInputMethod( 4372): onStartInput() : Dummy InputConnection bound
W/VideoCapabilities(10827): Unsupported mime video/mp4v-esdp
W/cr_CrashFileManager(10827):
/data/data/org.tbdlab.socketiotest/cache/WebView/Crash Reports does not
exist or is not a directory
I/VideoCapabilities(10827): Unsupported profile 4 for video/mp4v-es
W/chromium(10827): [WARNING:render_frame_host_impl.cc(2750)]
OnDidStopLoading was called twice.
V/WLAN_PSA( 381): NL MSG, len[048], NL type[0x11] WNI type[0x5050] len[028]
V/WLAN_PSA( 381): NL MSG, PID: 381
I/SurfaceFlinger( 320): FPS: 40
So I guess the fact that BrowserComponent.execute() calls are all ignored
has something to do with the Rejecting re-init on previously-failed class
java.lang.Class<com.android.webview.chromium... messages but I don't know
how to fix this...
my test device is runing android 5.1.1 with all libs up to date (android
system webview, google play... )
--
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/dbf2ae05-d266-4d73-9c72-e174c620e648%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.