paperclipai/paperclip · warning · Error

Task details are still loading. Please try again.

Error message

Task details are still loading. Please try again.

What it means

IssueDetail's attachment upload mutation requires either a conversation (which carries the issue's company) or a fully loaded `loadedIssue`. If neither is present when the user attempts to upload, the mutation throws 'Task details are still loading. Please try again.' This is a deliberate guard preventing an upload against an unresolved/undefined issue id.

Solutions

  1. Disable the attachment upload control until the issue query has loaded (e.g. `isSuccess` from useQuery).
  2. Guard in the handler: check `loadedIssue || conversation` before opening the file picker or calling mutate.
  3. Retry the upload after load completes rather than throwing — surface a toast instructing the user to retry once details are visible.
  4. Verify resolveWritableIssueId/company resolution so the conversation path is used when available.

Example fix

// before
const uploadAttachment = useMutation({
  mutationFn: async (file: File) => {
    if (!loadedIssue) throw new Error("Task details are still loading. Please try again.");
    ...
  },
});

// after
<input type="file" disabled={!conversation && !loadedIssue} onChange={...} />
Defensive patterns

Strategy: validation

Validate before calling

const canUpload = Boolean(conversation || loadedIssue);
if (!canUpload) showToast("Task details are still loading. Please try again.");

Type guard

const issueReady = (i: Issue | null | undefined): i is Issue => Boolean(i?.id && i?.companyId);

Try / catch

try {
  await uploadAttachment.mutateAsync(file);
} catch (err) {
  if (err instanceof Error && err.message.includes("still loading")) {
    showToast("Try again once the task details finish loading.");
  } else { throw err; }
}

Prevention

When it happens

Trigger: Selecting a file in the upload control before the issue detail query resolves (`loadedIssue` is null and there is no `conversation`); calling `uploadAttachment.mutate(file)` programmatically during initial page load; refetch invalidations that clear loadedIssue briefly.

Common situations: User drags a file onto the page immediately after opening a task; slow network makes the issue query take seconds; developer wires an upload handler in an effect that runs before react-query finishes fetching.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-09-18). Data as JSON: /api/errors/1cf0bbdda3477ec1. Report an issue: GitHub.

Appendix: source

Thrown at ui/src/pages/IssueDetail.tsx:5206

          queryKeys.issues.feedbackVotes(issueId!),
          context.previousVotes,
        );
      }
      pushToast({
        title: "Failed to save feedback",
        body: err instanceof Error ? err.message : "Unknown error",
        tone: "error",
      });
    },
  });

  const uploadAttachment = useMutation({
    mutationFn: async (file: File) => {
      if (conversation) {
        return issuesApi.uploadAttachment(conversation.agent.companyId, await resolveWritableIssueId(), file);
      }
      if (!loadedIssue)
        throw new Error("Task details are still loading. Please try again.");
      return issuesApi.uploadAttachment(
        loadedIssue.companyId,
        loadedIssue.id,
        file,
      );
    },
    onSuccess: (result) => {
      setAttachmentError(null);
      queryClient.invalidateQueries({
        queryKey: queryKeys.issues.attachments(issueId ?? result.issueId),
      });
      invalidateIssueDetail();
      if (!issueId) void queryClient.invalidateQueries({ queryKey: queryKeys.issues.detail(result.issueId) });
    },
    onError: (err) => {
      setAttachmentError(err instanceof Error ? err.message : "Upload failed");
    },
  });

View on GitHub (pinned to 3f1d897a7c)