0

I'm deploying a worklight 6.2 application for iphone (ios 7) environment. I managed to enable Application Authenticity for iphone. When Application Authenticity feature is enabled, the direct update feature fails. On the iphone, after I tap on "OK" button when receiving new updates, the application download the update for awhile then show: direct update failed (Direct Update Failure). I all so see this error log in the xcode console:

***014-12-16 19:32:16.487 OnlineBanking[14685:132821] Splash screen image is Default
2014-12-16 19:32:16.487 OnlineBanking[14685:132821] iPhone 5 is detected. Splash image name is: Default-568h
2014-12-16 19:32:18.991 OnlineBanking[14685:133123] [ERROR] [WL_DIRECT_UPDATE] -[WLDirectUpdateDownloader logInvalidUpdateFileData] in WLDirectUpdateDownloader.m:428 :: Invalid update data format: /*-secure-
{"WL-Authentication-Failure":{"wl_authenticityRealm":{"reason":"Invalid gadget request format: \/OnlineBanking\/iphone\/0.1skin=default. Unknown handler path: 0.1"}}}*/QSwcIAAAAAAIAAAAAAAAAUEsDBBQACAgIAIKckEUAAAAAAAAAAAAAAAAgAAAAZGVmYXVsdC9i
b3dlci9hbmd1bGFyL2FuZ3VsYXIuanPMvetaG0fWMPqfq2iI30jCojEkky8jjD3ExgkzPr2GTGZe
zJhGaom2RbfS3TJmbL5n38O+w30le52qalV1S2CPs7+tPMFSnQ+rqtZ5rWyuR39N3ieHwzKb1dGw
yOs0r6NxWVxEZ8VlWm4m+WQ+Tey/8dsqyvJoXExHaQnlLy6KPFrfXNlcX1+J1qO/TLNhmldptMfF
/3oYvd+Kv4t/wMzusBdt39u6twF/vo9+LorJNO1HB/kwjs7rejbYNJ28reKinGCVp9zcIHp2cLSC
/XTH83xYZ0XevczyUXHZj0bFcH4Bg+5H83yUjrM8HfWij505DKKqy2xYd3ZW7PBGaUUzhQbgNyYd
nWdVVJy9TYd1NCuL9xkUiZJoXmfTrL6CiZaYPJoPs3wSQXPn0X5ZQuJFWlXJBMpeZvV5hq2ZOcfR
AaxkkkdnKfwznaajKKlwxabFZTWQbt8nZZR+SC5m0/RZlkOT0W50QV+6HUnv9HawZH1eFpd+2W6n
yNNOP+rQ4D/eu47wn61rSBoXRT86S0qqy/NLo+SseA9jKdOkxsnlsINVneTDNCrG0ituag1FpZ8o
T2CCs2SYxtgCNlSm1Xxa4yqktACX2XQanSfQcOJKjyRzWIyocWkuhvHG0dKWynQ2hQZoNrikNJr3
yXRO7dC0knyEs7TZvI5S4gwXHicrewkrkhc19kVAACOTGebzizMAXaiSlBOCHIBo2jBa7eRdGsv. Restart the application and try again
2014-12-16 19:32:19.020 OnlineBanking[14685:133123] [ERROR] [WL_DIRECT_UPDATE] -[WLDirectUpdateDownloader installUpdate] in WLDirectUpdateDownloader.m:253 :: Invalid format of file /Users/personifyvietnam/Library/Developer/CoreSimulator/Devices/1FBDD906-33B4-431E-A340-68B8BFF8F8FA/data/Containers/Data/Application/5FC1C249-9064-495C-B047-E77713D34F29/Library/tempUpdateFile. Reason is: file length prefix is not found. Reinstall the application and try again.
2014-12-16 19:32:19.030 OnlineBanking[14685:133088] [ERROR] [WL_DIRECT_UPDATE] -[WLDirectUpdatePlugin updateDidFinishWithCommand:status:] in WLDirectUpdatePlugin.m:123 :: Update did finish with error FAILURE_UNKNOWN
2014-12-16 19:32:19.062 OnlineBanking[14685:132821] THREAD WARNING: ['Notification'] took '21.096191' ms. Plugin should use a background thread.
2014-12-16 19:32:19.109 OnlineBanking[14685:132821] [DEBUG] [WL_SPLASH] -[WLSplashView hide] in WLSplashView.m:73 ::*** 

I config security test in authenticationConfig.xml and deploy file .war file to Worklight Server:

<customSecurityTest name="customTests">
            <test realm="wl_antiXSRFRealm" step="1"/>
            <test realm="wl_authenticityRealm" step="1"/>
            <test realm="wl_remoteDisableRealm" step="1"/>
            <test realm="wl_directUpdateRealm" mode="perSession" step="1"/>
            <test realm="wl_anonymousUserRealm" isInternalUserID="true" step="1"/>
            <test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true" step="2"/>
</customSecurityTest>

Then in application-descriptor.xml:

<iphone bundleId="xxxapp.domain.com" version="0.1" applicationId="appId" securityTest="customTests">
        <worklightSettings include="false"/>
        <security>
            <encryptWebResources enabled="false"/>
            <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
        </security>
</iphone>
HoangNguyen
  • 183
  • 2
  • 9
  • Well you tell us - the error says "unknown handler path 0.1" - what's 0.1 in your project? Do you have a "0.1" environment version deployed? Can you provide **reproduction steps**? – Idan Adar Dec 16 '14 at 13:30
  • Did you try to remove and re-install the application as stated in the log? – Idan Adar Dec 16 '14 at 13:49
  • But after deploy file war to worklight server, i remove and re-install app and get this error. – HoangNguyen Dec 16 '14 at 13:52
  • The error is not in Direct Update. The is another error at the top stating that the authenticity check has failed - did you make sure to use the SAME bundleId in application-descriptor.xml as the one you are using in Xocde? Did you use the SAME applicationId as you are using the application's .plist? What happens if you use "1.0" instead of "0.1" in addition to using correct values? Are you making sure to test this in an ACTUAL server? Authenticity will not work in development server. – Idan Adar Dec 16 '14 at 13:56
  • I use the applicationId map from worklight.plist application id, i edit version from 0.1 to 1.0, and i deploy file war to production server, but still get this error – HoangNguyen Dec 16 '14 at 14:20
  • Can you try with a blank app that only does WL.Client.connect and has authenticity enabled? deploy it and then trigger a Direct Update. – Idan Adar Dec 16 '14 at 14:22
  • i create new blank app and trigger Direct Update but get the same error 'unknown handler path: 1.0'. – HoangNguyen Dec 16 '14 at 14:56

1 Answers1

0

What is your Worklight full build number?

I think you should get the latest iFix for Worklight 6.2.0.01 from IBM Fix Central because this same issue "Direct Update not working when authenticity is enabled" was fixed in APAR PI26123.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89