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]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
Then in your terminal run
I had the same error running electron-quick-start but not when running electron-boilerplate.
Investigating the error I found this question and for me also, starting with "electron --disable-gpu ." prevents the error message. But I didn't have to do that with electron-boilerplate. So, comparing the two I traced the difference to the inclusion of electron-debug in electron-boilerplate and, ultimately, to this: process.stderr.fd.
Thus far, the minimal change I have found sufficient to avoid the error is:
So, now I am trying to understand what
process.stderr.fd;
does and how it prevents the error message from appearing. It seems odd that merely getting the file descriptor of stderr would prevent the error but evidently it does.I am also curious about the relative merits of disabling the GPU Vs getting the file descriptor.
edit: it is sufficient to get the stream with
process.stderr;
it is not necessary to get the file descriptor.My solution for issue: "dev": ".electron-vue/dev-runner.js --disable-gpu"