StackStorm / StackStorm/st2

login fail ERROR: Expecting value: line 1 column 1 (char 0)

Open
#5,272 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

#st2 --debug login st2admin -p 'Ch@ngeMe'

-------- begin 140218091069512 request ----------

curl -X POST -H 'User-Agent: python-requests/2.23.0' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: /' -H 'Connection: keep-alive' -H 'content-type: application/json' -H 'Content-Length: 2' -H 'Authorization: Basic c3QyYWRtaW46Q2hAbmdlTWU=' --data-binary '{}' http://127.0.0.1:9100/tokens

-------- begin 140218091069512 response ----------

<title>Node Exporter</title>

Node Exporter

Metrics

# -------- end 140218091069512 response ------------

ERROR: Expecting value: line 1 column 1 (char 0)

CLI settings:

Config file path: /root/.st2/config
Client settings:

ST2_BASE_URL: http://127.0.0.1
ST2_AUTH_URL: http://127.0.0.1:9100
ST2_API_URL: http://127.0.0.1:9101/v1
ST2_STREAM_URL: http://127.0.0.1:9102/v1
ST2_AUTH_TOKEN: None

Proxy settings:

HTTP_PROXY:
HTTPS_PROXY:

Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/shell.py", line 408, in run
func(args)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/commands/auth.py", line 154, in run_and_print
self.run(args, **kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/commands/auth.py", line 125, in run
manager = self.manager.create(instance, auth=(args.username, args.password), **kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/models/core.py", line 42, in decorate
return func(*args, **kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/models/core.py", line 309, in create
instance = self.resource.deserialize(response.json())
File "/opt/stackstorm/st2/lib/python3.6/site-packages/requests/models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/simplejson/init.py", line 525, in loads
return _default_decoder.decode(s)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with st2client/commands/auth.py and st2client/models/core.py, then reproduce the shown #st2 --debug login request against the /tokens endpoint. Compare the response returned by the configured authentication URL with the JSON expected by response.json(); done means the reported login failure has a defined, verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.