PDA

View Full Version : Build 670 with Cmd 250 is not working on Windows - Not changing working directory



svenna
6 Nov 2012, 11:30 PM
Looks like Architect does not successfully change directory before running the sencha command.
And the commands seems to be run in one line, in stead of two.

To the directory is never changed. sencha is run with full path, but the PackageSettings.json is not found. The file is the correct folder, and the cmd does find the file when run manually from the correct dirctory.



C:\Program Files (x86)\SenchaArchitect>cd "E:/htdocs/ecosupport/EcoInteractive/" C:\Program Files (x86)\SenchaArchitect>sencha package build PackageSettings.json Sencha Cmd v3.0.0.250 [ERR] Can not open configuration file [ERR] stbuild exited with non-zero code : 3


When run manually I get the following error:


E:\htdocs\ecosupport\EcoInteractive>sencha package build PackageSettings.json
Sencha Cmd v3.0.0.250
[ERR]

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'std::runtime_error'
what(): Type is not convertible to string

[ERR] stbuild exited with non-zero code : 3

E:\htdocs\ecosupport\EcoInteractive>

Phil.Strong
7 Nov 2012, 2:19 PM
It should be executing a bat file ...

the patch release you get next will actually open cmd.exe window and stop trying to open a silly dialog window.

http://cl.ly/image/1l0G0v3W2K38

ali.hamza
12 Nov 2012, 5:37 AM
why not run it from command prompt directly by using packager.json generated by sencha cmd.

thejonz
13 Nov 2012, 5:54 PM
I'm getting the same error even when I'm running from the command line. This is my first time trying to make a native Android app so I'm not sure if I'm doing something wrong or not. Here is the output from the console...

C:\inetpub\wwwroot\RDP\Mobile\helloDroid>sencha package build packager.json
Sencha Cmd v3.0.0.250
[ERR]


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'std::runtime_error'
what(): Type is not convertible to string


[ERR] stbuild exited with non-zero code : 3


C:\inetpub\wwwroot\RDP\Mobile\helloDroid>

Any help would be GREATLY appreciated!

svenna
14 Nov 2012, 12:44 AM
I have the same problem, but it's working when I run "sencha app build native"

thejonz
14 Nov 2012, 9:17 AM
I didn't know about this commandline command, thanks for the info! When I use it I still get an error but at least it's more descriptive. Anyone have any idea how to fix? I created a super simple Sencha Touch app using Sencha Architect that literally just has a container and a toolbar (want to get proof of concept working before I attempted to do my real app).

Here is my packager.json - is anything sticking out as being wrong?
{
"applicationName": "helloDroid",
"applicationId": "com.resortdata.helloDroid",
"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": "AndroidEmulator",
"deviceType": "Universal",
"certificatePath": "C:/Users/Jonathan/helloDroid.keystore",
"certificateAlias": "helloDroid",
"certificatePassword": "{OMITTED}",
"sdkPath": "C:/bin/adt-bundle-windows/sdk",
"androidAPILevel": "8",
"permissions": [
"INTERNET",
"ACCESS_NETWORK_STATE",
"CAMERA",
"VIBRATE",
"ACCESS_FINE_LOCATION",
"ACCESS_COARSE_LOCATION",
"CALL_PHONE"
],
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}

below is the descriptive error message.

thanks a lot for your help!


[ERR] failed running native packager
[ERR]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'std::runtime_error'
what(): Type is not convertible to string


[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
[ERR] C:\inetpub\wwwroot\RDP\Mobile\helloDroid\.sencha\app\build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (<Unknown source>#673) in <Unknown source> at line number 673
[ERR] at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:104)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:182)
[ERR] at com.sencha.ant.SenchaCommandTask.doExecute(SenchaCommandTask.java:58)
[ERR] at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:22)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:87)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:91)
[ERR] at com.sencha.command.BasePluginCommands$BaseNamePathCommand.run(BasePluginCommands.java:135)
[ERR] at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:106)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.command.Sencha.main(Sencha.java:71)
[ERR] Caused by: C:\inetpub\wwwroot\RDP\Mobile\helloDroid\.sencha\app\build-impl.xml:126: The following error occurred while executing this line:
[ERR] C:\inetpub\wwwroot\RDP\Mobile\helloDroid\.sencha\app\build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (<Unknown source>#673) in <Unknown source> at line number 673
[ERR] at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
[ERR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
[ERR] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERR] at com.sencha.command.ant.AntCommand.execute(AntCommand.java:75)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] ... 31 more
[ERR] Caused by: C:\inetpub\wwwroot\RDP\Mobile\helloDroid\.sencha\app\build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (<Unknown source>#673) in <Unknown source> at line number 673
[ERR] at org.apache.tools.ant.util.ReflectUtil.toBuildException(ReflectUtil.java:183)
[ERR] at org.apache.tools.ant.util.ReflectUtil.throwBuildException(ReflectUtil.java:166)
[ERR] at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:110)
[ERR] at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
[ERR] at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
[ERR] at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
[ERR] at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:350)
[ERR] at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[ERR] ... 52 more
[ERR] Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (<Unknown source>#673) in <Unknown source> at line number 673
[ERR] at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
[ERR] at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
[ERR] at javax.script.AbstractScriptEngine.eval(Unknown Source)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
[ERR] ... 69 more
[ERR] Caused by: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (<Unknown source>#673)
[ERR] at sun.org.mozilla.javascript.internal.Context.throwAsScriptRuntimeEx(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.MemberBox.invoke(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.NativeJavaMethod.call(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.Interpreter.interpret(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.InterpretedFunction.call(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(Unknown Source)
[ERR] at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(Unknown Source)
[ERR] at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.I
[ERR] nterpretedFunction.exec(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.Context.evaluateReader(Unknown Source)
[ERR] ... 77 more
[ERR] Caused by: com.sencha.exceptions.ExBuild: failed running native packager
[ERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[ERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
[ERR] at java.lang.reflect.Constructor.newInstance(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.MemberBox.newInstance(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.NativeJavaClass.constructSpecific(Unknown Source)
[ERR] at sun.org.mozilla.javascript.internal.NativeJavaClass.construct(Unknown Source)
[ERR] ... 86 more
[ERR] Total time: 20 seconds
[ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
C:\inetpub\wwwroot\RDP\Mobile\helloDroid\.sencha\app\build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.ExBuild: failed running native packager (<Unknown source>#673) in <Unknown source> at line number 673

mnask79
19 Nov 2012, 6:44 AM
i have the same problem , how to fix it please ?

Phil.Strong
19 Nov 2012, 8:57 AM
I have a suspicion is because of the last slash (/) in the cd command.

I've updated the script to not have an ending slash as some combination of path and windows version doesn't like this.

mnask79
19 Nov 2012, 10:10 AM
how to get updated version ?

Phil.Strong
19 Nov 2012, 10:50 AM
It's not released yet. It's likely this fix will come until 2.2 which is fast approaching.

infoprogetti
20 Nov 2012, 2:23 AM
Hi,
I have the same problem when trying to build an apk.
When I run Sencha Cmd Setup, in the Setup Project and I point the framework to the sencha-touch-2.1.0 directory I have the following response from prompt.
http://s9.postimage.org/ouqhe5qq3/screen_02.jpg (http://postimage.org/image/ouqhe5qq3/)
T (http://postimage.org/image/ouqhe5qq3/)he cd command cannot change directory to another drive and consequently the sencha command fails.
I know that exists an option in cd that can change drive and directory in one step: /D, so the command should be:

cd /D "Y:/path/to/project/"
Is it possible to implement this or we must wait the 2.2 release?

Thank you in advance,
Mauro

kramprabhu
20 Nov 2012, 10:17 AM
Just started using 2.1 Sencha architect. Good to see build options and packager file configuration settings there..
But how to make .apk file there..
WHen I click Build something happening.. but now sure what...

When I tried via command prompt to create .apk file.. then I get this error



D:\sencha\test2>sencha package build packager.json
Sencha Cmd v3.0.0.230
[ERROR]


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


[ERROR] stbuild exited with non-zero code : 3


Please help

Phil.Strong
21 Nov 2012, 11:28 AM
We have an issue where we were saving versionCode as an integer when in reality it needs to be a string. Check this in your packager.json

Phil.Strong
21 Nov 2012, 11:30 AM
Is it possible to implement this or we must wait the 2.2 release?

Yeah no releases until then. Argh this is not good.

Workaround is simply to create your own script to do this. There's nothing magical going on here.

I'll add this

kramprabhu
21 Nov 2012, 10:14 PM
Yes you are right. converting "versionCode": 1 => "versionCode": "1" works.

Phil.Strong
30 Nov 2012, 1:59 PM
working directory change using /D will be part of the 2.2 release

wsydney
2 Dec 2012, 7:37 AM
Don't know if this was discussed before:

Sencha cmd (..build native) ran into an error when being installed in a directory containing blanks, like c:\Programme (x86).

Reinstalling in c:\SenchaCmd helped.