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 server error: Object not found: <top>" #8188

Closed
faxinwang opened this issue Dec 11, 2020 · 2 comments
Closed

"Extension server error: Object not found: <top>" #8188

faxinwang opened this issue Dec 11, 2020 · 2 comments

Comments

@faxinwang
Copy link

Describe the bug
when runing the quasar dev -m electron, it always reports:

[14564:1212/004403.341:ERROR:CONSOLE(1)] "Extension server error: Object not found: <top>", source: devtools://devtools/bundled/extensions/extensions.js (1)
[14564:1212/004404.073:ERROR:CONSOLE(1)] "Extension server error: Object not found: <top>", source: devtools://devtools/bundled/extensions/extensions.js (1)
[14564:1212/004405.072:ERROR:CONSOLE(1)] "Extension server error: Object not found: <top>", source: devtools://devtools/bundled/extensions/extensions.js (1)
[14564:1212/004406.423:ERROR:CONSOLE(1)] "Extension server error: Object not found: <top>", source: devtools://devtools/bundled/extensions/extensions.js (1)
...

it sames that this electron-userland/electron-webpack-quick-start#56 can solve it.

just a line of code.

@pdanpdan
Copy link
Collaborator

Please make a PR for this. Thank you.

@hawkeye64
Copy link
Member

hawkeye64 commented Dec 18, 2020

@faxinwang The fix will be in the next @quasar/app release, but that won't help existing Quasar/Electron apps.

Please update your electron-main.dev.js with the following code:

/**
 * This file is used specifically and only for development. It installs
 * `electron-debug` & `vue-devtools`. There shouldn't be any need to
 *  modify this file, but it can be used to extend your development
 *  environment.
 */

import electronDebug from 'electron-debug'
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
import { app, BrowserWindow } from 'electron'

app.whenReady().then(() => {
  // allow for a small delay for mainWindow to be created
  setTimeout(() => {
    // Install `electron-debug` with `devtron`
    electronDebug({ showDevTools: false })

    // Install vuejs devtools
    installExtension(VUEJS_DEVTOOLS)
      .then(name => {
        console.log(`Added Extension: ${name}`)
        // get main window
        const win = BrowserWindow.getFocusedWindow()
        if (win) {
          win.webContents.on('did-frame-finish-load', () => {
            win.webContents.once('devtools-opened', () => {
              win.webContents.focus()
            })
            // open electron debug
            console.log('Opening dev tools')
            win.webContents.openDevTools()
          })
        }
      })
      .catch(err => {
        console.log('An error occurred: ', err)
      })
  }, 250)
})

import './electron-main'

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

No branches or pull requests

3 participants