Skip to content

Opening app.asar folder at startup #2055

Closed

Description

@danisztls

Description

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

Activity

  1. fxha commented on Apr 23, 2020

    @fxha
    Contributor

    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

    open the last window state

    This option is currently not implemented.

  2. added
    🐤 blocked/need info
    on Apr 23, 2020
  3. alerque commented on Apr 23, 2020

    @alerque
    Contributor

    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.

  4. alerque commented on Apr 23, 2020

    @alerque
    Contributor

    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.

  5. alerque commented on Apr 23, 2020

    @alerque
    Contributor

    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.

  6. fxha commented on Apr 23, 2020

    @fxha
    Contributor

    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?

  7. alerque commented on Apr 23, 2020

    @alerque
    Contributor

    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...

  8. fxha commented on Apr 24, 2020

    @fxha
    Contributor

    @alerque Thanks for your great work and the fast fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🐤 blocked/need info

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions