Electron app crashes on Windows 8 and Windows 7

I’m building an app using Electron with the purpose to notify a user by new orders from an E-commerce.

Basically, when some customer buy on the E-commerce, than it emits a notification to the store.

I am doing this with Websocket connection. The store log-in the API and then the API sends a socket event when a new order arrived.

On Windows 10, MacOS X and Linux it works as expected.

But when I test on Windows 8 and Windows 7, the app crashes in the first received notification.

I tried to run the project on Windows 8 with VSCode but it didn’t show any error. When I tried to debbug the crash with Visual Studio it drop an error

“Unhandled win32 exception”
and
“Access Violation reading location…”

I am not using the “Notification” class from Electron.

I created a Screen with the message and all the styling things which is hidden in the Tray. And when I receive a event from socket, I call

mainWindow.restore();
playSound();

The window isn’t restore and app crashes.

On Windows 8 I can see a message “The process stopped and a button ‘Exit program’ ” which terminates the process.

On Windows 7 it just crashes without any error.

Sorry about the missing details but everything is working unless this part of the program which fails maybe on restoring the window or maybe on receiving a event from socket, or maybe playing the sound.