Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'null' of undefined #63

Closed
JulianTonti opened this issue Jun 16, 2016 · 5 comments

Comments

@JulianTonti
Copy link

commented Jun 16, 2016

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: term3 package, v0.22.0

Normally, term3 has no problem sharing a Pane with other Tabs, even when the Tabs are other term3 instances. But under the following condition, another Tab in the same Pane as a term3 instance causes an exception that keeps re-occurring endlessly, even when the Pane is removed. Here's how to replicate it:

0: starting from a blank slate

image

1: create a term3 instance in any pane with ctrl-option-t, then use it to touch a file and open it in Atom (the file must exist for the error to occur).

image

2: the file should open under a new Tab in the same Pane as the term3 instance.

image

3: now try to do anything at all in the editor (even clicking to focus, switch tabs or close tabs):

image

4: the error keeps re-occurring, even if the offending Pane is terminated:

image

Stack Trace

Uncaught TypeError: Cannot read property 'null' of undefined

At /Users/julian/.atom/packages/term3/node_modules/react-atom-fork/lib/ReactMount.js:510

TypeError: Cannot read property 'null' of undefined
    at Object.ReactMount.findReactContainerForID (/Users/julian/.atom/packages/term3/node_modules/react-atom-fork/lib/ReactMount.js:510:50)
    at findParent (/Users/julian/.atom/packages/term3/node_modules/react-atom-fork/lib/ReactEventListener.js:46:30)
    at handleTopLevelImpl (/Users/julian/.atom/packages/term3/node_modules/react-atom-fork/lib/ReactEventListener.js:81:16)
    at ReactDefaultBatchingStrategyTransaction.Mixin.perform (/Users/julian/.atom/packages/term3/node_modules/react-atom-fork/lib/Transaction.js:141:20)
    at Object.ReactDefaultBatchingStrategy.batchedUpdates (/Users/julian/.atom/packages/term3/node_modules/react-atom-fork/lib/ReactDefaultBatchingStrategy.js:70:19)
    at Object.batchedUpdates (/Users/julian/.atom/packages/term3/node_modules/react-atom-fork/lib/ReactUpdates.js:113:20)
    at ReactEventListener.dispatchEvent (/Users/julian/.atom/packages/term3/node_modules/react-atom-fork/lib/ReactEventListener.js:186:20)

Commands

  4x -2:38.7.0 term3:open (atom-pane.pane.active)
  2x -0:05.4.0 core:backspace (atom-workspace.workspace.scrollbars-visible-always.theme-base16-tomorrow-light-theme.theme-one-light-ui)

Config

{
  "core": {
    "destroyEmptyPanes": false,
    "disabledPackages": [
      "autocomplete-plus",
      "autocomplete-html",
      "autocomplete-css",
      "autocomplete-atom-api",
      "autocomplete-snippets",
      "activate-power-mode",
      "terminal-plus",
      "minimap"
    ],
    "openEmptyEditorOnStart": false,
    "themes": [
      "one-light-ui",
      "base16-tomorrow-light-theme"
    ]
  },
  "term3": {
    "autoRunCommand": "login -f `whoami`",
    "colors": {
      "background": {
        "red": 255,
        "green": 255,
        "blue": 255,
        "alpha": 1
      },
      "foreground": {
        "red": 0,
        "green": 0,
        "blue": 0,
        "alpha": 1
      }
    },
    "fontFamily": "monaco",
    "fontSize": "10px"
  }
}

Installed Packages

# User
Sublime-Style-Column-Selection, v1.5.1
term3, v0.22.0

# Dev
No dev packages
@JulianTonti

This comment has been minimized.

Copy link
Author

commented Jun 16, 2016

Interestingly, If I open a file in term3 using open -a Atom filename then the error does not occur.

The error only occurs if I type atom filename, where atom symlinks to the atom.sh script located with the Atom.app: /Applications/Atom.app/Contents/Resources/app/atom.sh

Located online here: https://github.com/atom/atom/blob/master/atom.sh

@ggreer

This comment has been minimized.

Copy link
Member

commented Jun 21, 2016

Thanks for the detailed bug report. It made it much easier for me to reproduce the issue.

@ggreer

This comment has been minimized.

Copy link
Member

commented Jun 21, 2016

This might be a bug in Atom. For some reason, process.env.NODE_ENV is being unset, causing the error in findReactContainerForID(). Term3 definitely doesn't mess with that.

@ggreer ggreer closed this in 9028387 Jun 21, 2016

@ggreer

This comment has been minimized.

Copy link
Member

commented Jun 21, 2016

OK, try the latest version of Term3 (v0.22.1). It works around this bug in Atom.

@JulianTonti

This comment has been minimized.

Copy link
Author

commented Jun 22, 2016

Updated to 0.22.1, restarted Atom and indeed the error is fixed.

Thankyou!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.