jackm / kijiji-manager

App for viewing, posting, reposting, and deleting your Kijiji ads
https://pypi.org/project/kijiji-manager/
MIT License
52 stars 11 forks source link

Unknown API error #41

Closed dudududodododedede closed 2 years ago

dudududodododedede commented 2 years ago

Suddenly getting this error today. Didn't restart or anything. Application has been running for days and just started throwing this error. This is not performing any particular action, just trying to load the main page http://127.0.0.1:5000/home

Adding some more debugging statements, this is the error:

27.0.0.1 - - [27/Jun/2022 19:54:31] "GET /home HTTP/1.1" 200 -
127.0.0.1 - - [27/Jun/2022 19:54:31] "GET /static/style.css HTTP/1.1" 304 -
127.0.0.1 - - [27/Jun/2022 19:54:32] "GET /favicon.ico HTTP/1.1" 304 -
OrderedDict([('api-base-error',
              OrderedDict([('@xmlns',
                            'http://www.ebayclassifiedsgroup.com/schema/types/v1'),
                           ('@http-status-code', '401'),
                           ('api-errors',
                            OrderedDict([('api-error',
                                          [OrderedDict([('message',
                                                         'Unknown user and/or '
                                                         'incorrect '
                                                         'password')]),
                                           OrderedDict([('message',
                                                         'Authentication '
                                                         'failure, check '
                                                         'challenge header '
                                                         'X-ECG-Authenticate-User '
                                                         'and respective '
                                                         'request Header '
                                                         'including syntax: '
                                                         'X-ECG-Authorization-User')])])])),
                           ('api-debug-errors', None),
                           ('api-field-errors', None)]))])
dudududodododedede commented 2 years ago

Cleared cookies and now this error is no longer showing up and I can see my ads. But reposting causes a different error ("One of your images is not on an accepted service. Please upload your images again")-- I'll create a different thread for that

jackm commented 2 years ago

Your user login token expired which is why you were required to login again.

This can happen if you are logged in for multiple days (possibly weeks?) which is long enough that Kijiji expires the login token and requiring you to provide authentication again to get a new token.