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

[Bug]: Desktop app on macOS budget loading error #2705

Closed
2 tasks done
Stryd3r opened this issue May 4, 2024 · 56 comments · Fixed by #2715
Closed
2 tasks done

[Bug]: Desktop app on macOS budget loading error #2705

Stryd3r opened this issue May 4, 2024 · 56 comments · Fixed by #2715
Labels
bug Something isn't working

Comments

@Stryd3r
Copy link

Stryd3r commented May 4, 2024

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

I successfully downloaded the desktop app on my Mac and when I connect to my fly.io account and load the budget I’m getting an error. Errors are “We had an unknown problem opening “My Finance dcb1c51” and I’m also unable to browse to the exported .json file. Occasionally I’m also getting the “something went wrong trying to download that file error”.

Additional information:
I’m facing this issue on- Client version: v24.5.0
Server version: v24.5.0

Screenshots attached.
Image 04-05-2024 at 1 00 AM
IMG_4405

Where are you hosting Actual?

Fly.io

What browsers are you seeing the problem on?

Safari

Operating System

Mac OSX

@Stryd3r Stryd3r added the bug Something isn't working label May 4, 2024
@cjtodaro
Copy link

cjtodaro commented May 4, 2024

I'm having the same issue. Trying to run desktop app on MacOS 14.4.1. ActualBudget hosted on unRAID 6.12.8

The error message file name doesn't match the budget file I'm trying to open either.

Screenshot 2024-05-04 at 2 22 46 PM

@FeralFlora
Copy link

I have a similar issue on Windows 11, but in my case, the download load screen just goes on forever:
Actual_31mGsjDGZP

My Actual server is hosted on Pikapods, and the server version is 24.4.

@lukebouch
Copy link

I'm having the same issue.

@moobaabaa
Copy link

moobaabaa commented May 5, 2024

Same with desktop app. Browser access works fine.

Actual

Self-hosted (local)
Apple M1 Mac mini
Sonoma 14.1.1

@youngcw
Copy link
Member

youngcw commented May 6, 2024

Can someone try out the build available here and confirm if its working for you or not? https://github.com/actualbudget/actual/actions/runs/8971187425?pr=2715

It should fix the loading issue. You will need to download the file listed as "actual-electron-macos-latest". That is a zip file that contains the desktop app.

@cjtodaro
Copy link

cjtodaro commented May 6, 2024

Can someone try out the build available here and confirm if its working for you or not? https://github.com/actualbudget/actual/actions/runs/8971187425?pr=2715

It should fix the loading issue. You will need to download the file listed as "actual-electron-macos-latest". That is a zip file that contains the desktop app.

That fixed it for me!

@moobaabaa
Copy link

Excellent! Thanks for the updated file. Works for me.

@psybers
Copy link
Contributor

psybers commented Jun 5, 2024

This seems to be broken again.

@MatissJanis
Copy link
Member

Ok, so I'm really confused. Building the desktop app locally works just fine. Building the same source via CI/CD - creates a broken build.

Code signing and other things are all turned off. So I'm really lost as to what is going on which makes it very hard to debug and patch the issue.

@youngcw
Copy link
Member

youngcw commented Jun 5, 2024

@MatissJanis Could you upload a good working build to the release? That way people can use it while we try to determine why the autobuild is broken.

@MatissJanis
Copy link
Member

Good idea. Uploaded my local build to the release as a temporary solution: https://github.com/actualbudget/actual/releases/tag/v24.6.0

@MatissJanis
Copy link
Member

MatissJanis commented Jun 5, 2024

@youngcw had a brilliant idea: the issue might have to do with the Github CI runners.

Here's a CI job that was building a working artefact: https://github.com/actualbudget/actual/actions/runs/8971187425/attempts/1

So I re-ran the same exact job and it failed: https://github.com/actualbudget/actual/actions/runs/8971187425/attempts/2

This points to the issue being in the runner. Now we just need to figure out what changed and how to change it back.

@psybers
Copy link
Contributor

psybers commented Jun 6, 2024

@MatissJanis I would guess the issue is the non-pinned OS version:

The passing run:

Operating System
  macOS
  14.4.1
  2[3](https://github.com/actualbudget/actual/actions/runs/8971187425/job/24636381309#step:1:3)E224
Runner Image
  Image: macos-1[4](https://github.com/actualbudget/actual/actions/runs/8971187425/job/24636381309#step:1:4)-arm64
  Version: 20240422.3
  Included Software: https://github.com/actions/runner-images/blob/macos-14-arm[6](https://github.com/actualbudget/actual/actions/runs/8971187425/job/24636381309#step:1:7)4/20240422.3/images/macos/macos-14-arm64-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240422.3

and the failing run:

Operating System
  macOS
  14.5
  2[3](https://github.com/actualbudget/actual/actions/runs/8971187425/job/25863389615#step:1:3)F79
Runner Image
  Image: macos-1[4](https://github.com/actualbudget/actual/actions/runs/8971187425/job/25863389615#step:1:4)-arm64
  Version: 20240[6](https://github.com/actualbudget/actual/actions/runs/8971187425/job/25863389615#step:1:7)03.1
  Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240603.1/images/macos/macos-14-arm64-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240603.1

What exactly changed in macOS that is causing the issue, I do not know. But other than that, and the fact the artifact size is slightly different, I do not spot any differences in the logs of the two runs.

@MatissJanis
Copy link
Member

Any ideas how to pin to a specific runner version?

@youngcw
Copy link
Member

youngcw commented Jun 6, 2024

Looks like we can only pin to major versions so even if we specified macos-14 we would probably still have the same issue

@youngcw
Copy link
Member

youngcw commented Jun 6, 2024

Maybe this project could help. https://github.com/pd4d10/debugtron

@psybers
Copy link
Contributor

psybers commented Jun 6, 2024

Any ideas how to pin to a specific runner version?

AFAIK you can not. You can only select major release, e.g. -13 or -14 instead of -latest.

@psybers
Copy link
Contributor

psybers commented Jun 6, 2024

I used the debugtron and see this when opening a local file:

[Exception] Error: dlopen(/var/folders/gf/vvdfvl3939lgvrcnb11djrgsxvgdnv/T/.com.actualbudget.actual.hUXpBS, 0x0001): tried: '/var/folders/gf/vvdfvl3939lgvrcnb11djrgsxvgdnv/T/.com.actualbudget.actual.hUXpBS' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/var/folders/gf/vvdfvl3939lgvrcnb11djrgsxvgdnv/T/.com.actualbudget.actual.hUXpBS' (no such file), '/var/folders/gf/vvdfvl3939lgvrcnb11djrgsxvgdnv/T/.com.actualbudget.actual.hUXpBS' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/private/var/folders/gf/vvdfvl3939lgvrcnb11djrgsxvgdnv/T/.com.actualbudget.actual.hUXpBS' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/gf/vvdfvl3939lgvrcnb11djrgsxvgdnv/T/.com.actualbudget.actual.hUXpBS' (no such file), '/private/var/folders/gf/vvdfvl3939lgvrcnb11djrgsxvgdnv/T/.com.actualbudget.actual.hUXpBS' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64'))
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:2131)
    at Object.<anonymous> (node:internal/modules/cjs/loader:1356:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2358)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at node:internal/modules/cjs/loader:967:12
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at bindings (/Applications/Actual.app/Contents/Resources/app.asar/node_modules/bindings/bindings.js:112:48)
    at new Database (/Applications/Actual.app/Contents/Resources/app.asar/node_modules/better-sqlite3/lib/database.js:48:64) {
  code: 'ERR_DLOPEN_FAILED'
}

@psybers
Copy link
Contributor

psybers commented Jun 6, 2024

Have we ever confirmed if the mac images fail on both Intel and M1/M2 macs? I am on an Intel mac.

GitHub's latest macos image is arm only.

@MatissJanis
Copy link
Member

I'm on Intel too.

@cpisto
Copy link

cpisto commented Jun 6, 2024

I'm on Apple silicon and the original released 24.6.0 image fails for me, suggesting it is not an architecture specific issue.

@MatissJanis
Copy link
Member

Maybe related: actions/runner-images#9995

@cpisto
Copy link

cpisto commented Jun 6, 2024

Between 24.5.0 and 24.6.0 better-sqlite3 was upgraded from 9.1 to 9.6, between those versions better-sqlite3 was updated to support native arm builds on macOS, perhaps something broke there if the GitHub runner changed from x86 to arm between working and not working?

@cpisto
Copy link

cpisto commented Jun 7, 2024

This is quite the rabbit hole. I'm wondering if the actions/cache is caching the node_modules from the previous arm node runtime. Something like this:

vitejs/vite-plugin-react-swc#74

@cpisto
Copy link

cpisto commented Jun 7, 2024

It looks like it is- the cache key is only based on the os, not the architecture. So the now x86/x64 node runtime is using the cached node_modules for arm, which is likely where the "Bindings not found." error is coming from during the Electron build step.

@tdeebswihart
Copy link

I'm encountering this on the most recently released version:

Actual.app/Contents/MacOS took 6s
$ ./Actual
[Exception] Error: dlopen(/var/folders/hg/lsbm785s2p7g5t7ltsw8ddnr0000gn/T/.com.actualbudget.actual.J0n83V, 0x0001): tried: '/var/folders/hg/lsbm785s2p7g5t7ltsw8ddnr0000gn/T/.com.actualbudget.actual.J0n83V' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/var/folders/hg/lsbm785s2p7g5t7ltsw8ddnr0000gn/T/.com.actualbudget.actual.J0n83V' (no such file), '/var/folders/hg/lsbm785s2p7g5t7ltsw8ddnr0000gn/T/.com.actualbudget.actual.J0n83V' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/private/var/folders/hg/lsbm785s2p7g5t7ltsw8ddnr0000gn/T/.com.actualbudget.actual.J0n83V' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/hg/lsbm785s2p7g5t7ltsw8ddnr0000gn/T/.com.actualbudget.actual.J0n83V' (no such file), '/private/var/folders/hg/lsbm785s2p7g5t7ltsw8ddnr0000gn/T/.com.actualbudget.actual.J0n83V' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
$ file /var/folders/hg/lsbm785s2p7g5t7ltsw8ddnr0000gn/T/.com.actualbudget.actual.J0n83V
/var/folders/hg/lsbm785s2p7g5t7ltsw8ddnr0000gn/T/.com.actualbudget.actual.J0n83V: Mach-O 64-bit bundle x86_64

@Neosaurus
Copy link

I'm experiencing this bug on the latest version also.

@geeklihui
Copy link

Same here, version: 24.8.0
M1 Macbook Pro.
Running in locally.
图片

@Kidglove57
Copy link

Same here, version: 24.8.0 M1 Macbook Pro. Running in locally. 图片

This might just be the error I had on Silicon? Solved for me by enabling Rosetta for now.

@geeklihui
Copy link

Same

Are you using the latest version too? If so, then maybe relative with chip type. I'm using M1Pro with Rosetta on. But why it need Rosetta? It's arm architecture.

图片

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Aug 10, 2024

To keep this thread in the loop, I think it's fixed here:

https://github.com/actualbudget/actual/actions/runs/10322929844?pr=3220

For those with Arm CPU's, can you try out the latest build and tell me what you see?

I think some of you may see "this file is damaged" due to some Apple nonsense about notarizing the app (we plan on fixing that).

If you see the damaged file warning, I think running the below command will fix it:

 xattr -c <path/to/application.app>

Can someone confirm?

@TheRebootr
Copy link

Hello @MikesGlitch ,

I just downloaded and installed the current Release today [v24.8.0].

I still have this error. However, as advised by @Kidglove57 above, I enabled Rosetta and that resolved the issue for now.

Machine:
Macbook Pro M3

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Aug 11, 2024

Hello @MikesGlitch ,

I just downloaded and installed the current Release today [v24.8.0].

I still have this error. However, as advised by @Kidglove57 above, I enabled Rosetta and that resolved the issue for now.

Machine: Macbook Pro M3

Thanks for checking. I think I fixed it here, can I get someone to try again?

https://github.com/actualbudget/actual/actions/runs/10339466938?pr=3220

Apologies for all this back and forward, I don't have a Arm64 mac so can't do it myself.

@MatissJanis
Copy link
Member

Thanks for checking. I think I fixed it here, can I get someone to try again?

https://github.com/actualbudget/actual/actions/runs/10339466938?pr=3220

Apologies for all this back and forward, I don't have a Arm64 mac so can't do it myself.

✅ This works on Intel if that helps (don't have an ARM machine).

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Aug 12, 2024

I have a PR up with the fix, thanks for the help everyone! 🚀

@MikesGlitch
Copy link
Contributor

Fixed by #3220

@geeklihui
Copy link

To keep this thread in the loop, I think it's fixed here:

https://github.com/actualbudget/actual/actions/runs/10322929844?pr=3220

For those with Arm CPU's, can you try out the latest build and tell me what you see?

I think some of you may see "this file is damaged" due to some Apple nonsense about notarizing the app (we plan on fixing that).

If you see the damaged file warning, I think running the below command will fix it:

 xattr -c <path/to/application.app>

Can someone confirm?

It worked for me too! (M1Pro) Thanks!

@Neosaurus
Copy link

Hello @MikesGlitch ,
I just downloaded and installed the current Release today [v24.8.0].
I still have this error. However, as advised by @Kidglove57 above, I enabled Rosetta and that resolved the issue for now.
Machine: Macbook Pro M3

Thanks for checking. I think I fixed it here, can I get someone to try again?

https://github.com/actualbudget/actual/actions/runs/10339466938?pr=3220

Apologies for all this back and forward, I don't have a Arm64 mac so can't do it myself.

Sadly still present for me :( Also M1 pro MBP 14"

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Aug 14, 2024

Hello @MikesGlitch ,
I just downloaded and installed the current Release today [v24.8.0].
I still have this error. However, as advised by @Kidglove57 above, I enabled Rosetta and that resolved the issue for now.
Machine: Macbook Pro M3

Thanks for checking. I think I fixed it here, can I get someone to try again?
https://github.com/actualbudget/actual/actions/runs/10339466938?pr=3220
Apologies for all this back and forward, I don't have a Arm64 mac so can't do it myself.

Sadly still present for me :( Also M1 pro MBP 14"

Can you confirm that you have the latest artefact and have run the command? If so, what error do you get?

@Kidglove57
Copy link

I'm testing the latest build on my M2 Mac. As expected I get the damaged file message. I tried running the command you mentioned. However Terminal is throwing an error:
zsh parse error near \n

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Aug 14, 2024

Are you running the command with the <> brackets? If you remove them it should work

A real life command might look similar to

 xattr -c path/to/Actual.app

@Neosaurus
Copy link

Hello @MikesGlitch ,
I just downloaded and installed the current Release today [v24.8.0].
I still have this error. However, as advised by @Kidglove57 above, I enabled Rosetta and that resolved the issue for now.
Machine: Macbook Pro M3

Thanks for checking. I think I fixed it here, can I get someone to try again?
https://github.com/actualbudget/actual/actions/runs/10339466938?pr=3220
Apologies for all this back and forward, I don't have a Arm64 mac so can't do it myself.

Sadly still present for me :( Also M1 pro MBP 14"

Can you confirm that you have the latest artefact and have run the command? If so, what error do you get?

The same as before, with an "unknown error opening x file". My server is running the latest version. I had to run the xattr command to get it to work

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Aug 14, 2024

Hello @MikesGlitch ,
I just downloaded and installed the current Release today [v24.8.0].
I still have this error. However, as advised by @Kidglove57 above, I enabled Rosetta and that resolved the issue for now.
Machine: Macbook Pro M3

Thanks for checking. I think I fixed it here, can I get someone to try again?
https://github.com/actualbudget/actual/actions/runs/10339466938?pr=3220
Apologies for all this back and forward, I don't have a Arm64 mac so can't do it myself.

Sadly still present for me :( Also M1 pro MBP 14"

Can you confirm that you have the latest artefact and have run the command? If so, what error do you get?

The same as before, with an "unknown error opening x file". My server is running the latest version. I had to run the xattr command to get it to work

This is odd because others have reported it working - and an arm64 should work the same no matter what machine its on.

Can you try removing it from your system, then re-downloading it from https://github.com/actualbudget/actual/releases/tag/v24.8.0 ?

If you still get the error can you open up devtools by clicking the "View" menu > "toggle devtools" > "Console" until you get the error and screen grab it for me?

@Kidglove57
Copy link

Still struggling a bit in terminal so?
xattr -c applications/actual.app

@MikesGlitch
Copy link
Contributor

Still struggling a bit in terminal so? xattr -c applications/actual.app

For me it was:

xattr -c /applications/actual.app

@Kidglove57
Copy link

xattr -c /applications/actual.app

Thank you for persevering with me. I'm not sure what I was doing wrong - maybe incorrect spacing in the command. Anyhow, now working really well and I can confirm that export works too.

Just in case others are reading this - don't expect any response when you enter this command in terminal. But it does work

@Neosaurus
Copy link

Neosaurus commented Aug 15, 2024

Hello @MikesGlitch ,
I just downloaded and installed the current Release today [v24.8.0].
I still have this error. However, as advised by @Kidglove57 above, I enabled Rosetta and that resolved the issue for now.
Machine: Macbook Pro M3

Thanks for checking. I think I fixed it here, can I get someone to try again?
https://github.com/actualbudget/actual/actions/runs/10339466938?pr=3220
Apologies for all this back and forward, I don't have a Arm64 mac so can't do it myself.

Sadly still present for me :( Also M1 pro MBP 14"

Can you confirm that you have the latest artefact and have run the command? If so, what error do you get?

The same as before, with an "unknown error opening x file". My server is running the latest version. I had to run the xattr command to get it to work

This is odd because others have reported it working - and an arm64 should work the same no matter what machine its on.

Can you try removing it from your system, then re-downloading it from https://github.com/actualbudget/actual/releases/tag/v24.8.0 ?

If you still get the error can you open up devtools by clicking the "View" menu > "toggle devtools" > "Console" until you get the error and screen grab it for me?

Here is the error:
CleanShot 2024-08-15 at 11 05 18@2x
I can confirm via Activity Monitor that this is the Apple Silicon release. The server runs on my x86 home server though, which could be the issue?

The previous release still works fine.

Edit: actually I see I'm using the intel release (unbeknownst to me) for the previous version - do I need to match the server architecture and my laptop architecture?

@MikesGlitch
Copy link
Contributor

Hello @MikesGlitch ,
I just downloaded and installed the current Release today [v24.8.0].
I still have this error. However, as advised by @Kidglove57 above, I enabled Rosetta and that resolved the issue for now.
Machine: Macbook Pro M3

Thanks for checking. I think I fixed it here, can I get someone to try again?
https://github.com/actualbudget/actual/actions/runs/10339466938?pr=3220
Apologies for all this back and forward, I don't have a Arm64 mac so can't do it myself.

Sadly still present for me :( Also M1 pro MBP 14"

Can you confirm that you have the latest artefact and have run the command? If so, what error do you get?

The same as before, with an "unknown error opening x file". My server is running the latest version. I had to run the xattr command to get it to work

This is odd because others have reported it working - and an arm64 should work the same no matter what machine its on.
Can you try removing it from your system, then re-downloading it from https://github.com/actualbudget/actual/releases/tag/v24.8.0 ?
If you still get the error can you open up devtools by clicking the "View" menu > "toggle devtools" > "Console" until you get the error and screen grab it for me?

Here is the error: CleanShot 2024-08-15 at 11 05 18@2x I can confirm via Activity Monitor that this is the Apple Silicon release. The server runs on my x86 home server though, which could be the issue?

The previous release still works fine.

Edit: actually I see I'm using the intel release (unbeknownst to me) for the previous version - do I need to match the server architecture and my laptop architecture?

Can we take this to Discord? Hard to have a convo on Github.

Here's the link to the support thread: https://discord.com/channels/937901803608096828/1271969489294200883

@geeklihui
Copy link

To keep this thread in the loop, I think it's fixed here:
https://github.com/actualbudget/actual/actions/runs/10322929844?pr=3220
For those with Arm CPU's, can you try out the latest build and tell me what you see?
I think some of you may see "this file is damaged" due to some Apple nonsense about notarizing the app (we plan on fixing that).
If you see the damaged file warning, I think running the below command will fix it:

 xattr -c <path/to/application.app>

Can someone confirm?

It worked for me too! (M1Pro) Thanks!

Hello @MikesGlitch, not sure if it related to this issue, but the export was error in macOS.
图片

debug info:
图片

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Aug 18, 2024

Hello @MikesGlitch, not sure if it related to this issue, but the export was error in macOS.

That error was unrelated, but it's fixed in the latest release as well (you'll have to download it again to get it).

We also have automatic backups in the Electron app - there's not much reason to do a manual export 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet