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

Extension name is returned as undefined (Vue) #5

Closed
haltcase opened this issue Jun 23, 2016 · 7 comments
Closed

Extension name is returned as undefined (Vue) #5

haltcase opened this issue Jun 23, 2016 · 7 comments
Labels

Comments

@haltcase
Copy link

installExtension's promise resolution returns name as undefined, at least for the Vue devtools. This is on the latest 1.1.4 installer / 1.2.4 electron combo, using the exported Vue ID method.

I'm not entirely sure why either, electron returns it from addDevToolsExtension which pulls it from the extension's manifest.json name field. I checked the manifest and it has a valid name field, also confirmed by the fact that electron will log a message Attempted to load extension "Vue.js devtools" that has already been loaded. so it does have the name.

My guess is it either has something to do with async which I'm very new to, or that addDevToolsExtension returns differently depending on context ( remote or not ).

Recreate:

import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer';

installExtension(VUEJS_DEVTOOLS)
  .then(name => console.log(`Added Extension:  ${name}`));

// -> Added Extension: undefined
@MarshallOfSound
Copy link
Owner

Is this from the main process or the renderer process?

@MarshallOfSound
Copy link
Owner

Also, although it returns undefined, does it correctly add the extension?

@haltcase
Copy link
Author

Main process, and it adds the extension just fine.

@MarshallOfSound
Copy link
Owner

I can't replicate the undefined issue.

// This method will be called when Electron has finished
  // initialization and is ready to create browser windows.
  app.on('ready', () => {
    installExtension.default(installExtension.VUEJS_DEVTOOLS)
      .then((name) => {
        console.log('Added: ', name);
        mainWindow = new BrowserWindow();
        mainWindow.openDevTools();

        mainWindow.center();

        // and load the index.html of the app.
        mainWindow.loadURL(`http://todomvc.com/examples/react`);

        // Emitted when the window is closed.
        mainWindow.on('closed', () => {
          // Dereference the window object, usually you would store windows
          // in an array if your app supports multi windows, this is the time
          // when you should delete the corresponding element.
          mainWindow = null;
        });
      })
      .catch((err) => console.log('An error occurred: ', err));
  });

Can you post minimum sample code that causes the issue

@haltcase
Copy link
Author

Sure I'll try to narrow it down when I get some time.

@MarshallOfSound
Copy link
Owner

@citycide Any update on this?

@MarshallOfSound
Copy link
Owner

Closing due to lack of response / updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants