X_APP_URL_PORT_MISMATCH
Means
APP_URL names a loopback port x dev does not serve
Typical cause
APP_URL is a localhost origin whose port is not the one x dev binds (--port, then PORT, then 3000), so OAuth redirects, absolute links and the sync origin point at a server that is not this one
Fix
export APP_URL=http://localhost:3000