dart-atom / dart

A Dart plugin for Atom.
http://dart-atom.github.io/dart/
BSD 3-Clause "New" or "Revised" License
154 stars 44 forks source link

Uncaught NullError: method not found: '_analysis' on null #466

Closed traviskaufman closed 8 years ago

traviskaufman commented 9 years ago

[Enter steps to reproduce below:]

  1. Create a project on the command line using flutter create
  2. Open the project folder within Atom
  3. Start typing

Atom Version: 1.0.19 System: Mac OS X 10.10.5 Thrown From: dartlang package, v0.4.12

Stack Trace

Uncaught NullError: method not found: '_analysis' on null

At /Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:21255

NullError: method not found: '_analysis' on null
  at [object Object].dart.wrapException (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:22307:17)
  at [object Object].dart._rethrow (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:38390:15)
  at _rootHandleUncaughtError_closure.dart._rootHandleUncaughtError_closure.call$0 (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:41178:11)
  at _AsyncCallbackEntry.dart._AsyncCallbackEntry.callback$0 (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:39573:30)
  at [object Object].dart._microtaskLoop (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:38189:12)
  at [object Object].dart._microtaskLoopEntry (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:38195:11)
  at TimerImpl_internalCallback0.dart.TimerImpl_internalCallback0.call$0 (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:21631:35)
  at invokeClosure_closure.dart.invokeClosure_closure.call$0 (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:23475:41)
  at _IsolateContext.dart._IsolateContext.eval$1 (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:21246:25)
  at [object Object].dart._callInIsolate (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:20890:28)
  at dart.invokeClosure (/Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:22455:18)
  at /Users/traviskaufman/.atom/packages/dartlang/web/entry.dart.js:22476:18

Commands

     -8:14.3.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -8:12.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -7:16.3.0 core:select-all (atom-text-editor.editor.mini.is-focused)
  2x -7:14.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -5:30.7.0 core:select-all (atom-text-editor.editor.mini.is-focused)
  3x -5:29.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -5:18.2.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -5:17.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -5:06.4.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -5:04.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -4:14.4.0 application:open (atom-text-editor.editor.is-focused)
     -3:58.7.0 core:save (atom-text-editor.editor.is-focused)
  3x -1:34.7.0 dartlang:run-application-configuration (atom-text-editor.editor.is-focused)
     -1:14.3.0 core:copy (atom-notification.error.icon.icon-flame.native-key-bindings.has-detail)
  4x -0:59.9.0 dartlang:run-application-configuration (atom-text-editor.editor.is-focused)
     -0:00.6.0 core:backspace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "followSymlinks": false,
    "themes": [
      "one-dark-ui",
      "atom-monokai"
    ]
  }
}

Installed Packages

# User
atom-monokai, v0.9.4
dartlang, v0.4.12
linter, v1.9.1

# Dev
No dev packages
devoncarew commented 9 years ago

I think this can only occur when we're able to locate an SDK, but we have issues starting up the analysis server.

nmccready commented 9 years ago

This is correct and can be possibly closed. A better error would be missing SDK. Anyway installing the sdk via homebrew resolved this.

floitschG commented 9 years ago

Just ran into this too. I still don't know what to do... I'm guessing it's something with my setup, but a better message would definitely help.

devoncarew commented 9 years ago

I'll improve the messaging. You can verify which sdk the plugin is using by running the command 'show sdk info' (from atom's command pallette). We try to auto-detect the sdk. If we can't you can add a path manually in the plugin's settings.

You'll want a 1.13 SDK if possible, to capture a bunch of fixes in the analysis server.