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
Electron - Packaged : Cannot read property 'stdout' of undefined #23
Comments
Yes, but unfortunately, I have no experience with that ASAR thing.
function run(callback){
child_process.execFile(bin, args)
.on('error', function(err){console.log('ERROR', err})
} repack, run and see what will appear in console?
|
Thank for the quick answer. I just look, win-ca is already unpack when I build with electron-builder. But the path for the executable is not good. At the top of the fallback.js, I used that to make it work : bin = path.join(__dirname, 'roots').replace('app.asar', 'app.asar.unpacked'); And I think a correct version for the run function can be : function run(callback){
child_process.execFileSync(bin, args);
callback();
} I just try it and I can make the application start the two changes. Thank a lot @ukoloff ! |
Oh, this explains a lot.
Sure, it will follow. But I want to see everything myself, there are too many complains concerning ASAR, I should understand it. |
I'm totally stuck with ASAR + Electron. I confirm that changing path to But I don't understand, how we get incorrect path. If whole Then, okay, And I have no idea how to debug all this. Developer tools are disabled. Is it possible to get Developer tools (in application packed with
Helas! This breaks So far I need more time to mess in the guts of Electron + ASAR. Be patient. please and help me with Developer Tools if you can. |
By the way, do you know how to force |
After some exploration, I think: creators of Electron, ASAR, electron-builder etc. over-Microsofted Microsoft itself! This may work (and it works) but such a nightmare should not exist. So, my only idea is to patch path to I believe it is a bug inside of asar's patch of For a long period I amazed the huge wave of criticism on every mention of Electron at one russian IT-site (habr.com to be certain). Now I understand them. It's really awful. Sorry, but I cannot afford supporting that. |
Thank you a lot for your time @ukoloff. I will check how I can fix my issue with all of that when I will have time. |
in package.json "asar": { |
i think this is the key |
Well, I added dummy callback for execFile. Meet v3.1.1!
вт, 27 окт. 2020 г. в 23:07, Felix Heidrich <notifications@github.com>:
… I am still forced to use an old Electron build (1.8.8) and I am running
into this issue with win-ca 3.3.0. The problem appears to simply be that
the asar modified execFile version (from node 8.2.1) does not like the
callback to be undefined -- it's optional, wtf. In case it still helps
someone, here is an ugly monkey patch:
const child_process = require('child_process');
const origExecFile = child_process.execFile;
child_process.execFile = function(bin, args, callback) {
if (callback === undefined) {
callback = () => {}
}
origExecFile(bin, args, callback);
}
const ca = require('win-ca');
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#23 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAROH6EZ4YET7DRUHGLA4XLSM4D6LANCNFSM4IBRHBTA>
.
--
Удачи!
=Стас
|
Hi @ukoloff !
I have an issue with Electron. When I packaged the application and launch it, I have this error :
I just import it on the main thread with :
import 'win-ca';
I use :
Electron : 4.0.2
Electron-builder : 20.43.0
win-ca : 3.1.0
Can you help me with that ?
If you want any other information, tell me !
The text was updated successfully, but these errors were encountered: