tonhowtf/omniget · warning · anyhow::Error
Instagram Stories are not supported. Only public posts…
Error message
Instagram Stories are not supported. Only public posts, reels and carousels.
What it means
An explicit feature gate: `get_media_info` rejects any URL whose path starts with `/stories/` via `is_story_url`. Instagram Stories require authentication and an ephemeral-media model the downloader does not implement, so story URLs fail fast with this message instead of attempting extraction.
Solutions
- Ask the user for the regular post/reel URL instead of a story link, or download the story manually
- Pre-filter URLs client-side: reject any URL whose path starts with `/stories/` before calling `get_media_info`
- If story support is needed, implement an authenticated story fetch (session cookies + story GraphQL endpoints) in the platform module
- Handle the error gracefully in the UI with a clear 'stories unsupported' message
Example fix
// before
let info = downloader.get_media_info(user_url).await?;
// after
if url::Url::parse(&user_url).map(|u| u.path().to_lowercase().starts_with("/stories/")).unwrap_or(false) {
anyhow::bail!("Instagram Stories are not supported by this downloader");
}
let info = downloader.get_media_info(&user_url).await?; Defensive patterns
Strategy: validation
Validate before calling
fn is_instagram_story(url: &str) -> bool {
url::Url::parse(url)
.map(|u| u.path().to_lowercase().starts_with("/stories/"))
.unwrap_or(false)
}
// call before: if is_instagram_story(&user_url) { bail!("stories unsupported"); } Type guard
fn is_supported_ig_url(url: &str) -> bool {
url::Url::parse(url).ok()
.map(|u| {
let segs: Vec<&str> = u.path().split('/').filter(|s| !s.is_empty()).collect();
matches!(segs.first(), Some(&"p") | Some(&"reel") | Some(&"reels") | Some(&"tv"))
|| segs.first() == Some(&"share")
})
.unwrap_or(false)
} Try / catch
match downloader.get_media_info(&url).await {
Err(e) if e.to_string().contains("Stories are not supported") => {
ui.show_notice("Instagram Stories are not supported; use the post or reel URL");
}
other => other?,
} Prevention
- Filter out /stories/ URLs at the input layer before dispatching to the Instagram downloader
- Show users which link types are supported (public posts, reels, carousels) in the UI
- Resolve /share/ links and re-check the resolved path for /stories/ before extraction
- Add a unit test covering is_story_url with typical story, post, and share links
When it happens
Trigger: Passing any Instagram story URL (path beginning `/stories/<user>/<id>`) to `InstagramDownloader::get_media_info`. Only public posts (`/p/`), reels (`/reel/`, `/reels/`), IGTV (`/tv/`), and resolvable `/share/` links are supported.
Common situations: Users paste a story link copied from the Instagram app; a share link redirects to a story URL after `resolve_share_link`; automation feeds story URLs without pre-filtering.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- escolha pelo menos um arquivo
- um carrossel tem de 2 a 20 arquivos
- informe o token e o ID da conta do Instagram
- a API oficial so aceita URLs publicas (https://…) para os…
- Instagram Stories are not supported. Only public posts…
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/4007a2193d960747.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/platforms/instagram/mod.rs:668
"instagram"
}
fn can_handle(&self, url: &str) -> bool {
if let Ok(parsed) = url::Url::parse(url) {
if let Some(host) = parsed.host_str() {
let host = host.to_lowercase();
return host == "instagram.com"
|| host.ends_with(".instagram.com")
|| host == "ddinstagram.com"
|| host.ends_with(".ddinstagram.com");
}
}
false
}
async fn get_media_info(&self, url: &str) -> anyhow::Result<MediaInfo> {
if Self::is_story_url(url) {
return Err(anyhow!(
"Instagram Stories are not supported. Only public posts, reels and carousels."
));
}
let post_id = if let Some(share_id) = Self::extract_share_id(url) {
let resolved = self.resolve_share_link(&share_id).await?;
Self::extract_post_id(&resolved).ok_or_else(|| anyhow!("Could not extract post ID"))?
} else {
Self::extract_post_id(url).ok_or_else(|| anyhow!("Could not extract post ID"))?
};
let filename_base = format!("instagram_{}", post_id);
let embed_result = self.request_embed(&post_id).await;
let media = match embed_result {
Ok(data) => Self::extract_media_from_embed(&data),
Err(_embed_err) => match self.request_gql(&post_id).await {
Ok(data) => Self::extract_media_from_gql(&data),View on GitHub (pinned to 8600b91f42)