So I tried a “20 Minute” challenge on my macbookpro and entered hell. The Project Oxford API was not responding when I ran it.
So I dug into the installation logs and found a problem with a missing file from the installation of the dependencies for the project. Not saying this was the problem, but it had a big smell about it.
Tried to Full Stack Overflow my way out of it, but didn’t find much.
This challenge may work on a clean machine that isn’t used for daily hacking but my machine was not that machine.
I tried using my Windows 10 image but hit hurdles trying to follow their instructions.
So I was going to have to understand the problem. Back to the mac.
Cloned NodeJS/Node from Github to copy the supposed missing file to the place it was missing. I sensed a bigger issue in the configuration for the mac but I was too much a noob to Nodejs to know better.
That caused trouble:
npm install —save in the project directory
? bobblegit:(master)?npm install --save email@example.com /Users/mo/Dev/node/bobble??? firstname.lastname@example.org ? bobblegit:(master) ? npm install --save jimp > email@example.com install /Users/mo/Dev/node/bobble/node_modules/node-zlib-backport > node-gyp rebuild CXX(target) Release/obj.target/zlib/src/node_zlib.o In file included from ../src/node_zlib.cc:32: /Users/mo/.node-gyp/5.11.0/include/node/node_internals.h:6:10: fatal error: 'util-inl.h' file not found #include "util-inl.h" ^ 1 error generated. make: *** [Release/obj.target/zlib/src/node_zlib.o] Error 1 gypERR!build error gypERR!stack Error: `make` failed with exit code: 2 gypERR!stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gypERR!stack at emitTwo (events.js:100:13) gypERR!stack at ChildProcess.emit (events.js:185:7) gypERR!stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gypERR!System Darwin 15.4.0 gypERR!command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gypERR!cwd /Users/mo/Dev/node/bobble/node_modules/node-zlib-backport gypERR!node -v v5.11.0 gypERR!node-gyp -v v3.3.1 gypERR!not ok npmWARNinstall:firstname.lastname@example.org email@example.com install: `node-gyp rebuild` npmWARNinstall:firstname.lastname@example.org Exit status 1 email@example.com /Users/mo/Dev/node/bobble??? firstname.lastname@example.org
sudo didn’t help either.
Led to here:
This led to:
npmERR! email@example.com install: `node-gyp rebuild` npmERR! Exit status 1 npmERR! npmERR! Failed at the firstname.lastname@example.org install script 'node-gyp rebuild'. npmERR! Make sure you have the latest version of node.js and npm installed. npmERR! If you do, this is most likely a problem with the node-zlib-backport package, npmERR! not with npm itself. npmERR! Tell the author that this fails on your system: npmERR! node-gyp rebuild npmERR! You can get information on how to open an issue for this project with: npmERR! npm bugs node-zlib-backport npmERR! Or if that isn't available, you can get their info via: npmERR! npm owner ls node-zlib-backport
npmERR!There is likely additional logging output above.
Created a Node Azure machine hoping for better luck. Not so.
Tried on Azure Windows 10, got an InvalidImageSize error.
Tried on mac and parallels Windows 10, and got timeout.
Installed Node 6 on mac that was just released yesterday.
Redid installation of node, express, etc. on mac:
InvalidImageSize error on different images sizes and types.
“Image size is too small or too big.”
This was progress. Going from timeout to error is a big gain.
Apparently if I can send an http path instead of local image path, this bug won’t occur. Couldn’t get it to work without changing too much code for a 20 minute challenge. Put on the back burner.
Also, apparently if I put a .jpg on the end of the file that gets sent to Project Oxford, it will work. Not so.
I subscribed to two bug reports on github for the next move and am now waiting…
Apparently the problem was a regression issue where streaming no longer recognised the file type from the stream contents. Local file names without an extension that gave the game away with respect to the type of file now cause a problem. Not sure if that covers the problems I have experienced, though.
A pull request to fix the issue has been submitted. Stay tuned.