Skip to content

A JavaScript error occurred in the main process: Failed to set path #4705

Closed

Description

@bpasero
  • Electron version: 0.35.6
  • Operating system: Ubuntu 12.04

A user is complaining about the following issue when running VS Code from the command line:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Failed to set path
    at Error (native)
    at Object.<anonymous> (/opt/VSCode-linux-ia32/resources/atom.asar/browser/lib/init.js:120:7)
    at Object.<anonymous> (/opt/VSCode-linux-ia32/resources/atom.asar/browser/lib/init.js:132:4)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:130:18)
    at node.js:982:3

I think it originiates from https://github.com/atom/electron/blob/0e2ac2d80226c652042c2f8819b596876119d6bd/atom/browser/api/atom_api_app.cc#L311 but it is not clear to me under which condition this error can happen?

Activity

  1. zcbenz commented on Mar 8, 2016

    @zcbenz
    Contributor

    Electron needs to write to $XDG_CONFIG_HOME/APP_NAME, this error happens when users don't have permission to create or write to that directory.

  2. owenayres commented on May 12, 2016

    @owenayres

    Just like to leave my two cents incase anyone has the same issue and this does not solve it.

    I had this problem and the issue was because of special/not-allowed characters inside the name property of my app's package.json file.

    Inside my package.json file for my app (that is bundled with the app source), the name property had a colon inside it. This was causing this exact issue. Removing the colon from the name stopped this issue from happening and launched the app normally again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions