Skip to content
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

3.0.0 beta javascript error on launch arm64 MacOS #4023

Closed
2 of 5 tasks
irmoodie opened this issue Jan 9, 2023 · 12 comments
Closed
2 of 5 tasks

3.0.0 beta javascript error on launch arm64 MacOS #4023

irmoodie opened this issue Jan 9, 2023 · 12 comments
Labels
bug A bug that affects the functionality of Zettlr.

Comments

@irmoodie
Copy link

irmoodie commented Jan 9, 2023

Description

Updated via the Update Zettlr function within the program, when trying to launch 3.0.0 beta I get the following error:

A JavaScript error occurred in the main process

Uncaught Exception:
Error: dlopen(/Applications/Zettlr.app/Contents/Resources/app.asar.unpacked/.webpack/main/native_modules/build/Release/Nodehun.node, 0x0001): tried: '/Applications/Zettlr.app/Contents/Resources/app.asar.unpacked/.webpack/main/native_modules/build/Release/Nodehun.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Zettlr.app/Contents/Resources/app.asar.unpacked/.webpack/main/native_modules/build/Release/Nodehun.node' (no such file), '/Applications/Zettlr.app/Contents/Resources/app.asar.unpacked/.webpack/main/native_modules/build/Release/Nodehun.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
at Module._extensions..node (node:internal/modules/cjs/loader:1226:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2049)
at Module.load (node:internal/modules/cjs/loader:1011:32)
at Module._load (node:internal/modules/cjs/loader:846:12)
at f._load (node:electron/js2c/asar_bundle:2:13328)
at Module.require (node:internal/modules/cjs/loader:1035:19)
at require (node:internal/modules/cjs/helpers:102:18)
at 19572 (/Applications/Zettlr.app/Contents/Resources/app.asar/.webpack/main/index.js:2:1152799)
at r (/Applications/Zettlr.app/Contents/Resources/app.asar/.webpack/main/index.js:2:2150899)

Downloading the Zettlr-3.0.0-beta-arm64.dmg from the github release page produces the same result.

Reproducing

Download Zettlr-3.0.0-beta-arm64.dmg, install and attempt to launch on an arm64 based Mac (I haven't tried other OSs)

Zettlr Version

Beta (if applicable)

Specify version

3.0.0

Installation Method

From the Website or GitHub

Your Platform

  • Windows
  • macOS
  • Linux

Architecture

  • Intel 64bit
  • ARM 64bit

Operating System Version

Ventura 13.1

Additional Information

image

@irmoodie irmoodie added the bug A bug that affects the functionality of Zettlr. label Jan 9, 2023
@nathanlesage
Copy link
Member

This looks as if the build pipeline has compiled the spellchecker library for the wrong architecture. I didn't encounter that same problem during the whole nightlies, so that's definitely odd.

I'm currently busy but tonight I'll have a look at what happened.

Feel free to also test out the most recent nightly release if that has the same problems. That helps me see where it might come from. You can find it here: https://nightly.zettlr.com

@irmoodie
Copy link
Author

irmoodie commented Jan 9, 2023

The most recent nightly gives the same error message:
Screenshot 2023-01-09 at 12 54 00
Also just to confirm, the latest stable release launches without issue.

Thanks for your help!

@nathanlesage
Copy link
Member

Alright, thanks for confirming. I'll have a look.

Until then, a mitigation would be to download the 64bit release (Intel 64); this should work fine, since it will pass everything through Rosetta.

@nathanlesage
Copy link
Member

@irmoodie I have now added a flag that may fix this issue, and scheduled a new nightly build.

Please follow the build process by following this link and wait until it is finished. Once it's done, you can find the new build on this page: https://nightly.zettlr.com. It's essentially the same program as the beta, except the one change I implemented. Please download it and try it out.

If this works as expected, please tell me, and then you can keep using the nightly until the next beta!

@Adafede
Copy link

Adafede commented Jan 10, 2023

@nathanlesage I face the same issue, downloaded the file at https://github.com/Zettlr/Zettlr/actions/runs/3877018579 and still got

Uncaught Exception:
Error: dlopen(/Applications/Zettlr.app/Contents/Resources/app.asar.unpacked/.webpack/main/native_modules/build/Release/Nodehun.node, 0x0001): tried: '/Applications/Zettlr.app/Contents/Resources/app.asar.unpacked/.webpack/main/native_modules/build/Release/Nodehun.node' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
at Module._extensions..node (node:internal/modules/cjs/loader:1226:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2049)
at Module.load (node:internal/modules/cjs/loader:1011:32)
at Module._load (node:internal/modules/cjs/loader:846:12)
at f._load (node:electron/js2c/asar_bundle:2:13328)
at Module.require (node:internal/modules/cjs/loader:1035:19)
at require (node:internal/modules/cjs/helpers:102:18)
at 19572 (/Applications/Zettlr.app/Contents/Resources/app.asar/.webpack/main/

(this is using the Zettlr-3.0.0-beta-arm64.dmg, the Zettlr-3.0.0-beta-x64.dmgworks fine! 😊 )

@nathanlesage
Copy link
Member

nathanlesage commented Jan 10, 2023

face the same issue, downloaded the file at https://github.com/Zettlr/Zettlr/actions/runs/3877018579 and still got

Did you download the darwin artifact and used the arm64 file inside there …? (I'm asking because the Windows runner keeps crashing, and hence the files have not been uploaded to the nightly release server …)

@Adafede
Copy link

Adafede commented Jan 10, 2023

Did you download the darwin artifact and used the arm64 file inside there …? (I'm asking because the Windows runner keeps crashing, and hence the files have not been uploaded to the nightly release server …)

Yes sorry, forgot to specify

@nathanlesage
Copy link
Member

Short update: After some more digging around, I'm getting closer to the issue. In general, it appears as if there is a simple fix to enabling the compilation of the modules for the correct architecture (literally re-installing all dependencies mid-way), but apparently, compiling ARM64 on an Intel architecture Windows machine is non-trivial, and I need all workflows to complete, as I can't just drop support for Windows ARM.

Therefore: It could be that fixing this issue takes a little bit more time, but as mentioned, installing the Intel releases on macOS with Apple Silicon is absolutely fine, and the performance impact should be relatively small.

If someone has experience compiling Electron stuff on one machine for two architectures, feel free to lend me a hand, otherwise I'll continue to search for a proper solution 😄

@nathanlesage
Copy link
Member

So, I think I got it fixed. I just downloaded one of the built ARM packages and it works without error on my own M1 Mac. (The Windows build is still broken, but that's a different issue!)

@AndrewRRM
Copy link

Is this the ARM package at https://github.com/Zettlr/Zettlr/releases/tag/v3.0.0-beta ? Still won't open on my M1, 2020 running 11.6.5. The Intel release works.

@irmoodie
Copy link
Author

So, I think I got it fixed. I just downloaded one of the built ARM packages and it works without error on my own M1 Mac. (The Windows build is still broken, but that's a different issue!)

Thank you! Also thank you for your work on Zettlr, I use it every day.

Is this the ARM package at https://github.com/Zettlr/Zettlr/releases/tag/v3.0.0-beta ? Still won't open on my M1, 2020 running 11.6.5. The Intel release works.

@AndrewRRM You can find it in the actions section here, at the bottom in Artifacts download darwin.zip and inside is the ARM build Zettlr-3.0.0-beta-arm64.dmg

@AndrewRRM
Copy link

@irmoodie Got it! Thanks, seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that affects the functionality of Zettlr.
Projects
None yet
Development

No branches or pull requests

4 participants