PDA

View Full Version : [FIXED] Signing fails in Mac OS with Sencha CMD 3.0.0.190 (Freshly Generated App)



aarondrabeck
13 Oct 2012, 1:47 PM
Overview: Freshly generated app fails to build native on iOS when "platform" is set to"iOS" in packager.json.

Build production, works perfectly.
Build native to iosSimulator works perfectly.

Steps to reproduce:

sencha --sdk-path /Projects/sencha-touch-2.1.0-rc1/ generate app testApp /Projects/testApp

Edit packager.json
"applicationId":"change to valid appId", (<--Valid cert installed for this app)
"bundleSeedId":"change to valid SeedId",
"platform":"iOS",


sencha --debug app build native


ERROR:

Debug: Move icons to the top levelThe application was successfully packaged
Failed to execute system command while signing application with error 256
Failed to package application


[ERROR] Exception running app build : InternalError: Java constructor for "com.sencha.exceptions.ExBuild" with arguments "string" not found. (<Unknown source>#657)
[ERROR] javax.script.ScriptException: sun.org.mozilla.javascript.internal.JavaScriptException: [object Error] (<Unknown source>#709) in <Unknown source> at line number 709


com.sencha.exceptions.BasicException: javax.script.ScriptException: sun.org.mozilla.javascript.internal.JavaScriptException: [object Error] (<Unknown source>#709) in <Unknown source> at line number 709
at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
at com.sencha.cli.Command.dispatch(Command.java:104)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:184)
at com.sencha.command.Sencha.main(Sencha.java:58)
Caused by: /Users/aarondrabeck/bin/Sencha/Cmd/3.0.0.190/plugins/touch/current/plugin.xml:271: javax.script.ScriptException: sun.org.mozilla.javascript.internal.JavaScriptException: [object Error] (<Unknown source>#709) in <Unknown source> at line number 709
at org.apache.tools.ant.util.ReflectUtil.toBuildException(ReflectUtil.java:183)
at org.apache.tools.ant.util.ReflectUtil.throwBuildException(ReflectUtil.java:166)
at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:110)
at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:350)
at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at com.sencha.ant.AntRunner.run(AntRunner.java:156)
at com.sencha.ant.AntRunner.run(AntRunner.java:72)
at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:62)
at com.sencha.command.BasePluginCommands$BaseNamePathCommand.run(BasePluginCommands.java:102)
at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sencha.cli.Command.dispatch(Command.java:78)
... 4 more
Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.JavaScriptException: [object Error] (<Unknown source>#709) in <Unknown source> at line number 709
at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:153)
at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:167)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)

mitchellsimoens
15 Oct 2012, 5:17 AM
Can you try with the latest releases of ST and Cmd? http://www.sencha.com/forum/announcement.php?f=90&a=36

aarondrabeck
15 Oct 2012, 10:14 AM
The issue is still there. Using a fresh app using RC2 Touch and CMD.


[ERROR] failed running native packager[ERROR] /Projects/testApp/build/native//My Application.app: object file format unrecognized, invalid, or unsuitable
The application was successfully packaged
Failed to execute system command while signing application with error 256
Failed to package application


[ERROR] BUILD FAILED
[ERROR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
[ERROR] /Projects/testApp/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Java constructor for "com.sencha.exceptions.ExBuild" with arguments "string" not found. (<Unknown source>#673) in <Unknown source> at line number 673
[ERROR] at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
[ERROR] at com.sencha.cli.Command.dispatch(Command.java:104)
[ERROR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERROR] at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:184)
[ERROR] at com.sencha.ant.SenchaCommandTask.doExecute(SenchaCommandTask.java:58)
[ERROR] at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:22)
[ERROR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERROR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERROR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERROR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERROR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERROR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERROR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERROR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERROR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERROR] at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERROR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:80)
[ERROR] at com.sencha.command.BasePluginCommands$BaseNamePathCommand.run(BasePluginCommands.java:120)
[ERROR] at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:96)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERROR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERROR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERROR] at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:184)
[ERROR] at com.sencha.command.Sencha.main(Sencha.java:58)
[ERROR] Caused by: /Projects/testApp/.sencha/app/build-impl.xml:126: The following error occurred while executing this line:
[ERROR] /Projects/testApp/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Java constructor for "com.sencha.exceptions.ExBuild" with arguments "string" not found. (<Unknown source>#673) in <Unknown source> at line number 673
[ERROR] at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
[ERROR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
[ERROR] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[ERROR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERROR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERROR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERROR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERROR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERROR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERROR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERROR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERROR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERROR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERROR] at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERROR] at com.sencha.command.ant.AntCommand.execute(AntCommand.java:74)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERROR] ... 31 more
[ERROR] Caused by: /Projects/testApp/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Java constructor for "com.sencha.exceptions.ExBuild" with arguments "string" not found. (<Unknown source>#673) in <Unknown source> at line number 673
[ERROR] at org.apache.tools.ant.util.ReflectUtil.toBuildException(ReflectUtil.java:183)
[ERROR] at org.apache.tools.ant.util.ReflectUtil.throwBuildException(ReflectUtil.java:166)
[ERROR] at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:110)
[ERROR] at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
[ERROR] at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
[ERROR] at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
[ERROR] at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:350)
[ERROR] at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50)
[ERROR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERROR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERROR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERROR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERROR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERROR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERROR] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[ERROR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERROR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[ERROR] ... 52 more
[ERROR] Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Java constructor for "com.sencha.exceptions.ExBuild" with arguments "string" not found. (<Unknown source>#673) in <Unknown source> at line number 673
[ERROR] at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:153)
[ERROR] at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:167)
[ERROR] at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
[ERROR] ... 69 more
[ERROR] Total time: 51 seconds
[ERROR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
/Projects/testApp/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Java constructor for "com.sencha.exceptions.ExBuild" with arguments "string" not found. (<Unknown source>#673) in <Unknown source> at line number 673

dongryphon
15 Oct 2012, 11:14 AM
What version of Sencha Cmd are you using? I believe this was fixed in 3.0.0.201 mentioned in the Sencha Touch 2.1.0 RC2 post.

aarondrabeck
15 Oct 2012, 2:36 PM
The latest test was using .201

dongryphon
15 Oct 2012, 6:43 PM
Can you include the exact command you executed and a complete debug log (maybe zip & attach)?

Something like:



sencha -debug ... > log.txt


Also, what is your current directory and the root directory of your application?

Thanks!

aarondrabeck
16 Oct 2012, 3:55 PM
Attached are the complete results of: sencha --debug app build native > SenchaCmd203nativebuildOSLion.txt

My app path is /Projects/testApp

I have only modified the packer.json after a fresh 'sencha generate app ...' cmd.

Again seems to be a signing issue because it works fine with iOSSimulator mode.

packager.json is the only edited file

{
"applicationName":"My Application",
"applicationId":"com.noncelabs.zvsmobile",
"bundleSeedId":"H5V483GYE3",
"versionString":"1.0",
"versionCode":"1",
"icon": {
"57":"resources/icons/Icon.png",
"72":"resources/icons/Icon~ipad.png",
"114":"resources/icons/Icon@2x.png",
"144":"resources/icons/Icon~ipad@2x.png"
},
"inputPath":"./",
"outputPath":"../build/",
"configuration":"Debug",
"platform":"iOS",
"deviceType":"Universal",
"certificatePath":"/path/to/certificate.file",
"certificateAlias":"",
"sdkPath":"/path/to/android-sdk",
"androidAPILevel":"8",
"permissions":[
"INTERNET",
"ACCESS_NETWORK_STATE",
"CAMERA",
"VIBRATE",
"ACCESS_FINE_LOCATION",
"ACCESS_COARSE_LOCATION",
"CALL_PHONE"],

"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}

aarondrabeck
31 Oct 2012, 9:55 AM
I am still having this problem with CMD .230.

Attached is a full debug log of 'sencha app build native'

dongryphon
31 Oct 2012, 2:37 PM
Thanks for the detailed report! I have opened a ticket in our bug tracker to investigate this.

voloshyn
2 Nov 2012, 10:35 AM
What version of Mac OS X you use?
Do you have Xcode installed? If yes try to run this command before build.

export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"

aarondrabeck
2 Nov 2012, 6:44 PM
That seemed to work. The app is now signed!

Running Latest Mountain Lion with xcode installed.

What was the problem?