I recently stepped down my electron application removed knex
and sqlite
since it was painfully complicated to creating a rebuild on windows also when i made an executable for windows sqlite
database didn't seem to work. Linux executable worked fine with sqlite
guessing the same with mac.
To use sqlite
i had rebuilt the application using electron-rebuild
. In order to clear the rebuild i did rm -rf node_modules && npm install
I have eventually decided to use IndexDB using dexie
.
However now when i try to run my program from npm i get
ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
How do i fix this, why is it happening ?
NB: The application works just fine but this error i the terminal is just annoying and i have no idea why its happenning
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With