Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to register client #47

Open
tarasklimenko opened this issue Jul 21, 2015 · 0 comments
Open

Failing to register client #47

tarasklimenko opened this issue Jul 21, 2015 · 0 comments
Assignees
Labels

Comments

@tarasklimenko
Copy link

Description:

With the MobileFirst upgrade, a new issue has been introduced with the WL SDK. When launching the sample application (Worklight KitchenSink) the app fails to register the client attempting to reach OAuth API.

I have found that the SDK is working successfully when running on the Worklight Console after it's deployed on the WL server. It seems like the sample app running on the device is unable to reach the adapters properly.

Worklight 6.3 

At App Launch: 

07-15 16:11:21.872: D/NONE(14294): addDeviceIDHeader deviceIDSuccessCallback
07-15 16:11:21.882: D/NONE(14294): connectOnStartup finalizeInit
07-15 16:11:21.882: D/NONE(14294): before: initOptions.onSuccess
07-15 16:11:21.892: D/NONE(14294): establishSSLClientAuth
07-15 16:11:21.892: D/NONE(14294): after: initOptions.onSuccess
07-15 16:11:21.902: D/NONE(14294): added onPause and onResume event handlers
07-15 16:11:21.902: D/NONE(14294): wlclient init success
07-15 16:11:21.902: D/NONE(14294): establishSSLClientAuth isCertificateExists:  false
07-15 16:11:21.902: D/NONE(14294): Request [/apps/services/api/ATTWLKitchenSink/android/init]
07-15 16:11:21.902: D/WL_DIRECT_UPDATE_MANAGER(14294): skinLoaderChecksum does not exists.
07-15 16:11:21.912: D/NONE(14294): Client registration failed with error: {"invocationContext":null}
07-15 16:11:21.912: D/NONE(14294): Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"2493766496","skinName":"default","skinChecksum":343750851}}

At GetAds: 

07-15 16:12:11.492: D/ViewRootImpl(14294): ViewPostImeInputStage ACTION_DOWN
07-15 16:12:11.602: I/LoadedApk(14294): getClassLoader :dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.ATTWLKitchenSink-2/base.apk"],nativeLibraryDirectories=[/data/app/com.ATTWLKitchenSink-2/lib/arm64, /vendor/lib64, /system/lib64]]]
07-15 16:12:11.612: I/LoadedApk(14294): getClassLoader :dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.ATTWLKitchenSink-2/base.apk"],nativeLibraryDirectories=[/data/app/com.ATTWLKitchenSink-2/lib/arm64, /vendor/lib64, /system/lib64]]]
07-15 16:12:11.612: D/PhoneWindow(14294): *FMB* installDecor mIsFloating : true
07-15 16:12:11.612: D/PhoneWindow(14294): *FMB* installDecor flags : 8388610
07-15 16:12:11.622: I/LoadedApk(14294): getClassLoader :dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.ATTWLKitchenSink-2/base.apk"],nativeLibraryDirectories=[/data/app/com.ATTWLKitchenSink-2/lib/arm64, /vendor/lib64, /system/lib64]]]
07-15 16:12:11.622: I/LoadedApk(14294): getClassLoader :dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.ATTWLKitchenSink-2/base.apk"],nativeLibraryDirectories=[/data/app/com.ATTWLKitchenSink-2/lib/arm64, /vendor/lib64, /system/lib64]]]
07-15 16:12:11.622: I/LoadedApk(14294): getClassLoader :dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.ATTWLKitchenSink-2/base.apk"],nativeLibraryDirectories=[/data/app/com.ATTWLKitchenSink-2/lib/arm64, /vendor/lib64, /system/lib64]]]
07-15 16:12:11.622: I/LoadedApk(14294): getClassLoader :dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.ATTWLKitchenSink-2/base.apk"],nativeLibraryDirectories=[/data/app/com.ATTWLKitchenSink-2/lib/arm64, /vendor/lib64, /system/lib64]]]
07-15 16:12:11.622: I/LoadedApk(14294): getClassLoader :dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.ATTWLKitchenSink-2/base.apk"],nativeLibraryDirectories=[/data/app/com.ATTWLKitchenSink-2/lib/arm64, /vendor/lib64, /system/lib64]]]
07-15 16:12:11.632: D/InputTransport(14294): Input channel constructed: name='22ddb01f com.ATTWLKitchenSink/com.ATTWLKitchenSink.ATTWLKitchenSink (client)', fd=109
07-15 16:12:11.632: D/PhoneWindow(14294): *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
07-15 16:12:11.632: D/PhoneWindow(14294): *FMB* isFloatingMenuEnabled return false
07-15 16:12:11.662: D/ViewRootImpl(14294): MSG_WINDOW_FOCUS_CHANGED 1
07-15 16:12:11.672: D/NONE(14294): establishSSLClientAuth
07-15 16:12:11.742: D/ViewRootImpl(14294): MSG_WINDOW_FOCUS_CHANGED 0
07-15 16:12:11.742: V/InputMethodManager(14294): focusOut: org.apache.cordova.CordovaWebView{24da4030 VFEDH.C. .F....I. 0,0-360,615 #64} mServedView=org.apache.cordova.CordovaWebView{24da4030 VFEDH.C. .F....I. 0,0-360,615 #64} winFocus=false
07-15 16:12:12.002: D/ResourcesManager(14294): forcing to update resources ? false
07-15 16:12:12.012: D/wl.userAuthManager(14294): WLUserAuthManager.doesValidCertificateExist in WLUserAuthManager.java:129 :: doesValidCertificateExists = false
07-15 16:12:12.012: D/NONE(14294): establishSSLClientAuth isCertificateExists:  false
07-15 16:12:12.062: D/NONE(14294): Request [/apps/services/api/ATTWLKitchenSink/android/query]
07-15 16:12:12.102: D/WL_DIRECT_UPDATE_MANAGER(14294): skinLoaderChecksum does not exists.
07-15 16:12:12.132: D/NONE(14294): Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"2493766496","skinName":"default","skinChecksum":343750851}}
07-15 16:12:12.162: D/PluginManager(14294): exec() call to unknown plugin: WLAuthorizationManagerPlugin
07-15 16:12:12.202: D/PluginManager(14294): exec() call to unknown plugin: WLAuthorizationManagerPlugin
07-15 16:12:12.232: D/PluginManager(14294): exec() call to unknown plugin: WLAuthorizationManagerPlugin
07-15 16:12:12.272: D/NONE(14294): Client registration failed with error: {"invocationContext":null}
07-15 16:12:12.312: D/CordovaLog(14294): file:///android_asset/www/default/worklight/cordova.js: Line 1061 : processMessage failed: Error: TypeError: Cannot read property 'WL-Authentication-Success' of undefined
07-15 16:12:12.312: I/chromium(14294): [INFO:CONSOLE(1061)] "processMessage failed: Error: TypeError: Cannot read property 'WL-Authentication-Success' of undefined", source: file:///android_asset/www/default/worklight/cordova.js (1061)
07-15 16:12:12.332: D/CordovaLog(14294): file:///android_asset/www/default/worklight/cordova.js: Line 1062 : processMessage failed: Stack: TypeError: Cannot read property 'WL-Authentication-Success' of undefined
07-15 16:12:12.332: D/CordovaLog(14294):     at klass.WL.Response.WLJSX.Class.create.getHeader (file:///android_asset/www/default/worklight/worklight.js:3202:30)
07-15 16:12:12.332: D/CordovaLog(14294):     at checkResponseForChallenges (file:///android_asset/www/default/worklight/worklight.js:9134:32)
07-15 16:12:12.332: D/CordovaLog(14294):     at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailure (file:///android_asset/www/default/worklight/worklight.js:3593:40)
07-15 16:12:12.332: D/CordovaLog(14294):     at Object.<anonymous> (file:///android_asset/www/default/worklight/worklight.js:3433:27)
07-15 16:12:12.332: D/CordovaLog(14294):     at Object.<anonymous> (file:///android_asset/www/default/worklight/wljq.js:1202:33)
07-15 16:12:12.332: D/CordovaLog(14294):     at fire (file:///android_asset/www/default/worklight/wljq.js:1047:30)
07-15 16:12:12.332: D/CordovaLog(14294):     at Object.self.fireWith [as rejectWith] (file:///android_asset/www/default/worklight/wljq.js:1158:7)
07-15 16:12:12.332: D/CordovaLog(14294):     at Object.deferred.(anonymous function) [as reject] (file:///android_asset/www/default/worklight/wljq.js:1247:34)
07-15 16:12:12.332: D/CordovaLog(14294):     at Object.<anonymous> (file:///android_asset/www/default/worklight/worklight.js:18359:10)
07-15 16:12:12.332: D/CordovaLog(14294):     at Object.<anonymous> (file:///android_asset/www/default/worklight/wljq.js:1202:33)
07-15 16:12:12.332: I/chromium(14294): [INFO:CONSOLE(1062)] "processMessage failed: Stack: TypeError: Cannot read property 'WL-Authentication-Success' of undefined
07-15 16:12:12.332: I/chromium(14294):     at klass.WL.Response.WLJSX.Class.create.getHeader (file:///android_asset/www/default/worklight/worklight.js:3202:30)
07-15 16:12:12.332: I/chromium(14294):     at checkResponseForChallenges (file:///android_asset/www/default/worklight/worklight.js:9134:32)
07-15 16:12:12.332: I/chromium(14294):     at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailure (file:///android_asset/www/default/worklight/worklight.js:3593:40)
07-15 16:12:12.332: I/chromium(14294):     at Object.<anonymous> (file:///android_asset/www/default/worklight/worklight.js:3433:27)
07-15 16:12:12.332: I/chromium(14294):     at Object.<anonymous> (file:///android_asset/www/default/worklight/wljq.js:1202:33)
07-15 16:12:12.332: I/chromium(14294):     at fire (file:///android_asset/www/default/worklight/wljq.js:1047:30)
07-15 16:12:12.332: I/chromium(14294):     at Object.self.fireWith [as rejectWith] (file:///android_asset/www/default/worklight/wljq.js:1158:7)
07-15 16:12:12.332: I/chromium(14294):     at Object.deferred.(anonymous function) [as reject] (file:///android_asset/www/default/worklight/wljq.js:1247:34)
07-15 16:12:12.332: I/chromium(14294):     at Object.<anonymous> (file:///android_asset/www/default/worklight/worklight.js:18359:10)
07-15 16:12:12.332: I/chromium(14294):     at Object.<anonymous> (file:///android_asset/www/default/worklight/wljq.js:1202:33)", source: file:///android_asset/www/default/worklight/cordova.js (1062)
07-15 16:12:12.332: D/CordovaLog(14294): file:///android_asset/www/default/worklight/cordova.js: Line 1063 : processMessage failed: Message: F02 WLAuthorizationManagerPlugin1574843194 sClass not found
07-15 16:12:12.332: I/chromium(14294): [INFO:CONSOLE(1063)] "processMessage failed: Message: F02 WLAuthorizationManagerPlugin1574843194 sClass not found", source: file:///android_asset/www/default/worklight/cordova.js (1063)

Expected:

It's expected that the App will get oauth token and call APIs successfully

Actual:

Failing to get an access token from OAuth API.

Client registration failed with error: {"invocationContext":null}

Reproduction Steps:

  1. Deploy WL Adapters from 'ATTWLAdapterProject'
  2. Configure worklight.properties with App Key & Secret
  3. Build All Environments on 'ATTWLApplicaitonProject'
  4. Run 'ATTWLApplicationProject' on MobileFirst Dev. Server
  5. Run 'ATTWLApplicationProjectATTWLKitchenSinkAndroid' on Android Device
  6. The KitchenSink Sample is launched on Android Device
  7. Notice sample fails to call APIs successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants