{"action":"opened","issue":{"url":"https://api.github.com/repos/cloxp/cloxp-install/issues/3","labels_url":"https://api.github.com/repos/cloxp/cloxp-install/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/cloxp/cloxp-install/issues/3/comments","events_url":"https://api.github.com/repos/cloxp/cloxp-install/issues/3/events","html_url":"https://github.com/cloxp/cloxp-install/issues/3","id":72689453,"number":3,"title":"Clojars Browser error while attempting to load project list","user":{"login":"rheimbuch","id":5052,"avatar_url":"https://avatars.githubusercontent.com/u/5052?v=3","gravatar_id":"","url":"https://api.github.com/users/rheimbuch","html_url":"https://github.com/rheimbuch","followers_url":"https://api.github.com/users/rheimbuch/followers","following_url":"https://api.github.com/users/rheimbuch/following{/other_user}","gists_url":"https://api.github.com/users/rheimbuch/gists{/gist_id}","starred_url":"https://api.github.com/users/rheimbuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rheimbuch/subscriptions","organizations_url":"https://api.github.com/users/rheimbuch/orgs","repos_url":"https://api.github.com/users/rheimbuch/repos","events_url":"https://api.github.com/users/rheimbuch/events{/privacy}","received_events_url":"https://api.github.com/users/rheimbuch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-02T19:50:28Z","updated_at":"2015-05-02T19:50:28Z","closed_at":null,"body":"Reporting here because the Clojars Browser appears to be stored(?) in `cloxp-install/PartsBin/Clojure/`.\r\n\r\nSteps:\r\n\r\n1. fresh checkout of cloxp-install at commit 85b85b8f\r\n2. install cloxp: `lein run -m rksm.cloxp-installer.main \"pre-0.0.8\"`\r\n3. start cloxp: `./start.sh`\r\n4. open: `http://localhost:9001/cloxp.html`\r\n5. open Clojars Browser: `Alt-x, 'Clojure: browse Clojars'`\r\n6. error pop-up appears: `TypeError: projects.map is not a function`\r\n\r\nI tracked this down to an issue in the `loadProjectListViaHTTP` script attached to the ClojarsBrowser:\r\n```javascript\r\n  function getProjectFileName(n) {\r\n    Global.clojure.Runtime.doEval(\r\n      \"(.getCanonicalPath (rksm.system-navigator.clojars/ensure-clojure-feed-in-a-file))\",\r\n      {requiredNamespaces: [\"rksm.system-navigator.clojars\"], resultIsJSON: false, passError: true}, n);\r\n  }\r\n```\r\nThe `resultsJSON: false` option causes `getProjectFileName` to return a doubly-quoted string: \r\n\r\n```\r\n\"\\\"/Users/ryan.heimbuch/src/cloxp-install/LivelyKernel/2015-05-02_13-clojars-feed.json\\\"\"\r\n```\r\n\r\nwhich later causes a 400 error when attempting to load the file: \r\n\r\n```\r\n\"GET /nodejs/CommandLineServer/read-file?mimeType=application/json&fileName=\\%22/Users/ryan.heimbuch/src/cloxp-install/LivelyKernel/2015-05-02_13-clojars-feed.json\\%22 HTTP/1.1\" 400\r\n```\r\n\r\nSetting `resultsJSON: true` in `getProjectFileName` fixes this for me:\r\n```javascript\r\n  function getProjectFileName(n) {\r\n    Global.clojure.Runtime.doEval(\r\n      \"(.getCanonicalPath (rksm.system-navigator.clojars/ensure-clojure-feed-in-a-file))\",\r\n      {requiredNamespaces: [\"rksm.system-navigator.clojars\"], resultIsJSON: true, passError: true}, n);\r\n  }\r\n```\r\n\r\nI noticed that evaluating `(.getCanonicalPath (rksm.system-navigator.clojars/ensure-clojure-feed-in-a-file))` in a clojure workspace also returns the same doubly-quoted string. I traced the evaluation code as far as the `Global.clojure.Runtime.processNreplEvalAnswers` function, but I'm not sure what the intended behavior is."}}