uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
7.84k stars 569 forks source link

After upgrading to v20.46.0 unable to run on macOS ARM64 #1087

Closed sailingwithsandeep closed 1 month ago

sailingwithsandeep commented 1 month ago

[1] Error: This version of uWS.js supports only Node.js LTS versions 16, 18 and 20 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).

 Error: dlopen(/Users/userx/Projects/backend/node_modules/uWebSockets.js/uws_darwin_arm64_115.node, 0x0001): symbol not found in flat namespace '_lsquic_conn_get_ctx'
   at /Users/userx/Projects/backend/node_modules/uWebSockets.js/uws.js:22:9
 at Object.<anonymous> (/Users/userx/Projects/backend/node_modules/uWebSockets.js/uws.js:24:3)
     at Module._compile (node:internal/modules/cjs/loader:1376:14)
   at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
   at Module._load (node:internal/modules/cjs/loader:1023:12)
   at cjsLoader (node:internal/modules/esm/translators:356:17)
     at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:305:7)
     at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
     at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
uNetworkingAB commented 1 month ago

Ah ok, the migration to macOS 12 broke ARM64 macOS even more than before. Thanks for reporting, it should only affect macOS for ARM64

sailingwithsandeep commented 1 month ago

Sorry, posting in parent repo

sailingwithsandeep commented 1 month ago

Ah ok, the migration to macOS 12 broke ARM64 macOS even more than before. Thanks for reporting, it should only affect macOS for ARM64

Any workaround?

uNetworkingAB commented 1 month ago

For macOS ARM64 you need to use v20.44.0 until I can fix these binaries. All other platforms work in v20.46.0

uNetworkingAB commented 1 month ago

https://github.com/uNetworking/uWebSockets.js/issues/1086

uNetworkingAB commented 1 month ago

Normally these symbols would be lazily resolved and crash on use, but looks like that is no longer the case. So I need to fix it properly this time

uNetworkingAB commented 1 month ago

It's problematic because GitHub Actions runners are x86_64 and the issue is on ARM64 so smoke testing does not catch it

uNetworkingAB commented 1 month ago

fixed in 20.47

uNetworkingAB commented 1 month ago
Hi [@uNetworkingAB](https://github.com/uNetworkingAB), it seems the issue is not fixed.
Trying the latest version (20.47) on a Mac M1, I get the following error:

dlopen(/project/node_modules/uWebSockets.js/uws_darwin_arm64_115.node, 0x0001): symbol not found in flat namespace '__ZN2v811ArrayBuffer15GetBackingStoreEv

I'll try an older version and report back.

was this really the case? I have M1 mac and it works without issues for me

Vincz commented 1 month ago
Hi [@uNetworkingAB](https://github.com/uNetworkingAB), it seems the issue is not fixed.
Trying the latest version (20.47) on a Mac M1, I get the following error:

dlopen(/project/node_modules/uWebSockets.js/uws_darwin_arm64_115.node, 0x0001): symbol not found in flat namespace '__ZN2v811ArrayBuffer15GetBackingStoreEv

I'll try an older version and report back.

was this really the case? I have M1 mac and it works without issues for me

No man, I'm so sorry. It was just too early in the morning, my coffee didn't kick yet and I was trying to launching it with bun.

uNetworkingAB commented 1 month ago

Hahahahahahahahaha

uNetworkingAB commented 1 month ago

Maybe I need to add a check for that