# Trello Authorize cannot read properties of undefined error

**URL:** <https://community.developer.atlassian.com/t/trello-authorize-cannot-read-properties-of-undefined-error/52928>\
**Category:** Trello\
**Tags:** authentication, auth\
**Created:** [October 15, 2021, 8:18pm UTC](https://community.developer.atlassian.com/t/trello-authorize-cannot-read-properties-of-undefined-error/52928 "2021-10-15T20:18:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmcopeland](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/cmcopeland/32/42269_2.png) [@cmcopeland](https://community.developer.atlassian.com/u/cmcopeland)\
**Post date:** [October 15, 2021, 8:18pm UTC](https://community.developer.atlassian.com/t/trello-authorize-cannot-read-properties-of-undefined-error/52928/1 "2021-10-15T20:18:35Z")

</div>

Dear Trello Community,

I created a company web app that interfaces with Trello. The Web App acts as an entry point and captures data, which is then fed to the Trello API to create / update cards.

I am using the window.Trello.authorize() to receive authorization from the user to perform Trello actions on their behalf.

I followed this setup: [Getting Started with client.js](https://developer.atlassian.com/cloud/trello/guides/client-js/getting-started-with-client-js/)

The code works great in my local development environment. I was done with the build so the other day, I moved the code to our TEST environment which is a virtual Linux server. Now, I get the following error with window.Trello.authorizie():

App.js:480 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘authorize’)  
at t.value (App.js:480)  
at rn (react-dom.production.min.js:181)  
at ln (react-dom.production.min.js:180)  
at Uc (react-dom.production.min.js:261)  
at $n (react-dom.production.min.js:230)  
at Kn (react-dom.production.min.js:229)  
at An (react-dom.production.min.js:223)  
at react-dom.production.min.js:121  
at t.unstable\_runWithPriority (scheduler.production.min.js:18)  
at Nt (react-dom.production.min.js:120)

I looked at the files on the TEST machine. index.html is setup correctly with the correct lines. The code is no different. I’ve been researching but nothing so far.

Do any of you have an idea? I appreciate any thoughts or advice you might have on this.

Thanks!

---

<div class="post-metadata">

**Author:** ![cmcopeland](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/cmcopeland/32/42269_2.png) [@cmcopeland](https://community.developer.atlassian.com/u/cmcopeland)\
**Post date:** [October 15, 2021, 11:13pm UTC](https://community.developer.atlassian.com/t/trello-authorize-cannot-read-properties-of-undefined-error/52928/2 "2021-10-15T23:13:31Z")

</div>

Ok community, on the TEST machine, I manually updated the index.html and moved the script tags. When I placed them above the “head” tag (right below “html” tag with no spaces, it worked. I then placed the “script” tags within the “head” right at the bottom and that worked too. I’m not sure what caused the scripts to not be loaded but by adjusting the location, they are getting loaded. Thanks!

---

<div class="post-metadata">

**Author:** ![jrfischer](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/jrfischer/32/40093_2.png) [@jrfischer](https://community.developer.atlassian.com/u/jrfischer)\
**Post date:** [October 16, 2021, 4:48pm UTC](https://community.developer.atlassian.com/t/trello-authorize-cannot-read-properties-of-undefined-error/52928/3 "2021-10-16T16:48:57Z")

</div>

Sounds like a classic issue of caching. By moving things around like that you “jiggled the handle” so-to-speak. But, glad it’s working for you!

---

<div class="post-metadata">

**Author:** ![cmcopeland](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/cmcopeland/32/42269_2.png) [@cmcopeland](https://community.developer.atlassian.com/u/cmcopeland)\
**Post date:** [October 18, 2021, 4:08pm UTC](https://community.developer.atlassian.com/t/trello-authorize-cannot-read-properties-of-undefined-error/52928/4 "2021-10-18T16:08:14Z")

</div>

Jrfischer, ahh, ok! I’ll keep that in mind next time I run into an issue like this. I appreciate the response.
