Apify

Apify and Crawlee Official Forum

b
F
A
J
A

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:

Plain Text
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]
Attachment
Screenshot_2023-12-09_at_18.06.17.png
1
H
C
L
18 comments
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.
do you know how to tell an Actor to use a specific amount of RAM? Using the API?
No. How is it related to my problem?
Reported to the team, thank you
So today I tried apify push and the actor built successfully, but the integration with GitHub seems to disappear 🤯 This is sooo confusing.
just advanced to level 2! Thanks for your contributions! 🎉
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

  • 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.
[updated] Automatic builds don't work at all, getting HTTP 500 error from Apify
[updated] Automatic builds don't work at all, getting HTTP 500 errors from Apify
Auto builds don't work at all, getting HTTP 500 errors from Apify both in UI and webhooks
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
just advanced to level 3! Thanks for your contributions! 🎉
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.
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.
Attachments
Screenshot_2024-01-22_at_13-59-02_Apify_Console.png
Screenshot_2024-01-22_at_13-58-43_Apify_Console.png
Screenshot_2024-01-22_at_13-58-51_Apify_Console.png
Add a reply
Sign up and join the conversation on Discord
Join