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]: Trigger.dev Error: Build failed: 401 "No authorization header provided" #4917

Open
druidui opened this issue Jan 22, 2025 · 0 comments
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@druidui
Copy link

druidui commented Jan 22, 2025

Error Message and Logs

Also raised in triggerdotdev/trigger.dev#1629 but am pretty sure it's an issue with the current template for trigger.dev

npx trigger.dev dev

Trigger.dev (3.3.10 -> 3.3.11)
------------------------------------------------------
│
▲  Warning: You're not running the latest CLI version, please consider updating ASAP
│
│           Current:     3.3.10
│           Latest:      3.3.11
│
│           Run latest:  npx trigger.dev@latest
------------------------------------------------------
Key: Version | Task | Run
------------------------------------------------------
○ Building background worker…
│
■  Error: Build failed: 401 "No authorization header provided"
│
│         Error: 401 "No authorization header provided"
│             at DevWorkerRuntime.initializeWorker (file:///C:/Users/node_modules/trigger.dev/dist/esm/dev/workerRuntime.js:153:19)
│             at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
│             at async updateBundle (file:///C:/Users/node_modules/trigger.dev/dist/esm/dev/devSession.js:49:13)
│             at async runBundle (file:///C:/Users/node_modules/trigger.dev/dist/esm/dev/devSession.js:119:9)
│             at async startDevSession (file:///C:/Users/node_modules/trigger.dev/dist/esm/dev/devSession.js:122:26)
│             at async startDev (file:///C:/Users/node_modules/trigger.dev/dist/esm/commands/dev.js:115:23)
│             at async devCommand (file:///C:/Users/node_modules/trigger.dev/dist/esm/commands/dev.js:55:29)
│             at async file:///C:/Users/node_modules/trigger.dev/dist/esm/commands/dev.js:31:13
│             at async file:///C:/Users/node_modules/trigger.dev/dist/esm/cli/common.js:54:28
│             at async wrapCommandAction (file:///C:/Users/node_modules/trigger.dev/dist/esm/cli/common.js:40:12)

Steps to Reproduce

  1. Open Coolify, find trigger.dev in the applications, set the correct link, add my emails and resend api key to env vars, click deploy

  2. Generate secrets & keys using the following, as the template generates keys the wrong length:
    echo MAGIC_LINK_SECRET=$(openssl rand -hex 16)

echo SESSION_SECRET=$(openssl rand -hex 16)
echo ENCRYPTION_KEY=$(openssl rand -hex 16)
echo PROVIDER_SECRET=$(openssl rand -hex 32)
echo COORDINATOR_SECRET=$(openssl rand -hex 32)

  1. Log into the trigger.dev web app, authentication between CLI and web app succeeds with no errors or warnings. It then tells me to initialise, which I do, and have a working trigger.config.ts.

  2. Ensure the correct env vars in my local dev server are populated and correct:

TRIGGER_ACCESS_TOKEN=tr_pat_....
TRIGGER_API_URL=https://....
TRIGGER_SECRET_KEY=tr_dev_.....

  1. Run "npx trigger.dev dev" (I have tried both the latest trigger.dev 3.3.11 and previous working version non-coolify 3.3.10)

Example Repository URL

No response

Coolify Version

v4.0.0-beta.385

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04 LTS

Additional Information

No response

@druidui druidui added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Jan 22, 2025
@druidui druidui changed the title [Bug]: [Bug]: Trigger.dev Error: Build failed: 401 "No authorization header provided" Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

1 participant