Electron fix "ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command"

Do a test,

electron /path/to/the/app [You will get that Error]

Try

electron --disable-gpu /path/to/the/app [You mayn't get that Error]

The fix was to add "--disable-gpu" to the command-line to force the web view not to use gpu features. I was able to accomplish this in an electron app by editing the package.json file in app root and changing the line like "start": "electron ." to "start": "electron . --disable-gpu"

Refer https://github.com/electron/electron/issues/7834#issuecomment-275802528


Based on Sudhakar RS answer , I made a script in my package.json to not use GL

here is my package.json

{
  ...
  "scripts": {
    "start": "electron --disable-gpu .", // --disable GL ERROR and use CPU
    ...
  }
 ...

}

Then in your terminal run

npm run start

Tags:

Electron