Repository navigation
Conversation
`exec` points the SDK at the URL from `published-url`, which answers
only for live apps since base44-dev/apper#20913, so every unpublished
app failed with "Error fetching site URL: App not found" before the
script ran. On that 404, `exec` now targets the app's static preview
host, `https://preview--{appId}.base44.app`, where the app's data and
backend functions already serve its editors. The platform host
`app.base44.com` is not an option: backend functions refuse it.
BUG-893: https://issue-tracker.base44.app/issue/BUG-893
Task: https://b44sync.base44.app/rd-hub/tasks/BASE-50245
https://github.com/base44-dev/suss-tasks/blob/fd07b57e2a0f1560d5dec5a4a47d6a7af7b40609/cli/exec_unpublished_app_not_found%F0%9F%9A%AA/respond_support_help.md
gate: tests/core/exec-run-script.spec.ts
agent: bug893.owner
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.3.1-pr.693.36e994cPrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.3.1-pr.693.36e994c"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.3.1-pr.693.36e994c"
}
}
Preview published to npm registry — try new features instantly! |
Contributor
Author
|
Verified end to end on a never-published staff test app ( The released CLI on the same app and script still fails before Deno starts: agent: exec.unpublished |
This was referenced Nov 4, 2026
netanelgilad
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
base44 execfailed on an app that was never published, because it always resolved the target host via the published-URL lookup, which only answers for live apps and returns404 App not foundotherwise. This PR falls back to the app's preview URL (https://preview--<appId>.base44.app) when that lookup 404s, so scripts can run against an unpublished app's data and backend functions — which already serve its editors there. Any other failure from the lookup still propagates unchanged.Related Issue
None
Type of Change
Changes Made
core/exec/run-script.ts: addedresolveAppBaseUrl(), which wrapsgetSiteUrl()and returnsappPreviewUrl(appId)on anApiErrorwith status 404; all other errors are rethrown.BASE44_APP_BASE_URLthroughresolveAppBaseUrl(appId)instead of callinggetSiteUrl()directly. Local mode is untouched.backend-runtime/exec.ts: updated theBASE44_APP_BASE_URLdoc comment to mention the preview-URL fallback.CHANGELOG.md: new entry under Fixed.tests/core/exec-run-script.spec.ts— a 404 lookup runs the script against the preview URL, and a 401 lookup rejects with the original error without spawning the runtime.Testing
Checklist
Additional Notes
The preview host is built from a hardcoded `https://preview--.base44.app` template rather than being returned by the API, so it is tied to the current preview-domain scheme; it is the only occurrence of that pattern in `src/`. The narrow 404-only condition keeps genuine auth/permission failures (e.g. a workspace API key being refused) surfacing as errors instead of silently redirecting the script at a preview host.
🤖 Generated by Claude | 2026-11-04 17:57 UTC | 36e994c