0
votes

Migrated our application from 6.2 to 7.0, the mobile web app works great on the phone as well as manually calling the HTTP js adapters. However when exported the apk to a phone, the application starts up but when invoking an adapter for data a 403 error is returned:

{"status":403,"invocationContext":null}

and the only server log:

"POST /SFMobileStudent/authorization/v1/clients/instance HTTP/1.1" 403 64 "-" "WLNativeAPI(bullhead; MMB29Q; Nexus 5X; SDK 23; Android 6.0.1)"

The adapter is doesn't have any security on it either

securityTest="wl_unprotected"

Not sure what we are missing, is there added/required security for 7.0?

Not a whole lot there but you can see the traffic from the device (comcast) to the server. I don't know what any of it means, just sort of repeats. tcpdump packet capture:

removed

LogCat

I/chromium(29279): [INFO:CONSOLE(1082)] "processMessage failed: Message: F09 WLAuthorizationManagerPlugin170261306 {"wlFailureStatus":"UNEXPECTED_ERROR","status":403,"responseText":"\n\n403 Forbidden</title>\n</head>\nForbidden</h1>\n

You don't have permission to access /SFMobileStudent/authorization/v1/clients/instance\non this server.</p>\n


\nIBM_HTTP_Server at mobilet.sfcollege.edu Port 443</address>\n</body></html>\n","statusText":"Unexpected errorCode occurred. Please try again."}", source: file:///android_asset/www/default/worklight/cordova.js (1082)

More logCat

W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 170ms. Plugin should use CordovaInterface.getThreadPool(). D/dalvikvm(11035): GC_EXPLICIT freed 153K, 39% free 8875K/14500K, paused 2ms+3ms, total 49ms I/ConvCursor(11035): ConversationCursor caching complete pos=18 E/ThermalDaemon( 356): set temp 65000 to name /sys/class/hwmon/hwmon0/device/temp1_max E/ThermalDaemon( 356): set temp -128000 to name /sys/class/hwmon/hwmon0/device/temp1_max_hyst D/dalvikvm(11209): Trying to load lib /data/app-lib/com.SFStudent-1/libauthjni.so 0x41d12ef8 D/dalvikvm(11209): Shared lib '/data/app-lib/com.SFStudent-1/libauthjni.so' already loaded in same CL 0x41d12ef8 D/WifiStateMachine( 917): handleMessage: E msg.what=151572 D/WifiStateMachine( 917): processMsg: ConnectedState D/WifiStateMachine( 917): processMsg: L2ConnectedState D/WifiStateMachine( 917): handleMessage: X D/WifiWatchdogStateMachine( 917): Fetch RSSI succeed, rssi=-68 mrssi=-68 txbad=245 txgood=47234 D/WifiWatchdogStateMachine( 917): Incremental loss=0/6 Current loss=0% volume=10.06 D/WifiWatchdogStateMachine( 917): Cache updated: loss[-68]=0% volume=27.82 D/dalvikvm(11209): GC_CONCURRENT freed 2032K, 45% free 8070K/14500K, paused 4ms+2ms, total 57ms D/dalvikvm(11209): WAIT_FOR_CONCURRENT_GC blocked 8ms W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.deleteAllAuthData blocked the main thread for 27ms. Plugin should use CordovaInterface.getThreadPool(). W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 97ms. Plugin should use CordovaInterface.getThreadPool(). D/dalvikvm(11209): Trying to load lib /data/app-lib/com.SFStudent-1/libauthjni.so 0x41d12ef8 D/dalvikvm(11209): Shared lib '/data/app-lib/com.SFStudent-1/libauthjni.so' already loaded in same CL 0x41d12ef8 E/NONE (11209): [/apps/services/api/SFStudent/android/query] failure. state: 403, response: undefined I/chromium(11209): [INFO:CONSOLE(301)] "Error in Error callbackId: WLAuthorizationManagerPlugin1867260175 : ReferenceError: deferred is not defined", source: file:///android_asset/www/default/worklight/cordova.js (301) I/chromium(11209): [INFO:CONSOLE(1080)] "processMessage failed: Error: ReferenceError: deferred is not defined", source: file:///android_asset/www/default/worklight/cordova.js (1080) I/chromium(11209): [INFO:CONSOLE(1081)] "processMessage failed: Stack: ReferenceError: deferred is not defined I/chromium(11209): at Object.InitializeService.WL.Client.invokeProcedure.onFailure (eval at (file:///android_asset/www/default/js/libs/jquery/jquery-min.js:4:14070), :15:8) I/chromium(11209): at Object.options.onFailure (file:///android_asset/www/default/worklight/worklight.js:8806:29) I/chromium(11209): at Object.onInvokeProcedureFailure [as onFailure] (file:///android_asset/www/default/worklight/worklight.js:8718:14) I/chromium(11209): at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onFailure (file:///android_asset/www/default/worklight/worklight.js:3651:26) I/chromium(11209): at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailure (file:///android_asset/www/default/worklight/worklight.js:3600:12) I/chromium(11209): at Object. (file:///android_asset/www/default/worklight/worklight.js:3440:27) I/chromium(11209): at Object. (file:///android_asset/www/default/worklight/wljq.js:1202:33) I/chromium(11209): at fire (file:///android_asset/www/default/worklight/wljq.js:1047:30) I/chromium(11209): at Object.self.fireWith [as rejectWith] (file:///android_asset/www/default/worklight/wljq.js:1158:7) I/chromium(11209): at Object.deferred.(anonymous function) [as reject] (file:///android_asset/www/default/worklight/wljq.js:1247:34)", source: file:///android_asset/www/default/worklight/cordova.js (1081) I/chromium(11209): [INFO:CONSOLE(1082)] "processMessage failed: Message: F09 WLAuthorizationManagerPlugin1867260175 {"wlFailureStatus":"UNEXPECTED_ERROR","status":403,"responseText":"/*-secure-\n{\"reason\":\"App authenticity security check failed\"}*/","statusText":"Unexpected errorCode occurred. Please try again."}", source: file:///android_asset/www/default/worklight/cordova.js (1082)

1
can you update from 6.2 to 7.1Nazmul Hasan
That is surely not the only log available...Idan Adar
We have already committed to updating to 7.0 not 7.1. @IdanAdar Where can I find other logs? The first one is the response from WL.Client.invokeProcedure. The 2nd one is the only output from the server when invoking from the installed application.Zachary Loughridge
The fact that you're getting a 403 makes me wonder exactly what URL it is trying to hit... Are you able to do anything like a Wireshark or tcpdump packet capture on the server, to examine what the actual requests look like? Also, is there a complete LogCat log from the device we could look at (assuming you have signed the APK with a debug key so the LogCat would be produced)?patbarron
The apk was signed with our key, so change it to the default keystore? I am not sure how to find the LogCat, from my reading the device needs to be rooted? I will see if I can get the actual requests from the server.Zachary Loughridge

1 Answers

1
votes

Resolved. There is a new tag within the application-descriptor:

directUpdateAuthenticityPublicKey

Updated, exported the application with the keystore and all now works. Thanks for the help.

The issue: http://www-01.ibm.com/support/docview.wss?uid=swg21970348