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
No matter what setting I choose: "open the last window state", "open the default directory" or "open a blank page" it will always open the directory app.asar in a standalone window. Is that supposed to be the blank page?
Versions
Mark Text: v0.16.1 (3a6182b)
Node.js: 12.13.0
Electron: 8.2.3
Chromium: 80.0.3987.163
OS: Linux x64 5.4.33-3-MANJARO
Thank you for taking the time to report the issue. Unfortunately, we cannot reproduce this issue with our official build. You installed Mark Text via AUR, right? Then it's most likely an issue there because they bundle Mark Text against system Electron that may cause issues like this but also with spell checker dictionaries (resources are corrupted) or file search (#2054). Otherwise please provide some steps to reproduce the issue. Please try to verify the issue by downloading binaries from GitHub releases.
I am able to replicate this, and it seems to be happening not because of the system Electron issue but because I'm actually using a newer version of Electron than upstream recommends. I'll look into it.
Please feel free to assign this issue to me so I don't loose track of it.
I take that back about Electron versions, I was thinking of a different project. Both the upstream spec and Arch package are using Electron 8. There is a minor version difference (8.1 vs. 8.2) but that shouldn't produce such completely different behavior. It's probably related to launching in a wrapper script instead of calling the Electron bundle directly. I'm still looking into this.
I think this is actually going to need to be fixed in Marktext itself, not in packaging. Somehow arguments are being processed in a raw fashion rather than using the ones Electron passes in. I'm not sure on the specifics of how Electron implements this, but I know other apps don't have this problem so there must be a way to do it. The difference is between running marktoxt <inputs> where marktext is a combined Electron+app image, and our case on Arch where we use a wrapper to launch electron /path/to/marktext/app.asar <inputs>. Maktext is processing arguments probably with hard coded numbers $0 being the executed app and assuming $1 is user input. this is not always the case. I think Electron must have a way of passing whatever arguments it didn't consume itself on to the app.
Yeah that's right, we parse all strings except the first one. Might it be possible to you add a patch to skip the first two parameter before rebuild Mark Text?
Okay I've patched that. I don't think it's the right long term solution — I'm pretty sure there must be an official way to handle this. But it does at least make it possible to solve most of the described issue. The always opening up a window with "app.asar" as the open file is fixed, and the Arch Linux packages with 0.16.1-6 package release are published with the fix.
This issue can be closed, but I'm going to have to open up a new one for...
Activity
fxha commentedon Apr 23, 2020
Thank you for taking the time to report the issue. Unfortunately, we cannot reproduce this issue with our official build. You installed Mark Text via AUR, right? Then it's most likely an issue there because they bundle Mark Text against system Electron that may cause issues like this but also with spell checker dictionaries (
resources are corrupted) or file search (#2054). Otherwise please provide some steps to reproduce the issue. Please try to verify the issue by downloading binaries from GitHub releases./cc @alerque
This option is currently not implemented.
alerque commentedon Apr 23, 2020
I am able to replicate this, and it seems to be happening not because of the system Electron issue but because I'm actually using a newer version of Electron than upstream recommends. I'll look into it.
Please feel free to assign this issue to me so I don't loose track of it.
alerque commentedon Apr 23, 2020
I take that back about Electron versions, I was thinking of a different project. Both the upstream spec and Arch package are using Electron 8. There is a minor version difference (8.1 vs. 8.2) but that shouldn't produce such completely different behavior. It's probably related to launching in a wrapper script instead of calling the Electron bundle directly. I'm still looking into this.
alerque commentedon Apr 23, 2020
I think this is actually going to need to be fixed in Marktext itself, not in packaging. Somehow arguments are being processed in a raw fashion rather than using the ones Electron passes in. I'm not sure on the specifics of how Electron implements this, but I know other apps don't have this problem so there must be a way to do it. The difference is between running
marktoxt <inputs>where marktext is a combined Electron+app image, and our case on Arch where we use a wrapper to launchelectron /path/to/marktext/app.asar <inputs>. Maktext is processing arguments probably with hard coded numbers$0being the executed app and assuming$1is user input. this is not always the case. I think Electron must have a way of passing whatever arguments it didn't consume itself on to the app.fxha commentedon Apr 23, 2020
Yeah that's right, we parse all strings except the first one. Might it be possible to you add a patch to skip the first two parameter before rebuild Mark Text?
alerque commentedon Apr 23, 2020
Okay I've patched that. I don't think it's the right long term solution — I'm pretty sure there must be an official way to handle this. But it does at least make it possible to solve most of the described issue. The always opening up a window with "app.asar" as the open file is fixed, and the Arch Linux packages with
0.16.1-6package release are published with the fix.This issue can be closed, but I'm going to have to open up a new one for...
fxha commentedon Apr 24, 2020
@alerque Thanks for your great work and the fast fix.