Trello importer problem : 'Invalid Signature'

176 views
Skip to first unread message

Fjalar(at)github

unread,
Feb 16, 2022, 7:47:42 AM2/16/22
to taigaio
Hi!

I have installed Taiga from the "Install Taiga in Production" page
https://docs.taiga.io/setup-production.html
on a fresh Ubuntu 20.04 LTS Virtual Machine running in Windows 10 HyperV.

I can bring Taiga up and down, and everything seems to be working like
a charm (after fixing docker-compose.yml/taiga-events with restart:
always ... my events container is always struggling during startup).

I have added the Trello importer to docker-compose.yml and the Icon
shows up under "Import Project".
I have received an API key from the Trello board and a secret Trello
key from the admin on the trello project. They are added to taiga-back
as explained in "Install Taiga in Production".
TRELLO_IMPORTER_API_KEY: "12abe54553298739cdfe394497712ef3"
TRELLO_IMPORTER_SECRET_KEY: "32b2a7cdefd1d5ffacdcea6473e253a8417b365872990aecddee4222feea65f2"

ENABLE_TRELLO_IMPORTER: "true" is set in taiga-back and taiga-front
(keys changed for publication)

I can confirm my (key,token) pair against Trello using this command:
curl 'https://api.trello.com/1/members/me/boards?key={yourKey}&token={yourToken}'
[
  Used these guides :
    https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/
    https://developer.atlassian.com/cloud/trello/guides/rest-api/authorization/
]
and confirmed that changing the token gives invalid token.
(I consider this a confirmation of the Trello token signature. Is this correct?)

When I press the Trello importer icon I get the error below:

Error message from Crome Console
elements.js:1  GET http://xxx.xxx.xxx.xxx:9000/api/v1/importers/trello/auth_url 500 (Internal Server Error)
(I see the same thing in Firefox, and no other errors are present in browser)

I am not using HTTPS for my Taiga installation yet (On LAN).

Any idea of how to get the Trello importer up and running?
Or should i report this as a bug on https://github.com/taigaio/taiga-back ?


Log of incident from docker-compose:
taiga-back_1             | Content-Type: text/plain; charset="utf-8"
taiga-back_1             | MIME-Version: 1.0
taiga-back_1             | Content-Transfer-Encoding: 7bit
taiga-back_1             | Subject: [Django] ERROR (EXTERNAL IP): Internal Server Error:
taiga-back_1             |  /api/v1/importers/trello/auth_url
taiga-back_1             | From: root@localhost
taiga-back_1             | To: exa...@example.com
taiga-back_1             | Date: Wed, 16 Feb 2022 12:20:34 -0000
taiga-back_1             | Message-ID: <164501403415.45.9413826841150724929@191f635416e9>
taiga-back_1             |
taiga-back_1             | Internal Server Error: /api/v1/importers/trello/auth_url
taiga-back_1             |
taiga-back_1             | Exception Value: Token request failed with code 400, response was 'Invalid Signature'.
taiga-back_1             | Request information:
taiga-back_1             | USER: admin
taiga-back_1             | -------------------------------------------------------------------------------
taiga-back_1             | ERROR:2022-02-16 12:20:34,143: Internal Server Error: /api/v1/importers/trello/auth_url
taiga-back_1             | Traceback (most recent call last):
taiga-back_1             |   File "/opt/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
taiga-back_1             |     response = get_response(request)
taiga-back_1             |   File "/opt/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
taiga-back_1             |     response = self.process_exception_by_middleware(e, request)
taiga-back_1             |   File "/opt/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
taiga-back_1             |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
taiga-back_1             |   File "/taiga-back/taiga/base/api/viewsets.py", line 95, in view
taiga-back_1             |     return self.dispatch(request, *args, **kwargs)
taiga-back_1             |   File "/opt/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
taiga-back_1             |     return view_func(*args, **kwargs)
taiga-back_1             |   File "/taiga-back/taiga/base/api/views.py", line 449, in dispatch
taiga-back_1             |     response = self.handle_exception(exc)
taiga-back_1             |   File "/taiga-back/taiga/base/api/views.py", line 447, in dispatch
taiga-back_1             |     response = handler(request, *args, **kwargs)
taiga-back_1             |   File "/taiga-back/taiga/importers/trello/api.py", line 105, in auth_url
taiga-back_1             |     (oauth_token, oauth_secret, url) = TrelloImporter.get_auth_url()
taiga-back_1             |   File "/taiga-back/taiga/importers/trello/importer.py", line 512, in get_auth_url
taiga-back_1             |     response = session.fetch_request_token(request_token_url)
taiga-back_1             |   File "/opt/venv/lib/python3.7/site-packages/requests_oauthlib/oauth1_session.py", line 287, in fetch_request_token
taiga-back_1             |     token = self._fetch_token(url, **request_kwargs)
taiga-back_1             |   File "/opt/venv/lib/python3.7/site-packages/requests_oauthlib/oauth1_session.py", line 369, in _fetch_token
taiga-back_1             |     raise TokenRequestDenied(error % (r.status_code, r.text), r)
taiga-back_1             | requests_oauthlib.oauth1_session.TokenRequestDenied: Token request failed with code 400, response was 'Invalid Signature'.
taiga-gateway_1          | xxx.xxx.xxx.yyy - - [16/Feb/2022:12:20:34 +0000] "GET /api/v1/importers/trello/auth_url HTTP/1.1" 500 27 "http://xxx.xxx.xxx.zzz:9000/project/new/import" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" "-"

Best
Fjalar
Reply all
Reply to author
Forward
Message has been deleted
0 new messages