Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Uncaught TypeError: Cannot read property 'focus' of null #29

Closed
cxy229 opened this issue May 15, 2016 · 13 comments
Closed

Uncaught TypeError: Cannot read property 'focus' of null #29

cxy229 opened this issue May 15, 2016 · 13 comments

Comments

@cxy229
Copy link

cxy229 commented May 15, 2016

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.7.3
System: Ubuntu 16.04
Thrown From: platformio-ide-terminal package, v2.0.9

Stack Trace

Uncaught TypeError: Cannot read property 'focus' of null

At /home/cxy229/.atom/packages/platformio-ide-terminal/lib/status-bar.coffee:93

TypeError: Cannot read property 'focus' of null
    at /home/cxy229/.atom/packages/platformio-ide-terminal/lib/status-bar.coffee:93:23

Commands

     -9:35.6.0 application:add-project-folder (atom-text-editor.editor.is-focused)
     -9:16.3.0 tabs:close-all-tabs (li.texteditor.tab.sortable.active.right-clicked)
     -9:03.2.0 platformio-ide-terminal:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
platformio-ide-terminal, v2.0.9

# Dev
No dev packages

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@fusion809
Copy link

Same issue here. Worthwhile noting that this error is not limited to this package, its parent package (terminal-plus) also has a similar error (see issue #265).

@fusion809
Copy link

My full details were:

Atom Version: 1.7.4
System: Ubuntu 16.04
Thrown From: platformio-ide-terminal package, v2.0.10

Stack Trace

Uncaught TypeError: Cannot read property 'focus' of null

At /home/fusion809/.atom/packages/platformio-ide-terminal/lib/status-bar.coffee:94

TypeError: Cannot read property 'focus' of null
    at /home/fusion809/.atom/packages/platformio-ide-terminal/lib/status-bar.coffee:94:23

Commands

Config

{
  "core": {
    "customFileTypes": {
      "source.ini": [
        ".buckconfig",
        ".flowconfig"
      ],
      "source.json": [
        ".arcconfig"
      ],
      "source.lisp": [
        ".emacs",
        ".spacemacs"
      ],
      "source.python": [
        "BUCK"
      ],
      "text.html.basic": [
        "ejs",
        "htm",
        "html",
        "kit",
        "shtml",
        "tmpl",
        "tpl",
        "xhtml"
      ]
    },
    "disabledPackages": [
      "language-markdown",
      "atom-beautify",
      "atomic-chrome",
      "build",
      "Hydrogen",
      "git-plus",
      "language-asciidoc"
    ],
    "projectHome": "/home/fusion809/GitHub/mine",
    "themes": [
      "fusion-ui",
      "dark-bint-syntax"
    ]
  }
}

Installed Packages

# User
dark-bint-syntax, v0.8.4
file-icons, v1.7.12
fusion-ui, v0.10.3
language-gfm2, v0.88.2
language-ini, v1.16.0
language-liquid, v0.5.1
language-lisp, v0.2.0
language-lua, v0.9.4
language-rpm-spec, v0.9.0
language-viml, v1.0.0
package-sync, v1.1.0
pigments, v0.26.3
platformio-ide-terminal, v2.0.10

# Dev
No dev packages

what triggers these errors? Anything, it seems, it does not seem to matter what I do, this error still pops up.

@ip82
Copy link

ip82 commented Jun 2, 2016

I believe this is about 2 (or more) monitors. This error pops up when I move my mouse pointer to the other monitor.

@fusion809
Copy link

Na, I get this error and I've never even used two monitors. I'm working on a laptop.

@fusion809
Copy link

A solution has been found it would seem. Back at the terminal-plus GitHub repo issue #270 has a solution and I'm gonna create a pull request to implement it.

fusion809 added a commit to fusion809/terminal-fusion that referenced this issue Jun 14, 2016
@greenbigfrog
Copy link

still exists...

I've found it occurs when I have one atom window on my first and one on my second monitor and then close one of them...

@Olmer1st
Copy link

Olmer1st commented Sep 3, 2016

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.10.0
Electron Version: 0.37.8
System: Ubuntu 16.04.1
Thrown From: platformio-ide-terminal package, v2.2.0

Stack Trace

Uncaught TypeError: Cannot read property 'focus' of null

At /home/olmer/.atom/packages/platformio-ide-terminal/lib/status-bar.coffee:102

TypeError: Cannot read property 'focus' of null
    at /home/olmer/.atom/packages/platformio-ide-terminal/lib/status-bar.coffee:102:23

Commands

     -2:14.5.0 core:save (atom-text-editor.editor.is-focused)
     -2:07.1.0 linter:lint (atom-text-editor.editor)
     -1:49.5.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:48.9.0 core:paste (atom-text-editor.editor.is-focused)
     -1:47.6.0 linter:lint (atom-text-editor.editor.is-focused)
     -1:40.4.0 core:paste (atom-text-editor.editor.is-focused)
     -1:39 core:save (atom-text-editor.editor.is-focused)
  2x -1:34.3.0 linter:lint (atom-text-editor.editor.is-focused)
     -1:04.0 core:paste (atom-text-editor.editor.is-focused)
     -1:02.2.0 core:save (atom-text-editor.editor.is-focused)
  2x -0:57.8.0 linter:lint (atom-text-editor.editor.is-focused)
     -0:27.2.0 core:cut (atom-text-editor.editor.is-focused)
     -0:25.5.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:25.2.0 core:paste (atom-text-editor.editor.is-focused)
     -0:24.5.0 core:save (atom-text-editor.editor.is-focused)
     -0:16.5.0 linter:lint (atom-text-editor.editor.is-focused)

Config

{}

Installed Packages

# User
atom-beautify, v0.29.11 (active)
atom-bootstrap3, v1.2.12 (inactive)
atom-typescript, v10.1.6 (active)
autoclose-html, v0.23.0 (active)
file-icons, v1.7.19 (active)
fonts, v1.6.0 (active)
linter, v1.11.16 (active)
linter-bootlint, v1.0.2 (active)
platformio-ide-terminal, v2.2.0 (active)
react-snippets, v0.4.2 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.5.0 (active)
one-light-ui, v1.5.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.3 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
find-and-replace, v0.201.0 (inactive)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.2 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.65.0 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.241.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.100.2 (active)
timecop, v0.33.2 (active)
tree-view, v0.208.2 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

@ghost
Copy link

ghost commented Oct 15, 2016

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.11.1
Electron Version: 0.37.8
System: Ubuntu 16.04.1
Thrown From: platformio-ide-terminal package, v2.2.0

Stack Trace

Uncaught TypeError: Cannot read property 'focus' of null

At /home/reza/.atom/packages/platformio-ide-terminal/lib/status-bar.coffee:102

TypeError: Cannot read property 'focus' of null
    at /home/reza/.atom/packages/platformio-ide-terminal/lib/status-bar.coffee:102:23

Commands

     -5:51.9.0 settings-view:open (ul.list-inline.tab-bar.inset-panel)
     -5:47.5.0 core:paste (atom-text-editor.editor.mini.is-focused)
     -5:46.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -3:47.4.0 settings-view:open (div.platformio-ide-terminal.status-bar)
     -3:43.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -3:04.2.0 tree-view:add-folder (div.header.list-item)
  3x -3:01.5.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -2:59.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:54.9.0 tree-view:add-folder (div.header.list-item)
  8x -2:53.3.0 core:backspace (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".hg",
      ".svn",
      ".DS_Store",
      "._*",
      "Thumbs.db",
      ".pioenvs",
      ".piolibdeps",
      ".clang_complete",
      ".gcc-flags.json"
    ]
  },
  "platformio-ide-terminal": {
    "core": {
      "autoRunCommand": "export PATH=/home/reza/.atom/packages/platformio-ide/penv/bin:/home/reza/.rbenv/plugins/ruby-build/bin:/home/reza/.rbenv/shims:/home/reza/.rbenv/bin:/home/reza/bin:/home/reza/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
    }
  }
}

Installed Packages

# User
atom-html-preview, v0.1.22 (active)
autocomplete-clang, v0.10.0 (active)
autocomplete-java, v1.2.5 (active)
autocomplete-ruby, v0.1.0 (active)
build, v0.65.0 (active)
busy, v0.7.0 (active)
file-icons, v1.7.22 (active)
git-plus, v5.18.0 (active)
java-importer, v1.4.1 (active)
javascript-snippets, v1.2.1 (active)
language-ini, v1.16.0 (active)
linter, v1.11.18 (active)
linter-gcc, v0.6.15 (active)
linter-javac, v1.9.4 (active)
linter-ruby, v1.2.2 (active)
platformio-ide-terminal, v2.2.0 (active)
run, v0.0.1 (active)
tool-bar, v1.0.1 (active)
wakatime, v6.0.10 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.2.0 (inactive)
base16-tomorrow-light-theme, v1.2.0 (inactive)
one-dark-ui, v1.6.0 (active)
one-light-ui, v1.6.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.7.0 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.201.1 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.59.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v1.0.0 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.68.2 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.101.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.209.3 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

@fusion809
Copy link

I just got this error again with v2.2.1.

@zzploveyou
Copy link

when I open 'platformio-atom-terminal', I will get this error once I switch to another monitor.
so I delete some lines in 'status-bar.coffee', and this error cannot show up again-.-

@ivankravets
Copy link
Member

@zzploveyou could you share here which lines you have removed?

@zzploveyou
Copy link

zzploveyou commented Nov 11, 2016

delete '@returnFocus.focus()' from below:
~/.atom/packages/platformio-ide-terminal/lib/status-bar.coffee

handleFocus = =>
      if @returnFocus
        setTimeout =>
          @returnFocus.focus()
          @returnFocus = null
        , 100

It does not influence of using this package.

@ivankravets
Copy link
Member

PlatformIO IDE Terminal v2.2.2 is out. Please update.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants