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

Widgets not loaded on M1 macbook #444

Open
noirchen opened this issue Feb 22, 2021 · 63 comments
Open

Widgets not loaded on M1 macbook #444

noirchen opened this issue Feb 22, 2021 · 63 comments

Comments

@noirchen
Copy link

I installed ubersicht on M1 macbook, and the widget cannot load. Debug console gives error

[Error] Failed to load resource: Could not connect to the server. http://127.0.0.1:41416/1/background

@pierredelun3
Copy link

pierredelun3 commented Feb 23, 2021

Me too on M1 Macbook Air. After some minutes of usage widgets disappear and Ubersicht becomes unresponsive: the drop-down menu drops down but selecting options does not produce any effect. Sometimes it is possible to activate the Debug Console which outputs a sequence of messages of increasing length, beginning with http://127.0.0.1:41416/1/background

@felixhageloh
Copy link
Owner

I don't have an M1 machine to test, but I think I know what the issue is: the app ships with a node.js executable, which is not compiled for M1

@pierredelun3
Copy link

pierredelun3 commented Feb 24, 2021

@felixhageloh: is this explanation compatible with the fact that everything works for approx one hour, and then it stops working?

@pierredelun3
Copy link

PS here is what I see in console.

image

@pierredelun3
Copy link

Let me add another funny thing: on M1 if you open the Debug Console, TWO console windows are opened (one on the top of the other, that's why I did not notice immediately)

@felixhageloh
Copy link
Owner

the errors look in line with what I would expect if the node server does not start. The fact everything works for approx one hour is a bit more mysterious. Can you confirm that one?

Two consoles is actually expected behavior: there is one for each 'layer' now, i.e. one for foreground and one for background widgets

@pierredelun3
Copy link

pierredelun3 commented Mar 1, 2021

actually, the behaviour is erratic. this afternoon Übersicht became unresponsive (with widgets disappearing) 4 times, with intervals of 20-30 mins. now it's running since one hour without problems. If I may help you debug just ask

@pierredelun3
Copy link

One more piece of info: the problem persists if I check "Open with Rosetta" in the Get Info sheet for the app

@rutmehta
Copy link

It's happening for me too! Haven't checked the debug console though

@felixhageloh
Copy link
Owner

can one of you download the standard per build binary for node 14 https://nodejs.org/dist/v14.16.0/node-v14.16.0-darwin-x64.tar.gz?
I am curious whether it supports both architectures now

@pierredelun3
Copy link

can one of you download the standard per build binary for node 14 https://nodejs.org/dist/v14.16.0/node-v14.16.0-darwin-x64.tar.gz?
I am curious whether it supports both architectures now

Sure, please explain what I should do with the files - I am not a developer but I can follow instructions

@felixhageloh
Copy link
Owner

felixhageloh commented May 10, 2021

sorry for the late reply. I already found the answer: it does not support both architectures. Node.js 16 support apple silicon tho, so this should be unblocked.

I think in the meantime you should be able to run Übersicht using Rosetta

@rutmehta
Copy link

rutmehta commented May 11, 2021 via email

@felixhageloh
Copy link
Owner

Here is a new version that should support Apple Silicon http://tracesof.net/uebersicht/releases/Uebersicht-1.6.70.app.zip

Since I don't have an M1 (yet :)) I'm unable to confirm it works. Is somebody in this thread able to verify?

@pierredelun3
Copy link

The Widgets menu item is greyed out:
image

@felixhageloh
Copy link
Owner

Are you still running the current version of Übersicht at the same time by any chance?

@pierredelun3
Copy link

I quit the app. Is there some other process running that I should kill?

BTW selecting "Show Debug Console" does not do anything

@felixhageloh
Copy link
Owner

Can you run killall localnode in the terminal? If that doesn't work can you try disabling rosetta?

@pierredelun3
Copy link

image

I disabled the option to run with Rosetta in the Info Window for Ubersicht, but the problem persists. Should I disable Rosetta at system level?

@felixhageloh
Copy link
Owner

no thanks, I think this means the node binary is not working. Do you know how to get a log from the Console app? If so, can you post the log for Übersicht when it starts up? Thank you for you help so far!

@pierredelun3
Copy link

In system.log there appears the line

May 17 10:11:52 MacBook-Air-3 com.apple.xpc.launchd[1]: Coalition Cache Hit: app<application.tracesOf.Uebersicht.40284392.40284402(501)> [38909]

@felixhageloh
Copy link
Owner

Screen Shot 2021-05-17 at 10 13 53

Screen Shot 2021-05-17 at 10 18 24

If you open the Console app, then start streaming, then start Übersicht and filter by Process name (search for "sicht" in the top right), you should see something like I posted in the second screenshot. I'm curious to see the logs around the line that reads "starting server task"

@pierredelun3
Copy link

image

@felixhageloh
Copy link
Owner

Great! Can you scroll down a bit more after the "starting server task" (and potentially make the screenshot a bit wider)?

@pierredelun3
Copy link

The truncated line says:

default 13:57:23.026406+0200 Übersicht NSApp cache appearance:
-NSRequiresAquaSystemAppearance: 0
-appearance: (null)
-effectiveAppearance: <NSCompositeAppearance: 0x600002065080
(
"<NSDarkAquaAppearance: 0x600002064f80>",
"<NSDarkAquaAppearance: 0x600002064f00>",
"<NSSystemAppearance: 0x600002060900>"
)>

After this burst of messages it stops

@pierredelun3
Copy link

there is nothing else, the screenshot contains it all (apart from the truncated line)

@felixhageloh
Copy link
Owner

thanks for your help again! I think I see the relevant info in the screenshot after all. Now back to figuring out what causes it 🤔

@Porco-Rosso
Copy link

Hi, just installed a fresh copy of the latest Ubersicht. (from the website)
Freezes immediately after launch on M1 macbook air.

Here are the console logs, with and without rosetta.

M1-no-rosetta-uber.txt
rosetta-Uber.txt

Hope this helps.

@FraserEmbrey
Copy link

I reinstalled macOS as I was having semi-frequent crashes, Übersicht was working fine before but now it fails to load anything at all. The default widget won't even show on the desktop. I can't see any warnings or errors from the app.

@felixhageloh
Copy link
Owner

@Porco-Rosso could you also try this (unreleased) version http://tracesof.net/uebersicht/releases/Uebersicht-1.6.70.app.zip?

@neoswallow
Copy link

Are you using any previous widgets?
Have you tried start clean with nothing but GettingStarted widget?

I am currently running v1.6.69 on M1 Mini without any issue.
And no, it's not running under Rosetta.
But localnode binary itself is an x86 binary (it's node v10.16.0) so my widgets actually run under Rosetta anyway.
I am anxiously waiting for next release hoping localnode is updated to v16 UB.

I believe I did run into issues installing a widget.
The only one I installed is GitFinder.
I did modify it a bit when I ran it on x86 MBP.
I don't think it ran initially when I copied it over from MBP.
I eventually got it working but don't remember what the issue was.

Anyway, in my case, it was the widget itself that failed to run.
Funny thing is, I don't think it's affected on x86 MBP.

As a side note, I did try to replace localnode with a symlink'd version of my local node v16, but it failed to run.
Show Debug Console menu didn't work.
Just got nothing.
I didn't debug further as I wasn't sure if localnode is a special build or not.

@felixhageloh
Copy link
Owner

@neoswallow can you also try this unreleased version with node v16 http://tracesof.net/uebersicht/releases/Uebersicht-1.6.70.app.zip?

@Porco-Rosso
Copy link

@neoswallow No, this is a clean install, no widgets apart from the Getting Startedwidget. I am running a M1 macbook air.

@rutmehta
Copy link

rutmehta commented Aug 2, 2021

I have a couple other widgets as well but it still shuts down after a while (it is still running but nothing shows up)

  • macbook pro m1

@donaldguy
Copy link

@neoswallow can you also try this unreleased version with node v16 http://tracesof.net/uebersicht/releases/Uebersicht-1.6.70.app.zip?

Brand new to Übersicht, running M1 on Monterey beta (you can see my getting-there fight to get yabai running over at koekeishiya/yabai#923 )

I pulled this node 16 release, Widgets is greyed out as mentioned, and ditto on double-web inspector (so intense) reflecting MIA server (which also refuses to open for a good while after app start)

Running on command line:

No matching processes belonging to you were found
2021-08-02 16:55:15.357 Übersicht[27863:348931] starting server task
node:internal/modules/cjs/loader:1168
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: dlopen(/Applications/U�bersicht.app/Contents/Resources/node_modules/fsevents/fsevents.node, 0x0001): tried: '/Applications/U�bersicht.app/Contents/Resources/node_modules/fsevents/fsevents.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/fsevents.node' (no such file), '/usr/lib/fsevents.node' (no such file)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1168:18)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Module.require (node:internal/modules/cjs/loader:1013:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Applications/Übersicht.app/Contents/Resources/node_modules/fsevents/fsevents.js:13:16)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14) {
  code: 'ERR_DLOPEN_FAILED'
}

looks like no dice on node-gyp config or so?

@donaldguy
Copy link

doing npm install in server/ on clone natively produces same result, so I guess fsevents is shipping pre-built

https://www.npmjs.com/package/fsevents#changelog indicates they went universal in 2.3, so I adjusted package.json accordingly, whereupon it seems happy enough:

uebersicht/server on  master [✘!?] via  v16.6.0
❯ npm start -- -d ~/Library/ApplicationSupport/Übersicht/widgets

> uebersicht-server@0.0.0 start
> coffee server.coffee "-d" "/Users/donald/Library/ApplicationSupport/Übersicht/widgets"

watching /Users/donald/Library/ApplicationSupport/Übersicht/widgets
(node:30832) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:30832) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:30832) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:30832) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:30832) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:30832) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
server started on port 41416
CORS Anywhere on port 41417
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating

@neoswallow
Copy link

@Porco-Rosso I suspected one of you had tried it. I just wanted to mention it in case it would help someone.

@donaldguy I think you're on right track. It looks like UB support was added to 2.3 and UB was included to 2.3.1.

@felixhageloh I did try build 70 without any success 😥
If you create another build with fsevent update to 2.3.1 or latest (2.3.2), I'll try new build again.
Latest v16 is also 16.6.0 so maybe update that also but not important for this test.
I did try to copy/paste fsevent (2.3.2) from my other repo but it failed with validation error, of course 😝.

@donaldguy
Copy link

donaldguy commented Aug 2, 2021

Here's my imperfect result; it is drawing (some) widgets anyway.

It was built in Xcode 13 beta 4 w/ lots of warnings, so YMMV:
https://github.com/donaldguy/uebersicht/releases/download/1.6.70-1%2Bm1-node166/Ubersicht.app.zip

as the release info says:

Signed by a dev cert from me (@donaldguy ) cause Xcode was pretty intransigent about building unsigned

@donaldguy
Copy link

This build still opens 2 consoles but they are more prominently labled "foreground" and "background", so I'm not sure that was/is a bug

@donaldguy
Copy link

donaldguy commented Aug 2, 2021

well Inpm install, npm run released with node v16.6, but it seems like, ironically, this build (off what pod install outputted for me) only includes an x86_64 localnode and its v10.16.0 at that ... but it seems to be running happily enough under rosetta for me, at least for the GettingStarted.jsx 🤷

I branched off master; its not clear to me where else, if anywhere @felixhageloh 's pre-release above originated from, commit-wise

@neoswallow
Copy link

@donaldguy Looking at your PR note, my local setting might be different from others.
I only have ASi version of node, v16 installed via brew.
Now, because of the issue with my work (react native) app build, I do have homebrew node symlink'd as /usr/local/bin/node.
I didn't mention it earlier as I wasn't sure if local node installation affects in anyway with Übersicht as it had its own node bundled.

@neoswallow
Copy link

I pulled this node 16 release, Widgets is greyed out as mentioned, and ditto on double-web inspector (so intense) reflecting MIA server (which also refuses to open for a good while after app start)

With unreleased build/release 70, Widgets menu is greyed out also but I actually don't get any inspector at all.
I do member getting double-inspector windows initially on M1 but it was gone after a while and I'm not sure that's after I updated from prior to build/version 69 or some other reason.

@flurie
Copy link

flurie commented Oct 28, 2021

I was able to build @donaldguy's latest with the the bundled localnode replaced with a node 16 for darwin-arm64[1], and everything seems to work for me now.

[1] grabbed at https://nodejs.org/dist/v16.13.0/

@n331p
Copy link

n331p commented Nov 7, 2021

@flurie would you be able to share your build? Also is localnode running under rosetta or natively?

@FraserEmbrey
Copy link

I can't see any widgets or the debug on my M1 machine running Monterey.

@flurie
Copy link

flurie commented Nov 14, 2021

@flurie would you be able to share your build? Also is localnode running under rosetta or natively?

@n331p Sure, let me fork it properly and clean it up a bit. localnode is running the arm64 native node I grabbed from the nodejs dist cdn. I'll let you know when I get to it.

@n331p
Copy link

n331p commented Nov 14, 2021

@flurie would you be able to share your build? Also is localnode running under rosetta or natively?

@n331p Sure, let me fork it properly and clean it up a bit. localnode is running the arm64 native node I grabbed from the nodejs dist cdn. I'll let you know when I get to it.

@flurie Thank you! Since localnode is running all the time, native code would allow for some good performance and battery gains as well. Also If you have a somewhat working build (even without a complete source), I'd love to have it.

@n331p
Copy link

n331p commented Dec 11, 2021

@flurie would you be able to share your build? Also is localnode running under rosetta or natively?

@n331p Sure, let me fork it properly and clean it up a bit. localnode is running the arm64 native node I grabbed from the nodejs dist cdn. I'll let you know when I get to it.

@flurie Let me know if you can send the m1 build. I've been trying to build it for the past 2 hours using @donaldguy source and adding the new node from 16.13 and putting it in server/release/localnode. It builds fine but no widgets are available to select. (localnode doesnt seem to be running, probably why). I tried building without replacing the localnode and still no dice.

@felixhageloh
Copy link
Owner

felixhageloh commented Jan 2, 2022

Alright, I finally got an M1 machine and a working universal binary build done over the Christmas break: https://raw.githubusercontent.com/felixhageloh/uebersicht/gh-pages/releases/Uebersicht-1.6.71.app.zip

I want to polish up a last few things before making it an official release. In the mean time, give it a try if you want and shout out if something is still broken!

@felixhageloh
Copy link
Owner

(update: fixed link above)

@neoswallow
Copy link

Running on MPB14 M1Max, macOS 12.1.
Activity Monitor is showing that node-arm64 is running.
All my widgets are running fine.
The only issue I'm seeing is that "Showing Debug Console" shows 2 windows.
When there's an error on the console, only one window shows the error so it isn't apparent if that window happens to be one behind as both windows are the same size, same position.

Also, a minor point.
I see that the included node is v16.1.0.
Since you're about to release a new version soon, why not make it latest v16 available (v16.13.1 as of now)?
That is, as long as this doesn't cause any delay for the new release.

@Porco-Rosso
Copy link

Can also confirm that it is working. Thanks a lot for the effort @felixhageloh was really missing Ubersicht.
I don't see two windows with "show Debug console"

@felixhageloh
Copy link
Owner

@neoswallow @Porco-Rosso thanks for the info!
The two consoles are actually intentional and were introduced a while back: there are two Übersicht windows per screen, one for clickable foreground widgets and one for widgets that are in the background
Screen Shot 2022-01-10 at 13 25 16

The debug console opens for both windows. I agree that the UX could be much improved tho (especially because the windows are rendering exactly on top of each other)

@singhpaul
Copy link

https://raw.githubusercontent.com/felixhageloh/uebersicht/gh-pages/releases/Uebersicht-1.6.71.app.zip

I'm on an Intel MBP 15 running on Monterey 12.12.1 and unfortunately this release didn't resolve the issue for me. See below for console log.

Anyone have any idea what might be going on?

Screen Shot 2022-02-17 at 4 32 17 PM

@BitMap4
Copy link

BitMap4 commented May 16, 2022

I also have the same issue but I have intel
Screenshot 2022-05-16 at 6 17 29 PM

I'm using Uebersicht v1.6.72

@neoswallow
Copy link

neoswallow commented May 16, 2022

@singhpaul I do believe the issue you're having is with the AppleScript the widget is using. I also use customized (rewritten) version of GitFinder but the AppleScript from the widget no longer works but since I don't depend on that functionality, I disabled it.

AFAIK, AppleScript itself still works but it seems Apple has changed something(s) that breaks some scripts, just not sure of what and of which macOS.

@BitMap4 You should check the debug console window and see where the error is coming from.

@BitMap4
Copy link

BitMap4 commented May 17, 2022

You should check the debug console window and see where the error is coming from.

I'm having the same issue as the people above. The debug console looks the same as this: #444 (comment) and it just doesn't open most of the times I try. When I open a link from the debug console (while Uebersicht is running) in safari:
Screenshot 2022-05-17 at 8 54 58 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests