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

How can I debug a trello power-up?

Dylan Harness January 14, 2018

I'm working on the basic trello power-up here with a very basic:

var Promise = TrelloPowerUp.Promise;

var btnCallback = function (t, opts) {
return t.popup({
title: 'Change Snooze Time',
url: './estimate.html',
args: { myArgs: 'You can access these with t.arg()' },
height: 278
});
};

TrelloPowerUp.initialize({
'card-buttons': function(t, options){
return [{
icon: 'https://cdn.glitch.com/1b42d7fe-bda8-4af8-a6c8-eff0cea9e08a%2Frocket-ship.png?1494946700421',
text: 'Claim Ether',
callback: btnCallback
}];
}
});



When I run it I get the following error:


PluginRunner::NotHandled: attempt to run callback on plugin 5a5af7ae0718dcac32a8946b (Ca-Ching) failed



Which doesn't give me any information about why the error occurred, and is next to impossible to debug.

Is it possible to get better error messages, or is it obvious what I'm doing wrong?

2 answers

1 accepted

2 votes
Answer accepted
bentley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2018

Hey Dylan,

This error usually occurs when you're using the callback capability but you haven't included it in your manifest's capabilities section. Can you confirm that it is included there along with card-buttons?

Dylan Harness January 16, 2018

Thanks for getting back to me @bentley!

I do have callback in there:

https://glitch.com/edit/#!/indigo-kale?path=public/manifest.json:9:15

bentley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 17, 2018

Thanks for sharing that! I see what is happening now.

Short answer and fix: The trailing comma in the manifest's capabilities section is invalid JSON and causing a parsing error. Delete that comma and wait ~5 minutes.

Long answer: We're in the middle of changing around how Custom Power-Ups work. I go into a bit more detail on it here. We have a task that parses all custom Power-Ups' manifests every five minutes and persists what it finds in our backend. There are a few things, like invalid JSON, that cause problems and we don't currently do a good job of propagating those errors to you. In the near future you will be able to change all of this instantly via trello.com/power-ups/admin.

Dylan Harness January 18, 2018

Ah, subtle! Much appreciated - looking forward to the changes.

bentley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2018

We've launched the updates I mentioned in that last response. You can read more about them here: https://developers.trello.com/v1.0/docs/migrating-manifests. 

2 votes
Marijn van der Zee March 2, 2018

I ran into exactly the same error.

After checking that my manifest.json was valid json, I checked the capabilities on https://trello.com/power-ups/admin/ and found that `callback` was disabled.

After enabling it on the admin page it worked :) 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events