hashgraph / hedera-transaction-tool

Transaction tool application
Apache License 2.0
0 stars 0 forks source link

Building cross architecture application fails to create runnable app #1143

Closed jbair06 closed 2 days ago

jbair06 commented 3 days ago

Description

When creating the assets (.app, .dmg, or .pkg) for the application from an arm64 architecture for an x64 architecture, the resulting app does not run. And error indicating that the argon2 dependency inside the application is of type arm64, but the app is looking for the x64 build of the dependency.

Steps to reproduce

  1. Delete node_modules (to ensure a fresh build)
  2. pnpm install
  3. pnpm build:mac
  4. (Optional) run the x64 .dmg to install to the Applications folder
  5. run the x64 version of the app (in the applications folder if step 4, or in the release/Mac folder if not)

Additional context

Screenshot 2024-11-11 at 10 40 46 PM

Hedera network

other

Version

v0.4.1

Operating system

macOS

jbair06 commented 3 days ago

I was able to resolve the problem by changing the version of electron-builder to 25.1.8. I also needed to install python-setuptools (brew install python-setuptools). Part of the issue seemed to be that electron-builder wasn't building both versions of the argon2 dependency (and perhaps others).

After updating electron-builder, I could no longer build the app at all. The errors I was seeing appeared to indicate that the version of python that node-gyp was using in order to build the cross architecture dependencies was missing the distutils module. After installing python-setuptools, I was able to build a working app.

I don't know if the resulting app has any other issues.