Allowing an app to use the Trello API stopped working

I have webform I have built to use the Trello API to create cards. My team has been using it for a couple of years. Today when new user tried to authenticate and then allow the app, they just get a blank page. I get this as well if I use an incognito window under my own account. Its totally broken.

After hitting allow in the popup, I just get a blank approve window:

I experience the exact same issue for 2 days now!
Using client.js library for authentication via Trello.authorize() method and it gets stuck in the popup at /1/token/approve as seen in @EricChristensen’s screenshot above.

Can someone from the Trello team have a look please? It seems it’s a general issue.

Here is a code snippit. If I but a breakpoint in both the success and failure functions, they are never hit. The the authorize function appears that it is never returning.

var token = Trello.token();
            
var authenticationSuccess = function() {
    console.log('Successful authentication');
    token = Trello.token();
    console.log(token);
    Trello.get(`/tokens/${token}/member`, {}, 
        function (data) { 
            console.log(`http://trello-avatars.s3.amazonaws.com/${data.avatarHash}/50.png`);
            data.avatar = `http://trello-avatars.s3.amazonaws.com/${data.avatarHash}/50.png`;
        },
        function (data) {
            console.log('error');
       }
    );
};
                
var authenticationFailure = function() {
    alert('Failed authentication');
};
        
Trello.authorize({
    type: 'popup',
    name: 'Install Alert',
    scope: {
        read: 'true',
        write: 'true' },
    expiration: 'never',
    success: authenticationSuccess,
    error: authenticationFailure
});

The trouble is client.js no longer exists !!!
I get 404 on both urls we can use to get it.

1 Like

I submit a new ticket on that forum to tell them that the 2 client.js links are no longer working, and my post was marked as SPAM “by the community” !!! What? Submitting a bug is a spam?

client.js seems to be available again at https://api.trello.com/1/client.js

1 Like

My issue still persists… I have a ticket open with support, but they have been slow to respond so far.

@EricChristensen do you have a support link where I can also report this issue? I cannot find a developer support email or something similar.

The problem is still happening and it’s very annoying as we cannot work properly :frowning:

Both https://trello.com/1/client.js and https://trello.com/1/client-unminified.js are back.

There were a few hours where client.js was not served from trello.com/1/, unfortunately. We are working on making changes to the way that it is generated and hosted and mistakenly pulled it from production. At the point in time we realized the mistake, we rolled back to the previous version so that everything was online again.

@bcook thanks for the update regarding client.js
What about the authorize issue initially mentioned by @EricChristensen in the first message in the thread? I still experience this problem (white page at /1/token/approve)

Can someone share a 1/authorize route that is leading to this? The 1/token/approve page in the screenshot is the page that the /1/authorize route POSTs to.

For instance, here is an authorization route that is working as expected: https://trello.com/1/authorize?expiration=1hour&scope=read&response_type=token&name=Server%20Token&key=0471642aefef5fa1fa76530ce1ba4c85

Here is the authorization route I am getting. I omitted the KEY, WEBSITE and NAME

https://api.trello.com/1/authorize?response_type=token&key=KEY&return_url=http%3A%2F%2FWEBSITE&callback_method=postMessage&scope=read%2Cwrite&expiration=never&name=NAME

This is not working for me. It does redirect me to:

https://trello.com/1/authorize?requestKey=REQUESTKEYOMITTED

Where I then have to hit Allow and then finally to the blank page mentioned before.

Here is my url https://api.trello.com/1/authorize?response_type=token&key=07708d4b8d4abPARTIAL_KEY&return_url=https%3A%2F%2FWEBSITE&callback_method=postMessage&scope=read%2Cwrite&expiration=never&name=My%20Trello%20Dashboard

I noticed that in the authorize popup there is a :ERR_NAME_NOT_RESOLVED when trying to load this file https://d78fikflryjgj.cloudfront.net/lib/snowplow/2.0.2.js followed by a JS error

After loging in and clicking Allow I get the white page at /1/token/approve

Hope this helps.

I think the error is unrelated (though something we’re looking at fixing).

When you get the white page, can you look at the source?

It should be something like:

<html><head><script>
if(window.opener) {
window.opener.postMessage("{{ token }}", "{{ origin }}")
}
</script></head></html>```

If you hop into the JS console on that page, can you introspect `window.opener`?

@bcook the code is below. I am noticing that the token that is coming back is not the same as the token that was generated when I go to trello.com/app-key and click on the token link.

Could this be the issue and why I am having a problem? If so, how do I resolve this?

<html><head><script>
if(window.opener) {
window.opener.postMessage("{{ token omitted}}", "http://installalert.cadwell.com")
}
</script></head></html>

Experiencing the same issue as Eric. If it means anything to you - the origin I’m trying to connect from is localhost (http://localhost:33006), and I’m trying to connect to Trello via my Google account that I have a couple of trello boards with, and I’m using the latest Chrome.

Authentication goes fine, then I end up at the blank 1/token/approve page.
Yes, the html looks as you described.
Something in particular you would like me to check regarding the window.opener object?

Edit: Okay, so I’ve just tried registering a new Trello account with an email/password directly (i.e. without using Google’s API). I also tried changing my hosts file so my localhost origin looks like my production URL plus port. Same thing happens, regardless.

@bcook do you have any news? is there anything else we can help with?

My app is suddenly also experiencing the same problem. No config changes, but suddenly a blank white page on the /1/token/approve endpoint. This is affecting all my new users. What should we do?

Jumping in that thread. We have exact the same problem. Since years the authetication works fine and now since days its not working any more.
We found a workaround, to do it, instead of the type ‘popup’ , we are using the type ‘redirect’. This works (witht some restrictiosn) but I hope that the popup will still work again.

I get the same problem as described for type “popup”, and could also use the workaround with “redirect”, but in my case it’s a really ugly hack based on a combination of interactive:false and type “redirect”