2

I am trying to create a new application in Parse Cloud Code. According to instructions I have to create an app in Parse.com then run the following command: parse new [application name]

so I created a new app called ABCDE (example name) and called the following: parse new ABCDE

but I saw the following weird output :

... [Some lines indicating it is creating files] ...
Email: ******
Password:  ******
1: results
Select an App:

So basically the command line was not capable of pulling the list of my apps (Only one App at that moment) and showed 1:results as the only menu item instead of 1: ABCDE.

I chose 1 anyway and got the following error:

Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File ".\build\pyi.win32\parse\out00-PYZ.pyz\main", line 711, in main
  File ".\build\pyi.win32\parse\out00-PYZ.pyz\main", line 424, in handle_add
  File ".\build\pyi.win32\parse\out00-PYZ.pyz\config_handler", line 174, in add_app
IndexError: list index out of range

After struggeling with this for quite some time I decided to create a new App and lets say I called it XYZ and followed the same steps. This time also I got the following option even through I had two apps:

... [Some lines indicating it is creating files] ...
Email: ******
Password:  ******
1: results
Select an App:

So it showed 1: results instead of 1: ABCDE 2:XYZ.

I entered 1 anyway and it finished the process with no errors but created the following config file which is broken I believe:

{
"applications": {
    "_default": {
        "link": "results"
    }, 
    "results": {
        "applicationId": {
            "appName": "ABCDE", 
            "applicationId": "*****", 
            "masterKey": "****"
        }, 
        "masterKey": {
            "appName": "XYZ", 
            "applicationId": "*****", 
            "masterKey": "*****"
        }
    }
}
}

Any ideas how to fix this?

Aidin
  • 2,134
  • 22
  • 26

2 Answers2

4

Ok, downloading the latest CLI did not help me on my Windows. The new CLI is stuck and does not respond. But I resolved the issue on Mac.

This is what I did.

  1. Delete the parse file from the path /usr/local/bin/parse. This is a MUST DO. Simply reinstalling did not help.

  2. Then run the below command to reinstall the Mac command line tool.

curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash

The command is standard and as found in the Parse instructions below. But removing the previous instance is vital. https://parse.com/apps/quickstart#cloud_code/unix

  1. Now try running the "parse new" command. It yields the result as expected.
sivag1
  • 4,734
  • 3
  • 32
  • 35
  • 1
    The same solution can be used when you are trying to deploy (parse deploy command), but the terminal just gets stuck in some "downloading". In that case stop that, simply run the curl command above and try again. It should work. – sivag1 Jul 06 '15 at 23:36
2

Looks like the CLI download in the getting started guide is not the latest version. Try downloading it from here:

https://parse.com/docs/downloads

Once you have downloaded the latest version, rename it as 'parse.exe' and replace the parse.exe in your original download. When you run parseconsole.exe it should work as expected!

Gibbet
  • 143
  • 9
  • Hi, I have the same issue as is not working. In Windows, the parse.exe is not responding. It just stays. How do I try this on a Mac? – sivag1 Jun 01 '15 at 22:10
  • Are you putting the parse.exe file in the same folder as parseconsole.exe? OR are you adding it to your PATH variable? – Gibbet Jun 03 '15 at 07:32
  • On windows make sure it is in the same directory as parseconsole.exe and run parseconsole.exe If you try to run parse.exe nothing will happen... – Gibbet Jun 03 '15 at 07:34
  • I tried in the same directory only. But regardless I invoke from the console or just invoke the parse.exe directly from command, it just hangs and does nothing. – sivag1 Jun 03 '15 at 14:39
  • Hmm odd, well this worked on my windows 7 machine. I guess you could try it on another system, it could be a antivirus/registry issue... – Gibbet Jun 04 '15 at 02:54
  • Thanks, that fixed the issue. – Aidin Jun 05 '15 at 16:08
  • @Gibbet i can't run the latest version installer my pc is windows 7 64 bit – Cristiana Chavez Jun 19 '15 at 09:37
  • @Cristiana214 I have a Win7 64 bit system, what have you tried and what are you seeing? – Gibbet Jun 24 '15 at 17:02
  • @Gibbet it is fixed already i just thought it is an installer shoud be run in command promt – Cristiana Chavez Jun 25 '15 at 04:00