Solution skill
getRecordPublicUrl returns broken internal URLs when run on the Apify Platform
Complete solution
Shows how to fix getRecordPublicUrl returns broken internal URLs when run on the Apify Platform. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
A maintainer identified the root cause: on the platform the API URL differs so Actors talk directly to API pods instead of going over the internet, and that internal base URL leaked into signed public URL generation. The fix landed in apify-client-js via PR 745 and the issue was closed.
Steps
- If getRecordPublicUrl gives you a working signed link locally but a dead internal URL (a 10.x address) on the Apify Platform, you are hitting a client-side bug where the internal API base URL leaked into signed URL generation. The fix is in apify-client-js (PR 745), so update your SDK and client dependencies to a release that includes it and the generated URLs will use the canonical public API URL again. The sync KeyValueStore.getPublicUrl path already handled this correctly by ignoring the provided baseUrl and using the APIFYAPIPUBLICBASEURL env variable, which is the same approach the fix applied to the client methods.
When to use
You are seeing this: Calling keyValueStore.getRecordPublicUrl worked locally and produced a signed public link, but on the platform it generated a URL against an internal worker address (like CONTAINER_IP:8010) that never loaded. Use this skill when you run into "getRecordPublicUrl returns broken internal URLs when run on the Apify Platform".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
A maintainer identified the root cause: on the platform the API URL differs so Actors talk directly to API pods instead of going over the internet, and that internal base URL leaked into
Evidence
In gh:apify/apify-sdk-js#460 (https://github.com/apify/apify-sdk-js/issues/460), the reporter ran into this: Calling keyValueStore.getRecordPublicUrl worked locally and produced a signed public link, but on the platform it generated a URL against an internal worker address (like CONTAINERIP:8010) that never loaded. A maintainer identified the root cause: on the platform the API URL differs so Actors talk directly to API pods instead of going over the internet, and that internal base URL leaked into signed public URL generation. The fix landed in apify-client-js via PR 745 and the issue was closed. The verified resolution: If getRecordPublicUrl gives you a working signed link locally but a dead internal URL (a 10.x address) on the Apify Platform, you are hitting a client-side bug where the internal API base URL leaked into signed URL generation. The fix is in apify-client-js (PR 745), so update your SDK and client dependencies to a release that includes it and the generated URLs will use the canonical public API URL again. The sync KeyValueStore.getPublicUrl path already handled this correctly by ignoring the provided baseUrl and using the APIFYAPIPUBLICBASE_URL env variable, which is the same approach the fix applied to the client methods.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_563oPeNaOwFeImWWbRuezg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">getRecordPublicUrl returns broken internal URLs when run on the Apify Platform <span>— Vectle</span></a>