blackberry / BB10-WebWorks-Samples

WebWorks Samples for the BlackBerry 10 Platform
Apache License 2.0
154 stars 438 forks source link

Native Packager exception occurred #196

Closed arasbm closed 10 years ago

arasbm commented 10 years ago

I am trying to build a project using blackberry10 platform for cordova 3.2.0. I think it is using this project internally, so I thought maybe you would have some clue what this error is about.

How can I debug this issue and figure out what is causing the build to fail?

$ cordova build
Generating config.xml from defaults for platform "android"
Preparing android project
Generating config.xml from defaults for platform "blackberry10"
Preparing blackberry10 project
Compiling app on platform "android" via command "/home/zooby/Projects/Email2MobileApps/cordovaBuild/platforms/android/cordova/build" 
Compiling app on platform "blackberry10" via command "/home/zooby/Projects/Email2MobileApps/cordovaBuild/platforms/blackberry10/cordova/build" 
[Error: An error occurred while building the blackberry10 project.[ERROR]   Native Packager exception occurred
[ERROR]   Native Packager exception occurred
An error has occurred
]

I am using Ubuntu Linux with 64bit. I have installed blackberry SDK and momentus IDE and the emulator is running as well. I can compile and run apps directly from the IDE, so I am guessing the above error has to do with my configurations, but I am not sure what is wrong or how to identify it.

timwindsor commented 10 years ago

If you run with the -d option, it will give you some more verbose output that will probably describe the actual error that is happening.

Two things come to mind as likely: Since you were able to add the blackberry10 platform, you've got the main thing done. Have you added the NDK path to your PATH variable, or run the bbndk-env.sh script in your current terminal?

Secondly, I believe that the default Cordova project includes references to some images that don't actually exist. The packager fails to find them and throws an exception. This error would show up with the -d option. Check the config.xml file inside the blackberry10 platform in your project and see if it's referring to some splash screen images that don't exist.

arasbm commented 10 years ago

@timwindsor thanks for that help again. So here is the error I see just before it fails:

[INFO]    [ERROR] MANIFEST.MF: Invalid value 'Secure Email is a powerful and flexible enterprise email encryption that offers real time tracking, large file transfers and compliance services u...' for attribute 'Application-Description'.

[ERROR]   Native Packager exception occurred

Looks like it does not like the app description. Do you know what kind of restrictions are imposed on description?

arasbm commented 10 years ago

Just to update, the issue was in fact in the description text. I am not sure exactly what the limitations on it are, but now it has successfully built after I changed it to a short phrase. Thanks you!

timwindsor commented 10 years ago

@bryanhiggins Is there something we can do to improve error messages with Cordova? Even the detailed message doesn't really say what's wrong with the value in this case.

bryanhiggins commented 10 years ago

@timwindsor The detailed error message comes from the native packager. I'll open up an issue for the fact that it was not displayed without passing in the --verbose flag.