Assistance packaging for system-provided electron

Hello,

I apologize if this is the wrong place to ask this, and I also understand if this is something you do not wish to support.

I recently took over maintaning a package on the Arch User Repository that has Anytype using the system’s native electron package.

I originally did this because the maintainer of the main Anytype-bin package tends to lag by a little behind updates, and, well, I wanted my updates now!

When I took over this package, it was an orphan, and the original maintainer hadn’t bumped updates for somewhat longer than the main package. Originally, all I had to do was bump the version for the download, and it worked. However, the last couple of updates have introduced an error. I do not know much about electron packaging, and would never have known how to package this by myself, but regardless of that I am the maintainer now and it doesn’t sit well with me to leave a broken package up.

You can see the PKGBUILD and related here: AUR (en) - anytype-electron-bin

The error I am experiencing is this:

[Server] Process start error:  Error: spawn ENOTDIR
(node:550295) UnhandledPromiseRejectionWarning: Error: spawn ENOTDIR
    at ChildProcess.spawn (node:internal/child_process:414:11)
    at Object.spawn (node:child_process:784:9)
    at /opt/Anytype/resources/app.asar/electron/js/server.js:34:29
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:550295) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:550295) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'on')
    at /opt/Anytype/resources/app.asar/electron/js/server.js:43:13
(node:550295) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
[ConfigManager].init: {
  channel: 'latest',
  theme: 'dark',
  languages: [],
  zoom: 4,
  debug: { th: false },
  interfaceLang: 'en-US',
  hideMenuBar: false
}
(node:550295) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)

I unsuccessfully tried troubleshooting this, the only relevant thing I found was this git issue: Allow ASAR to work with `child_process.spawn()` · Issue #9459 · electron/electron · GitHub . I tried the proposed fix in this comment but I guess I don’t understand how to apply it, or it doesn’t apply here.

I am basically writing this to ask for guidance on how to troubleshoot further, or if you’ve any idea of a fix.

If you don’t wish to/are unable to offer guidance on this, I will probably give the original maintainer a courtesy email and submit the package for deletion. I’ll probably ask the maintainer of the other one if they will let me co-maintain, so I can bump versions with less delay. I guess I could also look into providing a -git package that builds from source, as an alternative.

Thank you as always!

Hey, have you posted this on GitHub already?

This topic was automatically closed after 11 days. New replies are no longer allowed.