Skip to content

get_streamed_log() on a last_run() client requests the Actor from a wrong URL #1137

Closed

Description

@vdusek

RunClient.get_streamed_log() and get_status_message_watcher() fetch the run's Actor to put its name in the logger name. They build the Actor client with base_url=self._base_url (run.py#L370-L378, #L458-L466, async at #L920-L928 and #L1009-L1017).

For a run client from client.run(id), _base_url is the API root. For a chained one, actor(...).last_run() or task(...).last_run(), it is the parent's resource URL, because last_run() passes **self._base_client_kwargs (actor.py#L531-L556, _resource_client.py#L85-L97). The Actor GET then goes to /v2/acts/<X>/acts/<actId>, returns 404, and get() turns it into None. client.actor('x').last_run().get_streamed_log() logs under apify.runId:... with no Actor name.

iterate_dataset_items() in the same file uses self._api_base_url (run.py#L530-L540). The JS client uses the root client: this.apifyClient.actor(actorId).get() (run.ts#L532-L535).

Expected behavior

Both methods (sync and async) build the Actor client with base_url=self._api_base_url, so the Actor name appears for chained run clients too.

✍️ Drafted by Claude Code

Activity

  1. added
    bugSomething isn't working.
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Oct 16, 2026
  2. self-assigned this
    on Oct 16, 2026
  3. added a commit that references this issue on Oct 16, 2026
    2b58a2b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions