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?
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, subtle! Much appreciated - looking forward to the changes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.