Topic
11 replies Latest Post - ‏2012-12-12T23:14:21Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts
ACCEPTED ANSWER

Pinned topic Exception installing native app "Value for key [label] was null"

‏2012-11-16T20:54:09Z |
I'm trying to install a native application into Worklight Server 5 and, after selecting the IPA and getting the "Application Details" screen, where it lists the Package, Internal Version, Commercial Version, Label (say "No Value Set"), Author, etc., I get an error: "A server error was detected" in the UI, and, in the WAS logs I get this exception:

11/16/12 14:49:32:018 EST 0000001c ApplicationSe E {
"id": "89511507-36c1-4748-8938-939d05d03c45",
"message": "MOBILEMGMT0000E: A server error was detected."
}
org.apache.wink.json4j.JSONException: The value for key: label was null. Object required.
at org.apache.wink.json4j.JSONObject.getString(JSONObject.java:1098)
...

Can anyone tell me where the "Label" is supposed to be defined in the native iOS app IPA file? Is it a plist key?

I can't find anything in the docs requiring this. This is NOT a Cordova project, but, a native IPA build. This IPA works on both iPhone4/5 and iPad. It is compiled for test deployment (not in the App Store yet).

Any help GREATLY appreciated!

David
  • rtimothy
    rtimothy
    22 Posts
    ACCEPTED ANSWER

    Re: Exception installing native app "Value for key [label] was null"

    ‏2012-11-16T21:39:49Z  in response to SystemAdmin
    Are you trying to upload the IPA file to Application Center or to the Worklight Server Console?
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Exception installing native app "Value for key [label] was null"

    ‏2012-11-17T12:34:28Z  in response to SystemAdmin
    .ipa files are not meant to be deployed to Worklight Server via Worklight Console (or at all). AFAIK .ipa files are meant to go to the App Store.
    Perhaps David indeeds refers to Application Center (I have no knowledge in regards to AC, though).

    Note that in Worklight 5 there is no support for native applications, so even if you had such an application - without the Worklight API it would not be able to communicate with the Worklight Server, so I don't really see what is the goal here... Would be nice to know.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: Exception installing native app "Value for key [label] was null"

      ‏2012-11-17T17:07:16Z  in response to IdanAdar
      Can you clarify "no support for native"?? That seems to contradict lots of your documentation.

      We'd like to use Worklight FTP deployment, and reporting mechanisms for this particular app. As long as the registers properly, seems it should be able to work.

      And, I was successful on installing the app into WL serverfound theirs missing attribute in the plist, the error message/ui really should be improved.
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Exception installing native app "Value for key [label] was null"

    ‏2012-11-17T17:15:05Z  in response to SystemAdmin
    In IBM Worklight 5.0.0.x, we do not ship the Worklight API for native applications (iOS, Android), so while you can of course develop a native application, there is no API that you can use in your application (so you cannot connect to the Worklight Server, invoke adapters, etc...).
    The Worklight API will return in the upcoming release, v5.0.5.

    Can you elaborate on what you mean by native application? With which documentation for the Worklight-side of things have you developed it?
    How do you connect your application to the Worklight Server?
    Where did you get the plist file from?
    Are you using some old version of the Worklight SDK (as it was called in the past)?

    I feel there are missing pieces of information in this puzzle...

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: Exception installing native app "Value for key [label] was null"

      ‏2012-11-17T20:28:50Z  in response to IdanAdar
      So, the JavaScript API is basically http get/post calls, you're saying a native app can't make these same callsjust like a phonegap app can ?
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Exception installing native app "Value for key [label] was null"

    ‏2012-11-18T05:53:57Z  in response to SystemAdmin
    David,
    Can you please reply to my questions in my previous post? To be able to help you, we need to understand what you have done on your side of things...

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: Exception installing native app "Value for key [label] was null"

      ‏2012-11-18T17:47:04Z  in response to IdanAdar
      This application is a native Xcode app, tring to install in App Center. We also have the same app written for native Android.
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: Exception installing native app "Value for key [label] was null"

      ‏2012-11-19T15:57:53Z  in response to IdanAdar
      > IdanAdar wrote:
      > David,
      > Can you please reply to my questions in my previous post? To be able to help you, we need to understand what you have done on your side of things...
      >
      > Idan Adar
      > QA Engineer
      > IBM Worklight Mobile Platform

      See answers below.

      Can you elaborate on what you mean by native application? With which documentation for the Worklight-side of things have you developed it? How do you connect your application to the Worklight Server?

      This is an application is a Flex mobile application, so, it generates a native XCode app. We have not written the code to connect to the Worklight server yet, this is our next step, but, we wanted to make sure that the server could install the app, which is why we attempted to install it.

      Where did you get the plist file from?
      The plist file is created by our application, do you need a specific plist format/attributes? We have the ones that are required by Apple to create the app, plus some additional ones. I can send it to you if it's relevant.

      Are you using some old version of the Worklight SDK (as it was called in the past)?

      Still investigating how to implement...do you plan on deploying an SDK for use with native apps in 5.0?

      I feel there are missing pieces of information in this puzzle...
      We have not integrated any of the Worklight SDK, but, wish to do so. At minimum, we're primarily interested in just that API that will allow usage of app usage metrics. Also, we want to only allow authenticated users to install the app.

      Thanks,
      David
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Exception installing native app "Value for key [label] was null"

    ‏2012-11-19T17:02:53Z  in response to SystemAdmin
    Okay, then indeed as I have written above - Worklight 5.0.0.x does not come "bundled" with the API required for native applications to connect to the Worklight Server.
    This functionality will be restored and enhanced in the upcoming v5.0.5 release, which should arrive in the coming weeks.

    This is for the Worklight-side of things.
    As for the error your get in regards to installing your current app to Application Center, I will have to defer this question. Hopefully you'll get a reply soon enough.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: Exception installing native app "Value for key [label] was null"

    ‏2012-11-20T16:57:12Z  in response to SystemAdmin
    David,

    "Can anyone tell me where the "Label" is supposed to be defined in the native iOS app IPA file? Is it a plist key? "

    "Label" should be equal to the CFBundleDisplayName key in Info.plist.

    By default, it should be ${PRODUCT_NAME} defined in your project file/ Build Settings / Product Name. Usually this is the target name.

    Could you send us the ipa file so we can debug?

    Thanks,
    Stéphane
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: Exception installing native app "Value for key [label] was null"

      ‏2012-12-12T23:14:21Z  in response to SystemAdmin
      I found it and populated this in the plist and it's installing fine now.