laurent22/joplin · error · Error

Could not verify the share status of this notebook - abortin

Error message

Could not verify the share status of this notebook - aborting. Please try again when you are connected to the internet.

What it means

Thrown by the leaveSharedFolder command when, after refreshing shares from the server, no share object matches the given folderId. The refresh (ShareService.refreshShares()) either failed silently, returned an incomplete list due to no connectivity, or the folder isn't actually a share root. The command treats this as unsafe and aborts rather than deleting a notebook it can't verify is shared.

Source

Thrown at packages/lib/commands/leaveSharedFolder.ts:33

	force?: boolean;
}

export const runtime = (): CommandRuntime => {
	return {
		execute: async (_context: CommandContext, folderId: string = null, { force = false }: Options = {}) => {
			const answer = force ? true : await shim.showConfirmationDialog(
				_('This will remove the notebook from your collection and you will no longer have access to its content. Do you wish to continue?'),
			);
			if (!answer) return;

			try {
				// Since we are going to delete the notebook, do some extra safety checks. In particular:
				// - Check that the notebook is indeed being shared.
				// - Check that it does **not** belong to the current user.

				const shares = await ShareService.instance().refreshShares();
				const share = shares.find(s => s.folder_id === folderId);
				if (!share) throw new Error(_('Could not verify the share status of this notebook - aborting. Please try again when you are connected to the internet.'));

				await ShareService.instance().leaveSharedFolder(folderId, share.user.id);
			} catch (error) {
				logger.error(error);
				await shim.showErrorDialog(_('Error: %s', error.message));
			}
		},
		enabledCondition: 'joplinServerConnected && folderIsShareRootAndNotOwnedByUser',
	};
};

View on GitHub (pinned to 2654b33620)

Solutions

  1. Restore connectivity and retry — the command depends on a fresh share list from the server.
  2. Confirm you are connected to the Joplin Server (check sync status) before leaving the share.
  3. If the server is reachable but the share is missing, verify the share still exists via the Joplin Server admin/UI.
  4. Retry the action; transient server-side issues often resolve on the next attempt.
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify connectivity and share presence before invoking the command
const shares = await ShareService.instance().refreshShares();
const share = shares.find(s => s.folder_id === folderId);
if (!share) {
  // not shared or offline — do not invoke leaveSharedFolder
  showNotSharedOrOffline();
  return;
}

Try / catch

try {
  await leaveSharedFolder(folderId);
} catch (error) {
  if (/Could not verify the share status/.test(error.message)) {
    // prompt the user to reconnect and retry
    showConnectivityRetry();
    return;
  }
  throw error;
}

Prevention

When it happens

Trigger: Invoking leaveSharedFolder for a folderId while offline or while the Joplin Server share list doesn't include that folder. refreshShares() returns without the matching share, so `shares.find(s => s.folder_id === folderId)` is undefined.

Common situations: No internet connection when leaving a shared notebook; the Joplin Server revoked the share between the UI rendering and the command executing; transient server error returning a partial share list; folder is local-only but the command was somehow enabled.

Related errors


AI-assisted analysis of laurent22/joplin@2654b33620 (2026-08-12). Data as JSON: /api/errors/74cef1106fb725ea. Report an issue: GitHub.