CA
exotic-emerald

Auto builds don't work at all, getting HTTP 500 errors from Apify both in UI and webhooks

When I click on the radio button Automatic builds, I get an error. Different browser doesn't help. The browser console says:
ERROR Failed to handle request 'POST - /github-app/setup-webhook/...' {"request":{"method":"post","url":"https://console-backend.apify.com/github-app/setup-webhook/...","headers":{"x-idempotency-key":"...","Authorization":"Bearer ..."},"params":{},"data":{"version":"0.0","enabled":true}},"response":{"status":"error","statusCode":500,"isClientSafe":true,"errorCode":"internal-server-error","errorMessage":"Cannot destructure property 'token' of '(intermediate value)' as it is null.","path":"/github-app/setup-webhook/..."}}
[object Object]
ERROR Failed to handle request 'POST - /github-app/setup-webhook/...' {"request":{"method":"post","url":"https://console-backend.apify.com/github-app/setup-webhook/...","headers":{"x-idempotency-key":"...","Authorization":"Bearer ..."},"params":{},"data":{"version":"0.0","enabled":true}},"response":{"status":"error","statusCode":500,"isClientSafe":true,"errorCode":"internal-server-error","errorMessage":"Cannot destructure property 'token' of '(intermediate value)' as it is null.","path":"/github-app/setup-webhook/..."}}
[object Object]
No description
10 Replies
exotic-emerald
exotic-emeraldOP2y ago
Also from the tutorial videos it seems I should use webhook on GitHub, but the wizard taking me through importing GitHub repository didn't feature anything like that. Possibly outdated tutorial video? And just for the record, I didn't figure out how to connect existing project to a GitHub repository. I had to delete it and start from scratch by „developing new“ actor.
fair-rose
fair-rose2y ago
@Honza Javorek do you know how to tell an Actor to use a specific amount of RAM? Using the API?
exotic-emerald
exotic-emeraldOP2y ago
No. How is it related to my problem?
rare-sapphire
rare-sapphire2y ago
Reported to the team, thank you
exotic-emerald
exotic-emeraldOP2y ago
So today I tried apify push and the actor built successfully, but the integration with GitHub seems to disappear 🤯 This is sooo confusing.
MEE6
MEE62y ago
@Honza Javorek just advanced to level 2! Thanks for your contributions! 🎉
exotic-emerald
exotic-emeraldOP2y ago
So after more investigation, I think it might have been something caused by me doing chaos monkey in how the project is named and deployed. I pushed it from command line apify, then renamed, then recreated from git, then pushed from CLI, then the integration disappeared altogether… Now I have created 3 actors out of one monorepo and been careful to only source them from GitHub (well as far as I understand the monorepo approach doesn’t allow otherwise anyway). Now all three can be switched to automatic builds just fine. (Whether the automatic builds work, that I dont know yet 😀) My observation is that the automatic builds do not work at all :thisisfinefire: - If creating actor from GitHub repo, it gets successfully connected. I must not use apify push then, because that would break the connection. IMHO this isn't documented anywhere. - The workflow is different than in docs, those seem to be misleading: https://docs.apify.com/academy/deploying-your-code/deploying - The workflow probably adds webhook automatically, but the webhook on GitHub doesn't work. I push to the repo and I can see failed 500 responses from Apify. The payload is {"status":"error","statusCode":500,"isClientSafe":true,"errorCode":"internal-server-error","errorMessage":"User was not found or authentication token is not valid","path":"/github-app/rebuild/5LcFuJWYfKYy3Yw8h/integration_api_token_d7Y..."} - On the actor home, when I switch Build settings to Automatic builds from Manual builds, I get green "success" message, but then when I look the next day, it's switched back to Manual builds. I can do this 5 times in a row and the change just refueses to stick. - If I go to GitHub and delete the webhook to see if I can somehow reset it, I realize there is no way I can put the webhook back. From then on, switching Build settings to Automatic gives me red "error" message, cannot be done at all. In dev tools I can see this payload: {"status":"error","statusCode":500,"isClientSafe":true,"errorCode":"internal-server-error","errorMessage":"Not Found","path":"/github-app/setup-webhook/oX2XnQYgHwy7Y0c0a"} - As the docs are outdated, I wasn't able to figure out the correct URL, correct token, or anything. API docs contain "Build actor" endpoint, but it looks completely different from what has been previously set up as a webhook on GitHub. @Lukas Krivka I added some inputs for the devs. I don’t want to be annoying, but at the same time it looks like real production bugs, so I don’t want it to fall between cracks
MEE6
MEE62y ago
@Honza Javorek just advanced to level 3! Thanks for your contributions! 🎉
rare-sapphire
rare-sapphire2y ago
Thanks for debugging this, I pushed it to the team more. https://docs.apify.com/academy/deploying-your-code/deploying - This workflow still works fine, you just copy the Apify build API endpoint and paste it to GitHub to run on every push. Some people might prefer doing it manually for more configuration options.
Deploying | Academy | Apify Documentation
Push local code to the platform, or create a new actor on the console and integrate it with a Git repo to optionally automatically rebuild any new changes.
exotic-emerald
exotic-emeraldOP17mo ago
Thanks! The described workflow isn't what I see in my UI. The integration seems to work differently, hence my claim of outdated / misleading docs.
No description
No description
No description

Did you find this page helpful?