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 AssertionError: true === false with Atom 1.0.2 upgrade #17

Closed
gilbox opened this issue Jul 8, 2015 · 18 comments
Closed

Uncaught AssertionError: true === false with Atom 1.0.2 upgrade #17

gilbox opened this issue Jul 8, 2015 · 18 comments

Comments

@gilbox
Copy link

gilbox commented Jul 8, 2015

Since upgrading atom today I'm getting this error all the time.

Uncaught AssertionError: true === false

/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:774
Hide Stack Trace
AssertionError: true === false
  at Def.Dp.bases (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babel-core/node_modules/ast-types/lib/types.js:408:12)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/patch.js:45:26)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/util.js:21:1)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/transformation/file/options/parsers.js:16:13)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/transformation/file/options/index.js:13:16)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/transformation/file/index.js:15:16)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/transformation/plugin.js:37:13)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/transformation/transformer.js:11:15)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/transformation/file/plugin-manager.js:15:20)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/transformation/pipeline.js:11:26)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/transformation/index.js:11:17)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/api/node.js:22:23)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/index.js:1:80)
  at Module._compile (module.js:452:26)
  at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Transpiler.transpile (/Users/gbirman/.atom/packages/language-babel/lib/transpiler.coffee:37:15)
  at /Users/gbirman/.atom/packages/language-babel/lib/babel-transpiler.coffee:17:21
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:996:20)
  at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:978:19)
  at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:579:26)
  at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:535:18)
  at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:518:19)
  at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:592:35)
  at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:311:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:177:20)

The error was thrown from the language-babel package. You can help by creating an issue. Please explain what actions triggered this error.
Create issue on the language-babel package
@gandm
Copy link
Owner

gandm commented Jul 9, 2015

language-babel v0.10.0, babel 5.6.15 and atom 1.0.2 work for me. spec tests are also working on WIndows and OSX.

What version of language-babel and babel-core do you have? babel-core version can be found in package.json at /Users/gbirman/.atom/packages/language-babel/node_modules/babel-core, language-babel version is in settings. AI also need the config.cson for atom ( in particular the language-babel properties ) as it could be a combination of flags.

@gandm
Copy link
Owner

gandm commented Jul 9, 2015

I also need any .babelrc files that may be in any source file path directories.

@stephanebachelier
Copy link

Same error for me:

$ apm -v
apm  1.0.1
npm  2.5.1
node 0.10.35
python 2.7.6

Also:
atom 1.0.2
language-babel@0.10.0
babel-core 5.6.15

In config.cson:

"language-babel": {}

FYI the error is thrown on every JS file even if it is es5.

For now I've disabled babel transpilation when no .babelrc file is present which works for me as I don't use es6 in my current project.

So I've updated my config.cson to

"language-babel":
  disableWhenNoBabelrcFileInPath: true

@gandm
Copy link
Owner

gandm commented Jul 9, 2015

I can't recreate this. The stack trace indicates the issue is deep inside babel-core and not within atom or language-babel. But something very weird is happening.

AssertionError: true === false
at Def.Dp.bases (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babel-core/node_modules/ast-types/lib/types.js:408:12)
at Object. (/Users/gbirman/.atom/packages/language-babel/node_modules/babel-core/lib/babel/patch.js:45:26)
at Module._compile (module.js:452:26)

The above stack trace shows babel-core under language-babel/node_modules is requiring a module from atom's version of babel-core. The only reason I can think this is happening is if node has cached the ast-types module from a previous use of a file that contains a "use babel" statement. Atom also ships babel-core; but at version 5.1.11; this would be total incompatible with the version I ship!!!

@gandm
Copy link
Owner

gandm commented Jul 9, 2015

Do any atom packages you use do a dynamic compile by using "use babel"?

@gilbox
Copy link
Author

gilbox commented Jul 9, 2015

I'm not exactly sure what you mean by use babel. My project has a gulpfile.js that looks like this.

require("babel/register");
require('./gulpfile.es6');

However, I actually have not had any more errors after restarting atom a few times yesterday.

Thanks so much for your comments. It will help me try to debug this. I'll let you know if it comes up again.

@gandm
Copy link
Owner

gandm commented Jul 9, 2015

@gilbox Thanks for that. I'm pretty sure it's because the package wasn't quite updated completely when you tried to save and we were using a version of ast-types provided by atom that was incompatible. Provided the package was completely updated a reload of Atom would fix the issue.

@stephanebachelier Do you still have an issue?

@gandm gandm closed this as completed Jul 12, 2015
@ezsper
Copy link

ezsper commented Jul 22, 2015

I'm getting this error too.

Node version v0.12.7
Atom 1.0.2
Only with Nuclide package installed with nuclide-remote-projects

AssertionError: true === false
at Def.Dp.bases (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\node_modules\ast-types\lib\types.js:408:12)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\patch.js:45:26)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\util.js:21:1)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\transformation\file\options\parsers.js:16:13)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\transformation\file\options\index.js:13:16)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\transformation\file\index.js:15:16)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\transformation\plugin.js:37:13)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\transformation\transformer.js:11:15)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\transformation\file\plugin-manager.js:15:20)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\transformation\pipeline.js:11:26)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\transformation\index.js:11:17)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\lib\babel\api\node.js:22:23)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\babel-core\index.js:1:80)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at transpile (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\src\babel.js:126:15)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object. (C:\Users\ezsper.atom\packages\nuclide-flow\node_modules\nuclide-client\node_modules\nuclide-service-transformer\lib\main.js:13:38)
at Module._compile (module.js:452:26)
at Object.loadFile as .js
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at createRemoteService (C:\Users\ezsper.atom\packages\nuclide-flow\node_modules\nuclide-client\lib\service-manager.js:127:19)
at getService (C:\Users\ezsper.atom\packages\nuclide-flow\node_modules\nuclide-client\lib\service-manager.js:117:27)
at Object.getServiceByNuclideUri (C:\Users\ezsper.atom\packages\nuclide-flow\node_modules\nuclide-client\lib\service-manager.js:86:10)
at getServiceByNuclideUri (C:\Users\ezsper.atom\packages\nuclide-flow\lib\main.js:13:36)
at Object.getSuggestions (C:\Users\ezsper.atom\packages\nuclide-flow\lib\main.js:48:14)
at C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:255:56
at Array.forEach (native)
at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:234:17)
at AutocompleteManager.getSuggestionsFromProviders (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:3:61)
at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:221:19)
at C:\Users\ezsper\AppData\Local\atom\app-1.0.2\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:3:61

@ezsper
Copy link

ezsper commented Jul 22, 2015

The problem seams to occur with nuclide-flow with language-babel, so I disabled nuclide-flow, now I'm not getting the error anymore, but I'm getting the following error when I save a js file:

"Failed to save remote file: Maximum call stack size exceeded"

It only stop occurring when I disable the language-babel pack, I didn't test this on local file, this is happening with me when editing a remote file with nuclide-remote-projects.

@ezsper
Copy link

ezsper commented Jul 22, 2015

My remote project babelrc has the following:

{
  "stage": 0,
  "loose": "all"
}

@ezsper
Copy link

ezsper commented Jul 22, 2015

I could manage to stop the error: "Failed to save remote file: Maximum call stack size exceeded" by disabling the "Transpile On Save" option in the language-babel package settings.

@gandm
Copy link
Owner

gandm commented Jul 22, 2015

On holiday at the moment but I'll investigate when I return. Are you using Nuclide's remote file option or some other system?

@gandm gandm reopened this Jul 22, 2015
@ezsper
Copy link

ezsper commented Jul 22, 2015

Just nuclide remote

@gandm
Copy link
Owner

gandm commented Jul 24, 2015

@ezsper OK I can't test this as I don't use OSX for dev. Nuclide doesn't support Windows fully e.g. Nuclide remote requires Watchman which isn't available for Windows, nor is Flow supported on Windows. I notice from the stack trace that you use Windows so I don't know how you got it working.

@ezsper
Copy link

ezsper commented Jul 24, 2015

My remote server is Linux and I have the nuclide server, flow and watchman installed and running there. As far as I know, I don't need to install these in any of my local machine as well, being WIndows, Linux or OSX. Nuclide-remote-projects do a bridge between my local Atom running app on Windows to the Nuclide Server installed on my Linux dev server. So I don't see any incompatibility.

@gandm
Copy link
Owner

gandm commented Jul 24, 2015

ok i'll config my Ubuntu server and try to test this.

@gandm
Copy link
Owner

gandm commented Sep 16, 2015

@ezsper I can't seem to recreate the problem. Do you still have it or are you not using language-babel?

@ezsper
Copy link

ezsper commented Sep 18, 2015

Sorry, I really don't know anymore, I was having problems with a couple of other packages with Nuclide and right now, I'm just using es6-javascript package instead and it's working for me. I'm reactivating your package, I'll report if I still get any problems with Nuclide.

@gandm gandm removed the Investigate label Sep 22, 2015
@gandm gandm closed this as completed Sep 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants