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

SDK hangs if it encounters too many 403s from the Apify API #341

Open
tobice opened this issue Nov 26, 2024 · 4 comments
Open

SDK hangs if it encounters too many 403s from the Apify API #341

tobice opened this issue Nov 26, 2024 · 4 comments
Assignees
Labels
bug Something isn't working. t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@tobice
Copy link

tobice commented Nov 26, 2024

Issue description

I have an Actor that tries to access all kinds of data in the Apify account, and for each request it uploads the result to the default Key-value store.

  • When I run the Actor with a token that has access to all the user data (all requests succeed), the Actor works fine (run).
  • When I run the Actor with a token that has no access at all (all requests fail), the actor gets stuck mid-run, and eventually times out (run). If I replace Apify SDK calls with Apify JS client calls, it also works fine.

More context on Slack.

Code sample

No response

Package version

Visible in the Actor build.

Node.js version

Visible in the Actor build.

Operating system

No response

Actor or run link

https://console.apify.com/actors/KxN6y6vxqedApRveq/source

I have tested this on the next release

No response

Other context

No response

@tobice tobice added the bug Something isn't working. label Nov 26, 2024
@B4nan
Copy link
Member

B4nan commented Nov 26, 2024

The client has expo backoff, which can end up waiting for minutes. The SDK has no retrying mechanism, it just calls the client.

If I replace Apify SDK calls with Apify JS client calls, it also works fine.

Where can we see that?

@tobice
Copy link
Author

tobice commented Nov 26, 2024

I didn't create a standalone Actor but the integration tests (thanks to which I stumbled across this issue) have one embedded.

@B4nan
Copy link
Member

B4nan commented Nov 26, 2024

What if you use Actor.apifyClient in there? I am having a hard time believing this would be an SDK problem, could be about different params for the client constructor, if Actor.newClient() works.

@tobice
Copy link
Author

tobice commented Nov 26, 2024

Tested it locally and Actor.apifyClient also works.

@B4nan B4nan added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 27, 2024
@B4nan B4nan self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

No branches or pull requests

2 participants