502 error on new Atlas site

Issue Summary

I have a brand new macbook OS 12.1 and Local 6.2.0+5679, and when I tried to create a new site with Atlas I get a 502 error with the local domain. ex. atlas.local

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    No, I can create a site without Atlas extension and no problems.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes

Replication

On a macbook with OS 12.1 and Local 6.2.0+5679. Create a new site, check Atlas add-on and leave preferred settings (php 7.4.1, nginx, MySql 8.0.26). Start start and click open site opens http://atlas.local serves 502 error, click open admin opens http://localhost:10003/wp-admin/

System Details

  • Which version of Local is being used?
    Local 6.2.0+5679

  • What Operating System (OS) and OS version is being used?

    • For example: macOS Catalina or Windows 10 Professional
      macOS Monterey 12.1
  • Attach the Local Log. See this Help Doc for instructions on how to do so:

Router Log
2022/01/21 16:10:14 [error] 31578#0: *21 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: ::1, server: headless.local, request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:10016/”, host: “headless.local”
2022/01/21 16:10:14 [error] 31578#0: *21 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: ::1, server: headless.local, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://127.0.0.1:10016/favicon.ico”, host: “headless.local”, referrer: “http://headless.local/

Local Log
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2022-01-21T22:09:21.141815Z 0 [System] [MY-010116] [Server] %%resourcesPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqld (mysqld 8.0.16) starting as process 34258”,“timestamp”:“2022-01-21T22:09:21.343Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2022-01-21T22:09:21.142861Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.”,“timestamp”:“2022-01-21T22:09:21.344Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2022-01-21T22:09:21.144399Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for %%site.runData%%/mysql/data/ is case insensitive”,“timestamp”:“2022-01-21T22:09:21.344Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2022-01-21T22:09:21.331967Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.”,“timestamp”:“2022-01-21T22:09:21.344Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2022-01-21T22:09:21.343288Z 0 [System] [MY-010931] [Server] %%resourcesPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqld: ready for connections. Version: ‘8.0.16’ socket: ‘%%site.runData%%/mysql/mysqld.sock’ port: 10015 MySQL Community Server - GPL.”,“timestamp”:“2022-01-21T22:09:21.344Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nodejs”,“level”:“warn”,“message”:“error - Failed to load SWC binary for darwin/x64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc",“timestamp”:"2022-01-21T22:09:23.340Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nodejs”,“level”:“warn”,“message”:“error - Failed to load SWC binary for darwin/x64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc",“timestamp”:"2022-01-21T22:09:26.016Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nodejs”,“level”:“warn”,“message”:“error - Failed to load SWC binary for darwin/x64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc",“timestamp”:"2022-01-21T22:09:28.696Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nodejs”,“level”:“warn”,“message”:“error - Failed to load SWC binary for darwin/x64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc",“timestamp”:"2022-01-21T22:09:31.324Z”}

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

This was the Node.js output

> next-headless-getting-started@0.1.0 dev
> next dev -p $PORT

ready - started server on 0.0.0.0:10016, url: http://localhost:10016
info  - Loaded env from /Users/nlaughlin/Local Sites/headless/app-node/.env.local
info  - Attempted to load @next/swc-darwin-x64, but an error occurred: dlopen(/Users/nlaughlin/Local Sites/headless/app-node/node_modules/@next/swc-darwin-x64/next-swc.darwin-x64.node, 0x0001): tried: '/Users/nlaughlin/Local Sites/headless/app-node/node_modules/@next/swc-darwin-x64/next-swc.darwin-x64.node' (code signature in <FFA6246B-5761-3AD5-AB55-34832928B990> '/Users/nlaughlin/Local Sites/headless/app-node/node_modules/@next/swc-darwin-x64/next-swc.darwin-x64.node' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/usr/lib/next-swc.darwin-x64.node' (no such file)
error - Failed to load SWC binary for darwin/x64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc

I found the answer here, failed-loading-swc | Next.js, adding a .babelrc file seemed to fix the 502 error

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.