Constant Cannot call method 'getBufferPosition' errors


Im having a lot of Uncaught TypeError: Cannot call method 'getBufferPosition' of undefined errors when I close files.

Have anyone found out what is causing it?


That was a bug that was supposedly fixed in a previous version. What version of Atom are you running?


Yes, i’ve noticed it stopped for a while, but it’s back and in a spectacular way. Happens very, very frequently.
Im running the latest version at the moment (0.104.0)


Ok, if you can give us a stack trace that would help. Also, can you reproduce it with atom --safe?


Can you point me to any tips on how to extract the trace for those errors?


Sure … when the console comes up, you’ll probably get a red line that looks something like the Error lines here with the triangle next to them:

Just click the triangle to expand the red line into a bunch of red lines (though it should already be expanded) and copy all the red text and paste it here in the board.


Oh, I thought you’re mentioning something different. Thanks for the tip.

In safe mode the error doesn’t happen, and the trace include the following information:

Uncaught TypeError: Cannot call method 'getBufferPosition' of undefined /Applications/
module.exports.Editor.getCursorBufferPosition /Applications/
(anonymous function)
(anonymous function)
(anonymous function)
(anonymous function) /Applications/
EventEmitter.emit events.js:123
(anonymous function)

Im guessing this means is something related to the Linter package.


Probably … can you try reproducing the error after exiting out of Atom and relaunching it using atom --safe? This launches Atom with only the built-in packages and can help determine if an error like this is due to Atom or due to a third-party package.


Yes, I did confirm that in safe mode the error doesn’t happen.
I’ve also disabled the Linter package and again, the errors stop. Going to report this to the package owner. Thanks for all the help @leedohm


You’re welcome. I’m glad I could help :grinning: