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

JavaScript Error: TMP.NODE was prevented from running #7735

Open
2 tasks done
devsides opened this issue Feb 28, 2025 · 1 comment
Open
2 tasks done

JavaScript Error: TMP.NODE was prevented from running #7735

devsides opened this issue Feb 28, 2025 · 1 comment
Labels
bug Windows Issues related to Windows

Comments

@devsides
Copy link

devsides commented Feb 28, 2025

Is it a bug?

  • I know this is an issue with the app, and contacting Mullvad support is not relevant.

I have checked if others have reported this already

  • I have checked the issue tracker to see if others have reported similar issues.

Current Behavior

JavaScript Error:
Program was blocked from running by group policy.

Image

Expected Behavior

Should run...

Steps to Reproduce

I was able to replicate this on another Windows 11 system.

  1. Enable AppLocker:
    gpedit.msc > Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Application Control Policies > AppLocker
  2. Add default rules:
    Right click on each and create default rules for all (Executables, Windows Installer, Script, Dll and Packaged app rules).
  3. Enforce:
    Right click AppLocker > Properties > Check "Configured" and select "Enforce rules" for all.
  4. Run app > Error.

  1. In the properties change DLL rules from "Enforce rules" to "Audit only".
  2. Run app > Warning in Windows Event Viewer:
    Event Viewer > Applications and Services Logs > Microsoft > Windows > AppLocker > EXE and DLL:
    %OSDRIVE%\USERS...\APPDATA\LOCAL\TEMP....TMP.NODE was allowed to run but would have been prevented from running if the AppLocker policy were enforced.

Failure Logs

%OSDRIVE%\USERS\...\APPDATA\LOCAL\TEMP\....TMP.NODE was prevented from running.

Operating system version

Windows 11

Mullvad VPN app version

2025.4.0.0

Additional Information

Admin prevents executables from running in the Temp folder for "malware prevention" and "attack surface reduction".
Software is installed in the program files folder and there are publisher specific rules enabled for updates.
I can install but not run the new version (2025.4.0.0).
Previous versions installed and ran without issue.

@devsides devsides added the bug label Feb 28, 2025
@hulthe hulthe added the Windows Issues related to Windows label Mar 3, 2025
@devsides
Copy link
Author

devsides commented Mar 7, 2025

I found the same issue identified in other apps.
It seems you need to add "asarUnpack": "**\*.node" to the electron-builder configuration so that the <guid>.tmp.node modules are unpacked next to the executable.


Ref:
https://forum.obsidian.md/t/tmp-node-files-malware-alarm/4743

brave/browser-laptop#12534

"When you spawn a child process from a file within an asar container, Windows copies it to a temp folder to be executed because it can't run it from within the container."

"the electron-builder smartUnpack function was detecting things like the ssh2 module and correctly putting it in /resources/app.asar.unpacked/, but not sqlite3. On each run, the executable file was copied out of the asar and put into %appdata%/Local/Temp as .tmp.node."

"In our case, adding "asarUnpack": "**\*.node", to the electron-builder configuration adds the sqlite3 module to the unpacked folder and the temp file is no longer created on each run."

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

No branches or pull requests

2 participants