jneubrand / pb-completions

An atom package for pebble c sdk completions.
MIT License
5 stars 0 forks source link

Uncaught TypeError: Cannot read property '1' of null #5

Open totalyundev opened 8 years ago

totalyundev commented 8 years ago

You've tried to push ubuntu fix, but something is still wrong.

  1. Fresh Ubuntu install
  2. fresh package install

After this error I've tried to change path to previous, but still an error. BTW thanks for your work!

Atom Version: 1.8.0 System: Ubuntu 16.04 Thrown From: pb-completions package, v1.4.1

Stack Trace

Uncaught TypeError: Cannot read property '1' of null

At /home/waclav/.atom/packages/pb-completions/lib/provider.js:50

TypeError: Cannot read property '1' of null
    at PbCompletionsProvider.init (/home/waclav/.atom/packages/pb-completions/lib/provider.js:50:41)
    at atom-workspace.<anonymous> (/home/waclav/.atom/packages/pb-completions/lib/pb-completions.js:102:14)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:260:29)
    at /opt/atom/resources/app.asar/src/command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/opt/atom/resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:183:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/opt/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (/opt/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:260:29)
    at /opt/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/opt/atom/resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/opt/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -6:33.6.0 pb-completions:force-reload-(including-documentation) (atom-text-editor.editor)
     -6:18.8.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -6:15.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -6:14.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -6:14.1.0 pb-completions:force-reload-(including-documentation) (atom-text-editor.editor)
     -1:05.6.0 command-palette:toggle (atom-text-editor.editor.is-focused)
  6x -1:02.8.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -1:00.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:00.9.0 pb-completions:force-reload-(including-documentation) (atom-text-editor.editor)
     -0:27.3.0 core:undo (a.stack-toggle)
     -0:05.7.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:04.8.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:04.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -0:01.5.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:01.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:01.2.0 pb-completions:force-reload-(including-documentation) (atom-text-editor.editor)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ]
  },
  "pb-completions": {}
}

Installed Packages

# User
atom-gdb, v0.4.0
build, v0.64.0
busy, v0.5.0
linter, v1.11.14
linter-gcc, v0.6.14
minimap, v4.24.6
pb-build, v1.2.0
pb-completions, v1.4.1
pb-run, v1.2.0
selection-highlight, v0.1.5

# Dev
No dev packages
jneubrand commented 8 years ago

What's your which pebble?

On Jun 24, 2016, at 11:58, totalyundev notifications@github.com wrote:

You've tried to push ubuntu fix, but something is still wrong.

Fresh Ubuntu install fresh package install After this error I've tried to change path to previous, but still an error. BTW thanks for your work! Atom Version: 1.8.0 System: Ubuntu 16.04 Thrown From: pb-completions package, v1.4.1

Stack Trace

Uncaught TypeError: Cannot read property '1' of null

At /home/waclav/.atom/packages/pb-completions/lib/provider.js:50

TypeError: Cannot read property '1' of null at PbCompletionsProvider.init (/home/waclav/.atom/packages/pb-completions/lib/provider.js:50:41) at atom-workspace. (/home/waclav/.atom/packages/pb-completions/lib/pb-completions.js:102:14) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:260:29) at /opt/atom/resources/app.asar/src/command-registry.js:3:61 at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/opt/atom/resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:183:32) at CommandPaletteView.module.exports.SelectListView.confirmSelection (/opt/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21) at space-pen-div.atom.commands.add.core:confirm (/opt/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:260:29) at /opt/atom/resources/app.asar/src/command-registry.js:3:61 at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16) at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22) at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/opt/atom/resources/app.asar/src/window-event-handler.js:98:36) at HTMLDocument. (/opt/atom/resources/app.asar/src/window-event-handler.js:3:61) Commands

 -6:33.6.0 pb-completions:force-reload-(including-documentation) (atom-text-editor.editor)
 -6:18.8.0 command-palette:toggle (atom-text-editor.editor.is-focused)
 -6:15.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
 -6:14.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
 -6:14.1.0 pb-completions:force-reload-(including-documentation) (atom-text-editor.editor)
 -1:05.6.0 command-palette:toggle (atom-text-editor.editor.is-focused)

6x -1:02.8.0 core:move-down (atom-text-editor.editor.mini.is-focused) -1:00.9.0 core:confirm (atom-text-editor.editor.mini.is-focused) -1:00.9.0 pb-completions:force-reload-(including-documentation) (atom-text-editor.editor) -0:27.3.0 core:undo (a.stack-toggle) -0:05.7.0 command-palette:toggle (atom-text-editor.editor.is-focused) -0:04.8.0 core:move-down (atom-text-editor.editor.mini.is-focused) -0:04.0 core:move-up (atom-text-editor.editor.mini.is-focused) -0:01.5.0 core:move-down (atom-text-editor.editor.mini.is-focused) -0:01.3.0 core:confirm (atom-text-editor.editor.mini.is-focused) -0:01.2.0 pb-completions:force-reload-(including-documentation) (atom-text-editor.editor) Config

{ "core": { "autoHideMenuBar": true, "themes": [ "atom-dark-ui", "solarized-dark-syntax" ] }, "pb-completions": {} } Installed Packages

User

atom-gdb, v0.4.0 build, v0.64.0 busy, v0.5.0 linter, v1.11.14 linter-gcc, v0.6.14 minimap, v4.24.6 pb-build, v1.2.0 pb-completions, v1.4.1 pb-run, v1.2.0 selection-highlight, v0.1.5

Dev

No dev packages — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

totalyundev commented 8 years ago

I think that I don't understand the question. What do You mean?

jneubrand commented 8 years ago

If you run the command "which pebble" in a terminal, what's the result? It should be some path.

On Jun 24, 2016, at 21:29, totalyundev notifications@github.com wrote:

I think that I don't understand the question. What do You mean?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

totalyundev commented 8 years ago

which pebble output: /home/USERNAME/pebble-dev/pebble-sdk-4.2-linux64/bin/pebble I've changed value in provider.js: previous: process.env['HOME'] + '/workspace/pebble/pebble-sdk/bin/pebble' now: process.env['HOME'] + '/workspace/pebble-dev/pebble-sdk/bin/pebble' and after restart got error: Cannot read property '1' of null

Package is after an update, so the line 23 is correct.

Thank You for your time. I am new to .js and it's quite confusing for me.

knoxyca commented 8 years ago

I seem to be getting this same error on Lubuntu 16.04. I was able to get it to load successfully by loading my .bash_profile file into my shell session (for whatever reason the terminal emulator isn't doing this...) and then launching atom through the console.

knoxyca commented 8 years ago

Following the instructions here: http://askubuntu.com/questions/500775/permanent-path-variable I added the Pebble tool to the path in .profile and now when I launch atom from anywhere this error is no longer occurring for me.