Getting - Cannot read properties of undefined Error

Hi,

I opened up Postman today and it said I had to login again. I did so and then found that all my tabs were closed and it was like I was a brand new user.
I opened up a query from the side menu but nothing would run with the error about undefined.

I eventually noticed the Environment dropdown was set to No Environment. I changed that to my actual environment and then started getting an error about the BaseURL being undefined.

I then took a closer look at my Environment from the left side menu, and all the variables are blank. api_id, api_key, and baseurl are all empty. Only the auth variable has any data in it. Is that data still stored somewhere that I can just import it or anything> I don’t know what info was in those boxes as It’d been in there for a long time.

Thanks.

Update. I found where I had the ID and Key written down so I put those back in. Now I’m getting a 404 error trying to hit the Logicmonitor API. I see this in the console but don’t know what it means or if it’s causing my issues.

I haven’t used Postman for a little while, but it worked just fine last time I needed it. :wink:

Hi @kelemvor. Welcome to the Postman Community.

We’ve updated the syntax of pm scripts in Postman and it looks like you’re using some deprecated methods. For example, you need to replace every instance of request.{something} with pm.request.{something}.

Similarly, we no longer import external modules for you by default. You have to import them using the “require” function.

I don’t think I use any scripts or imports or anything. If I do, I don’t know where they’d be. I just do basic queries like this:

Hi @kelemvor. Can you share a screenshot of your scripts(post-response) tab? There might be something in there.

Judging by the modules being used here, this might be a pre-request script that creating some auth based async request within the Collection.

This could be at the Collection, Folder or Request level so it’s worth opening those tabs in the workbench and seeing if anything is in there.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.