TypeError: Cannot read property **** of undefined

I need help. This has eaten my time now for days. I have been facing issues with “TypeError: Cannot read property **** of undefined” while using sessions and dialogs. I believe the issue flows on to other APIs I haven’t needed just yet…

tryinging this
session.defaultSession.cookies.get({}) for example results to: “TypeError: Cannot read property ‘defaultSession’ of undefined”