Skip to content

Crashes while getting dojo/dojox and dojo/util modules. #20

Open
haddow777 opened this Issue Mar 25, 2013 · 8 comments

5 participants

@haddow777

I really like CPM and I have used it in the past. For some reason though, it now crashes when trying to load some of dojo's software.

For instance, it says that the util library for dojo doesn't exist. I'm not sure why it would say this as it comes with the dojo source. It's directory is right along side the dojo and dijit directories, both of which installed fine.

The dojox package failed to install as well, but for a different reason. It seems to work for a while then blows up with some massive errors revolving around an exception created by an unexpected end of ZLIB input stream. I will put the output below.

I'm not sure if this is totally a problem with CPM or not, but it would seem like either it is or dojo isn't supporting CPM.

cpm install dojox
Installing dojox
Downloading http://packages.dojofoundation.org/dojox
Downloading http://packages.dojofoundation.org/archives/https$3A$2F$2Fgithub.com$2Fdojo$2Fdojox$2Fzipball$2F1.8.3
Unzipping http://packages.dojofoundation.org/archives/https$3A$2F$2Fgithub.com$2Fdojo$2Fdojox$2Fzipball$2F1.8.3
org.mozilla.javascript.WrappedException: Wrapped java.io.EOFException: Unexpected end of ZLIB input stream (/usr/local/lib/cpm/lib/cpm-utils/unzip.js#15)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1782)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1688)
at script(/usr/local/lib/cpm/lib/cpm-utils/unzip.js:15)
at script(/usr/local/lib/cpm/lib/cpm.js:290)
at script.notify(/usr/local/lib/cpm/lib/cpm-utils/promise.js:147)
at script(/usr/local/lib/cpm/lib/cpm-utils/promise.js:210)
at script.perform(/usr/local/lib/cpm/lib/cpm-utils/promise.js:253)
at script(/usr/local/lib/cpm/lib/cpm.js:213)
at script.notify(/usr/local/lib/cpm/lib/cpm-utils/promise.js:147)
at script(/usr/local/lib/cpm/lib/cpm-utils/promise.js:210)
at script.perform(/usr/local/lib/cpm/lib/cpm-utils/promise.js:253)
at script.installPackage(/usr/local/lib/cpm/lib/cpm.js:207)
at script.main(/usr/local/lib/cpm/lib/cpm.js:117)
at script(/usr/local/lib/cpm/lib/cpm.js:415)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3130)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:563)
at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:485)
at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:451)
at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:443)
at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:196)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117)
at org.mozilla.javascript.Context.call(Context.java:522)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:535)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:163)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
... 17 more
org.mozilla.javascript.WrappedException: Wrapped java.io.EOFException: Unexpected end of ZLIB input stream (/usr/local/lib/cpm/lib/cpm-utils/unzip.js#15)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1782)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1688)
at script(/usr/local/lib/cpm/lib/cpm-utils/unzip.js:15)
at script(/usr/local/lib/cpm/lib/cpm.js:290)
at script.notify(/usr/local/lib/cpm/lib/cpm-utils/promise.js:147)
at script(/usr/local/lib/cpm/lib/cpm-utils/promise.js:210)
at script.perform(/usr/local/lib/cpm/lib/cpm-utils/promise.js:253)
at script(/usr/local/lib/cpm/lib/cpm.js:213)
at script.notify(/usr/local/lib/cpm/lib/cpm-utils/promise.js:147)
at script(/usr/local/lib/cpm/lib/cpm-utils/promise.js:210)
at script.perform(/usr/local/lib/cpm/lib/cpm-utils/promise.js:253)
at script.installPackage(/usr/local/lib/cpm/lib/cpm.js:207)
at script.main(/usr/local/lib/cpm/lib/cpm.js:117)
at script(/usr/local/lib/cpm/lib/cpm.js:415)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3130)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:563)
at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:485)
at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:451)
at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:443)
at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:196)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117)
at org.mozilla.javascript.Context.call(Context.java:522)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:535)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:163)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
... 17 more
org.mozilla.javascript.WrappedException: Wrapped java.io.EOFException: Unexpected end of ZLIB input stream (/usr/local/lib/cpm/lib/cpm-utils/unzip.js#15)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1782)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1688)
at script(/usr/local/lib/cpm/lib/cpm-utils/unzip.js:15)
at script(/usr/local/lib/cpm/lib/cpm.js:290)
at script.notify(/usr/local/lib/cpm/lib/cpm-utils/promise.js:147)
at script(/usr/local/lib/cpm/lib/cpm-utils/promise.js:210)
at script.perform(/usr/local/lib/cpm/lib/cpm-utils/promise.js:253)
at script(/usr/local/lib/cpm/lib/cpm.js:213)
at script.notify(/usr/local/lib/cpm/lib/cpm-utils/promise.js:147)
at script(/usr/local/lib/cpm/lib/cpm-utils/promise.js:210)
at script.perform(/usr/local/lib/cpm/lib/cpm-utils/promise.js:253)
at script.installPackage(/usr/local/lib/cpm/lib/cpm.js:207)
at script.main(/usr/local/lib/cpm/lib/cpm.js:117)
at script(/usr/local/lib/cpm/lib/cpm.js:415)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3130)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:563)
at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:485)
at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:451)
at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:443)
at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:196)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117)
at org.mozilla.javascript.Context.call(Context.java:522)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:535)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:163)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
... 17 more
org.mozilla.javascript.WrappedException: Wrapped java.io.EOFException: Unexpected end of ZLIB input stream (/usr/local/lib/cpm/lib/cpm-utils/unzip.js#15)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1782)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1688)
at script(/usr/local/lib/cpm/lib/cpm-utils/unzip.js:15)
at script(/usr/local/lib/cpm/lib/cpm.js:290)
at script.notify(/usr/local/lib/cpm/lib/cpm-utils/promise.js:147)
at script(/usr/local/lib/cpm/lib/cpm-utils/promise.js:210)
at script.perform(/usr/local/lib/cpm/lib/cpm-utils/promise.js:253)
at script(/usr/local/lib/cpm/lib/cpm.js:213)
at script.notify(/usr/local/lib/cpm/lib/cpm-utils/promise.js:147)
at script(/usr/local/lib/cpm/lib/cpm-utils/promise.js:210)
at script.perform(/usr/local/lib/cpm/lib/cpm-utils/promise.js:253)
at script.installPackage(/usr/local/lib/cpm/lib/cpm.js:207)
at script.main(/usr/local/lib/cpm/lib/cpm.js:117)
at script(/usr/local/lib/cpm/lib/cpm.js:415)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3130)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:563)
at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:485)
at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:451)
at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:443)
at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:196)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117)
at org.mozilla.javascript.Context.call(Context.java:522)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:535)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:163)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
... 17 more
js: "/usr/local/lib/cpm/lib/cpm-utils/promise.js", line 192: exception from uncaught JavaScript throw: JavaException: java.io.EOFException: Unexpected end of ZLIB input stream
at /usr/local/lib/cpm/lib/cpm-utils/promise.js:192
at /usr/local/lib/cpm/lib/cpm-utils/promise.js:266 (perform)
at /usr/local/lib/cpm/lib/cpm.js:207 (installPackage)
at /usr/local/lib/cpm/lib/cpm.js:117 (main)
at /usr/local/lib/cpm/lib/cpm.js:415

jordan@jordan-genav-linux:~/Desktop/Development/packages$

@psoares
psoares commented May 8, 2013

Same problem here... using MacOSX 10.8.3

@psoares
psoares commented Aug 5, 2013

FYI, I managed to upgrade dojox by using nodejs instead of rhino.
I just had to create a ~/.cpm.conf file with CPM_USE_NODE=1 in it.

@psoares
psoares commented Aug 6, 2013

That didn't come without its issues too... The downloaded zip file is incomplete. This is the list of files I get :

LICENSE calc cometd dojox.profile.js encoding gauges grid image.js lang mobile.js
NodeList calendar cometd.js drawing flash geo help io layout
analytics charting css3 drawing.js flash.js gesture highlight jq main.js
analytics.js collections data dtl form gfx highlight.js jq.js math
app collections.js date dtl.js fx gfx.js html json math.js
atom color dgauges editor fx.js gfx3d html.js jsonPath mdnd
av color.js dnd embed gantt gfx3d.js image jsonPath.js mobile

@ben-cooling

Looks like the file at http://packages.dojofoundation.org/archives/https$3A$2F$2Fgithub.com$2Fdojo$2Fdojox$2Fzipball$2F1.9.1 is invalid, even when downloaded through a browser. So not a CPM issue?

@faroe228

Dec 12 2013

cpm install works fine for dgrid, dijit but chokes on dojox.

I verified the zip at url:

http://packages.dojofoundation.org/archives/https$3A$2F$2Fgithub.com$2Fdojo$2Fdojox$2Fzipball$2F1.9.2

is corrupt when downloaded with a browser ... so not a CPM issue?

@faroe228

Dec 12 2013

Update ...

Looks like you can't use the java based cpm to install dojox. When I changed the cpm.bat file to use node instead of java the install worked. What is still puzzling is the "zipball" archive at:

http://packages.dojofoundation.org/archives/https$3A$2F$2Fgithub.com$2Fdojo$2Fdojox$2Fzipball$2F1.9.2

when downloaded manually with a browser or ANT or wget (or some other means) is a corrupt zip file (I tried multiple apps and unzip tools and they all failed). I wonder what kind of dojox zipball archive is created that only a node based CPM app can unpack???

Update Dec 13 2013 ...

The corrupt zip archive can be repaired with the zip -FF option. It would be nice if the mechanism to create the dojox zip ball could repair the corrupted zip file it generates or cpm.js could handle the corrupt zip file by repairing it.

@faroe228

cpm install dojox issue solved:

see:

faroe228@7f6f228

@jgroffen

I used faroe228's patch to solve this for me, but it would be good to get a more permanent solution in to cpm. I could have a go at kriszyp's suggestion in faroe228@7f6f228 and provide a patch if it was likely to be accepted. Would it be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.