Cisco-Talos/FIRST-server

can not installs engines

Closed this issue · 4 comments

Hello,
there is an error when I use command in bash, Information is as follows:

#cd FIRST-server/server/utilities
#python engine_shell.py install first.engines.exact_match ExactMatchEngine jessielee4736@gmail.com
install - Installs engine

Traceback (most recent call last):
File "engine_shell.py", line 341, in
shell.onecmd(' '.join(sys.argv[1:]))
File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "engine_shell.py", line 142, in do_install
developer = User.objects(email=email).get()
File "/usr/local/lib/python2.7/dist-packages/mongoengine/queryset/base.py", line 276, in get
raise queryset._document.DoesNotExist(msg)
first.models.DoesNotExist: User matching query does not exist.
root@ubuntu:/home/jessie/FIRST-server/server/utilities#

best regards
Jessie Lee

@jessie4736 You are getting this error because a user with that email address is not registered with the system yet. Use the web UI to go through the registration process. Once the user is registered the commands should work correct.

@demonduck
thanks,But when i click register from web UI it return 400 error,
the information is as follows:

Error: redirect_uri_mismatch

The redirect URI in the request, http://pwd.superxiaoxiong.cn:1337/oauth/google, does not match the ones authorized for the OAuth client. Visit https://console.developers.google.com/apis/credentials/oauthclient/548151246995-biqgo5prp9404gcv19c9mi2n4p5g4tll.apps.googleusercontent.com?project=548151246995 to update the authorized redirect URIs.

and my google oauth information:
javascript origins: http://pwd.superxiaoxiong.cn:1337
redirect urls: http://pwd.superxiaoxiong.cn:1337

best regards
Jessie Lee

@jessie4736 you are almost there. My own configuration has no javascript origins. Update the redirect URIs to

http://pwd.superxiaoxiong.cn:1337/oauth/google

Then I would generate a new google_secret.json and that issue should be solved. See related Issue #4

@demonduck
thanks very much!
it works!

best regards
Jessie Lee