Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to load Power-Up

Vincent Ghilione July 21, 2017

 

Hi,

I'm creating a very simple Power-Up which should add a button to the board.

I followed the Power-Up tutorial on Trello and created the necessary files over https and added the Power-Up in the admin section.

When I go to any board and try to activate the Power-Up, I can see it in the list, but with an error message "Unable to load Power-Up"

My question is : "is there any way to debug this ?"

Otherwise could anyone have a look to my files and tell me if something looks wrong ?

Thanks in advance for your help

Vincent

1 answer

1 accepted

0 votes
Answer accepted
Oscar Triscon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2017

Looks like your server doesn't set the Access-Control-Allow-Origin header. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

You need to add the header to allow trello.com to load your powerup from an scripting request.

Vincent Ghilione July 22, 2017

Thanks Oscar.

I added the header but this still does not work.

I've imported the Trello Power-up template code on my server and it still does not work, which shows that the server is the issue.

Specially seeing that if I import the same manijest.json file from github it works fine.

I've checked both servers HTTP headers but I don't manage to find where this could come from.

Do you have any idea ?

Thanks

----

Status: HTTP/1.1 200 OK
Date: Sat, 22 Jul 2017 09:46:51 GMT  
Server: Apache  
Last-Modified: Sat, 22 Jul 2017 09:38:29 GMT  
ETag: "c0cf1a33-298-554e4be8f8c63"  
Accept-Ranges: bytes  
Vary: Accept-Encoding  
Content-Encoding: gzip  
Access-Control-Allow-Origin: *  
Content-Length: 365  
Connection: close  
Content-Type: application/json; charset=utf-8  
Strict-Transport-Security: max-age=16000000; includeSubDomains; preload

 

Oscar Triscon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 22, 2017

Try adding these three header lines:

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, HEAD
Access-Control-Max-Age: 3000

 

Vincent Ghilione July 22, 2017

Thanks, it worked pefectly !

 

Thanks again for your help

Husnain Manj November 22, 2017

Hi,

i face the same problem.

Where to add this script?

Thanks

Vincent Ghilione November 27, 2017

I created an .htaccess file as follow in the powerup folder

 

<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, HEAD"
Header set Access-Control-Max-Age "3000"
</IfModule>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events