Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Apps created using 'derby new appname' dont work #170

Closed
VanCoding opened this Issue · 12 comments

5 participants

@VanCoding

I've created a derby app using 'derby new test' and tried to run it but got an error after requesting...

Details here:
http://stackoverflow.com/questions/13475899/derby-app-created-using-derby-new-test-not-working

@mattbrun

Hello,
I tried to repeat your steps and I got no error.
If I didn't undertood wrong the reported error stack, it seems you don't have write permission on the filesystem... may you check that?

@VanCoding

Strange.. I'm logged on as root.
I deleted the app folder completely and recreated the app using the command mentioned above, but still the same thing.

Maybe reinstall derby?
How to remove it completely?

I'm running it on debian btw...

Update
I've now deleted every folder that had something to do with derby. I searched for them using find / -name derby
And cleared the complete npm cache and then reinstalled derby using npm install -g derby.

Still same thing...

Maybe I should try it with a virtual machine again...

@mattbrun

Hmm, strange!
I'm running Ubuntu and I'm logged without root privileges. Did you tried withou root? Just in case ;)

Some thought:

  • Looking at the zlib code, it seems that the connection between client and server ended. Am I wrong?
  • Searching with uncle google, it may be related to Express. Which version do you have? For my derby apps I removed the strict requirement of version "3.0.0beta4", and I now use 3.0.3.
  • Any other thought?
@VanCoding

I tried as another user that has the required permissions and had the same problem,

I've also set the version of gzippo to exactly 0.1.7 and that of express to 3.0.3 and executed "npm install" to apply it.
Still the same..

I then commented out 3 lines in lib/server/index.js:

 //.use(express.favicon())
 // Gzip static files and serve from memory
 //.use(gzippo.staticGzip(publicPath, {maxAge: ONE_YEAR}))
 // Gzip dynamically rendered content
 //.use(express.compress())

Now, I can see the demo page at the first page load, the loading does not finish tough and I still get the same error in the console. It's very strange.

Are derby apps completely self containing? Should I be able to copy the wohle folder to another machine that has installed node and run it?

If yes, I'll try it out on another machine. If it works, there's something wrong with my setup, if not, the app generation is different on my machine..

@switz
@lefnire
@switz
@switz
@VanCoding

I've swapped those two lines. No success. I'm currently trying on another machine, I'll let you know about the result :)
Thanks for your help!!

I still think the problem doesn't sit in express or gzippo. I think the first exception closes the connection which forces the second exception...

Update

When I just comment the following lines:

//.use(express.favicon())  
// Gzip dynamically rendered content
//.use(express.compress())
// Gzip static files and serve from memory
.use(express.static(publicPath))

I get this:

Error: Model mutation performed after bundling for clientId: 02de2cf2-e06e-47b7-a44b-e167bf0125b6
at Model.errorOnCommit [as _commit] (/derby/test/node_modules/derby/node_modules/racer/lib/bundle/bundle.Model.js:64:9)
at /derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:120:15
at next (/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at /derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:107:16
at next (/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at /derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:101:16
at next (/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at /derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:92:16
at next (/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at Object.run (/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:10:12)
ALREADY UNREGISTERED SERVER MODEL
Trace
at /derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:148:19
at Object.Promise.on (/derby/test/node_modules/derby/node_modules/racer/lib/util/Promise.js:29:7)
at EventEmitter.module.exports.events.bundle (/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:138:26)
at EventEmitter.emit (events.js:123:20)
at Model.Klass.mixinEmit (/derby/test/node_modules/derby/node_modules/racer/lib/plugin.js:82:21)
at Model.mixin.server.bundle (/derby/test/node_modules/derby/node_modules/racer/lib/bundle/bundle.Model.js:36:12)
at Object.View._render (/derby/test/node_modules/derby/lib/View.server.js:352:9)
at /derby/test/node_modules/derby/lib/View.server.js:276:10
at Array.2 (/derby/test/node_modules/derby/lib/View.server.js:300:5)
at Object.Promise.resolve (/derby/test/node_modules/derby/node_modules/racer/lib/util/Promise.js:21:19)

/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:150
    return store._startTxnBuffer(clientId);
                 ^
TypeError: Cannot call method '_startTxnBuffer' of undefined
at /derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:150:22
at Object.Promise.on (/derby/test/node_modules/derby/node_modules/racer/lib/util/Promise.js:29:7)
at EventEmitter.module.exports.events.bundle (/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:138:26)
at EventEmitter.emit (events.js:123:20)
at Model.Klass.mixinEmit (/derby/test/node_modules/derby/node_modules/racer/lib/plugin.js:82:21)
at Model.mixin.server.bundle (/derby/test/node_modules/derby/node_modules/racer/lib/bundle/bundle.Model.js:36:12)
at Object.View._render (/derby/test/node_modules/derby/lib/View.server.js:352:9)
at /derby/test/node_modules/derby/lib/View.server.js:276:10
at Array.2 (/derby/test/node_modules/derby/lib/View.server.js:300:5)
at Object.Promise.resolve (/derby/test/node_modules/derby/node_modules/racer/lib/util/Promise.js:21:19)
@VanCoding

Ok, there really seems to be a bug somewhere. I've tested it on Windows 7 and on a completely fresh Debian VM.
On windows 7 it worked without problems, on debian I got the exact same error.

It seems to be a problem that only occours on debian...

Don't know if it really is related to derby or if it's an unknown bug of one of your dependencies...

@VanCoding

Today, it downloaded the newest version of derby using npm install -g derby and tried it again. And it worked!

So, I close the issue.

@VanCoding VanCoding closed this
@mayurdabhi

I have just done fresh new installation of node and derby in my machine (Windows 7).

Getting the same error as above!
Please guide.

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.