You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m developing an application with a React front end and an Express back end, packaged with Electron v35.0.3 and electron-builder v24.3.0.
Currently, I have : "asar": false in my build configuration because I keep running into issues with my upload routes (front → back). I’m also embedding ADB via adbkit directly in the server, which requires elevated permissions when running the resulting .exe.
With asar: false, everything works—but all files remain fully accessible, and I’d like to re-enable ASAR for better security and packaging. However, when I set "asar": true and rebuild, I consistently get HTTP 500 errors on /upload, and it seems certain server-linked components (like adbkit) stop working entirely: they no longer prompt for admin rights and no longer detect USB connections—yet the same code works perfectly with ASAR disabled.
I would greatly appreciate any advice on:
How to configure ASAR (and any necessary unpack/unpack-smart rules) so that my Express upload routes and adbkit integration continue to function without reverting to "asar": false.
Best practices for embedding native dependencies (ADB) in an Electron + Express build that requires admin permissions on Windows.
Please let me know if you need more details on my configuration or any error logs.
You might need to leverage extraFiles or extraResources for some of your assets, as my guess is that having them all embedded in the asar is causing the issue. Alternative route is to use asarUnpack but I don't know your repo setup/hierarchy to provide any additional insight there. Utilizing asarUnpack would have the files accessible as OS executables, versus I think not being able to do so from within the asar? Not sure tbh, but a minimum repro repo or a link to your project would help!
Hello,
I’m developing an application with a React front end and an Express back end, packaged with Electron v35.0.3 and electron-builder v24.3.0.
Currently, I have :
"asar": false
in my build configuration because I keep running into issues with my upload routes (front → back). I’m also embedding ADB via adbkit directly in the server, which requires elevated permissions when running the resulting .exe.With asar: false, everything works—but all files remain fully accessible, and I’d like to re-enable ASAR for better security and packaging. However, when I set "asar": true and rebuild, I consistently get HTTP 500 errors on /upload, and it seems certain server-linked components (like adbkit) stop working entirely: they no longer prompt for admin rights and no longer detect USB connections—yet the same code works perfectly with ASAR disabled.
I would greatly appreciate any advice on:
How to configure ASAR (and any necessary unpack/unpack-smart rules) so that my Express upload routes and adbkit integration continue to function without reverting to "asar": false.
Best practices for embedding native dependencies (ADB) in an Electron + Express build that requires admin permissions on Windows.
Please let me know if you need more details on my configuration or any error logs.
Current electron-builder configuration
{
"build": {
"appId": "x",
"directories": {
"output": "dist"
},
"files": [
"udpDevices.json",
"server.js",
"main.js",
"",
"client/build/**/",
"/*",
"!dist//*"
],
"asar": false,
"win": {
"target": "dir",
"icon": "build/icon.ico",
"compression": "store"
}
}
}
Best regards,
Wolphen
The text was updated successfully, but these errors were encountered: