mangecoeur / ipython-desktop

IPython Notebook desktop interface
125 stars 11 forks source link

executable missing. #2

Closed Carreau closed 10 years ago

Carreau commented 10 years ago

I'm probably missing a buid step somewhere :

$ grunt install
OS: mac
Running "shell:install" (shell) task
npm WARN package.json ipython-desktop@0.2.0 No repository field.
npm WARN package.json ipython-desktop@0.2.0 No README data

> ipython-desktop@0.2.0 postinstall /Users/matthiasbussonnier/ipython-desktop/src
> node ../etc/scripts/postinstall.js

Running "nodewebkit:src" (nodewebkit) task
>> Created a new release with node-webkit (0.9.2) for mac
>> @ /Users/matthiasbussonnier/ipython-desktop/releases/ipython-desktop

Done, without errors.
$ grunt run
OS: mac
Running "less:./src/css/app.css" (less) task
File ./src/css/app.css created.

Running "shell:run" (shell) task
The application /.../.../ipython-desktop/cache/mac/0.9.2/node-webkit.app
cannot be opened because its executable is missing.

Doing from source because I have issues with bundle that do not store configuration.

Carreau commented 10 years ago

So the MacOS/nodewebkit seem to be missing from the .app bundle. copying it inside make the process crah.

Carreau commented 10 years ago

so, rebuilding I went 1 step further :

$ pwd; node-webkit.app/Contents/MacOS/node-webkit ../../../src
ipython-desktop/cache/mac/0.9.2
...

raised an error that I could catch with the following :

diff --git a/src/js/app.js b/src/js/app.js
index e882930..74fccac 100755
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -316,7 +316,11 @@ app.factory('serverConfig', function() {
    */

   function storedConfigs() {
-    return JSON.parse(localStorage.servers);
+    try{
+    return JSON.parse(localStorage.servers)
+    } catch (e) {
+        return {}
+    };
   }

   function init() {
mangecoeur commented 10 years ago

Aha, I think I found it, I try to access the servers before its initialized, it works on my machine because my localstorage is now so full of junk from developing that it generally works anyway when it shouldn't. Uploaded patch, try it and hope it works, let me know how it goes.

Carreau commented 10 years ago

Yep, works better. seem not to keep the settings across sessions though, and I have to investigate as I use https with auth and I get a blank page when trying to start server. Thansk

mangecoeur commented 10 years ago

Ah if you use https it won't work, the "http://" is hardcoded. Snooping out the proper address of the running server is on the todo list - ideally I would like to fetch it from the ipython startup message so you don't have to configure a port even.

Carreau commented 10 years ago

Ah if you use https it won't work, the "http://" is hardcoded. Snooping out the proper address of the running server is on the todo list - ideally I would like to fetch it from the ipython startup message so you don't have to configure a port even.

Ok, https:// is definitively a must have on multi user machines. It is true that parsing the output is not awesome. There is probably a way to have the notebook output that info as Json somewhere, or even directly json in the log. Would it help ?