{"record":{"id":"703ac9dd428987db","repo":"risingwavelabs/risingwave","slug":"subscription-does-not-exist","errorCode":null,"errorMessage":"subscription {} does not exist","messagePattern":"subscription (.+?) does not exist","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/source/google_pubsub/enumerator/client.rs","lineNumber":59,"sourceCode":"            tracing::warn!(\n                \"pubsub.parallelism is deprecated and will be ignored. \\\n                 Split count now adapts automatically to the number of actors.\"\n            );\n        }\n\n        properties.subscriber_config()?;\n\n        if properties.credentials.is_none() && properties.emulator_host.is_none() {\n            bail!(\"credentials must be set if not using the pubsub emulator\")\n        }\n\n        let sub = properties.subscription_client().await?;\n        if !sub\n            .exists(None)\n            .await\n            .context(\"error checking subscription validity\")?\n        {\n            bail!(\"subscription {} does not exist\", &sub.id())\n        }\n\n        let seek_to = match (properties.start_offset, properties.start_snapshot) {\n            (None, None) => None,\n            (Some(start_offset), None) => {\n                let ts = start_offset\n                    .parse::<i64>()\n                    .context(\"error parsing start_offset\")\n                    .map(|nanos| Utc.timestamp_nanos(nanos).into())?;\n                Some(SeekTo::Timestamp(ts))\n            }\n            (None, Some(snapshot)) => Some(SeekTo::Snapshot(snapshot)),\n            (Some(_), Some(_)) => {\n                bail!(\"specify at most one of start_offset or start_snapshot\")\n            }\n        };\n\n        if let Some(seek_to) = seek_to {","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/google_pubsub/enumerator/client.rs#L41-L77","documentation":"After building the subscription client, the PubSub enumerator verifies the subscription actually exists via sub.exists(). If the PubSub service reports the subscription is absent, new() bails with this error including the subscription id. A source cannot read from a subscription that Google Cloud does not have.","triggerScenarios":"Creating/starting a PubSub source whose `pubsub.subscription` names a subscription that doesn't exist in the target GCP project (or the project the credentials resolve to), causing the exists() check to return false.","commonSituations":"Typo in subscription name; subscription created in a different project than the credentials' project; subscription auto-deleted by PubSub after inactivity (expiration/deletion policy); connecting to an emulator that has no subscription set up.","solutions":["Run `gcloud pubsub subscriptions list` (or check the console) and copy the exact subscription id into the WITH clause.","Ensure the credentials' project matches the project that owns the subscription, or qualify the subscription with the correct project.","Create the missing subscription: `gcloud pubsub subscriptions create my-sub --topic=my-topic`.","If using the emulator, create the topic and subscription in the emulator before starting RisingWave.","Check subscription expiration: recreate it or remove the expiration policy if PubSub auto-deleted it."],"exampleFix":"-- before (typo / wrong project)\nWITH (connector = 'google_pubsub', pubsub.subscription = 'my-subs')\n-- after (exact existing subscription id)\nWITH (connector = 'google_pubsub', pubsub.subscription = 'projects/my-project/subscriptions/my-sub')","handlingStrategy":"validation","validationCode":"# verify the subscription exists before creating the source\ngcloud pubsub subscriptions describe projects/my-project/subscriptions/my-sub\ngcloud pubsub subscriptions list --format=\"value(name)\"","typeGuard":"async fn subscription_exists(client: &Subscription, project: &str, name: &str) -> bool {\n    client.exists(None).await.unwrap_or(false)\n}","tryCatchPattern":"match client::new(props).await {\n    Err(e) if e.to_string().contains(\"does not exist\") => {\n        eprintln!(\"create the subscription first, or fix its name/project: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Copy subscription ids directly from `gcloud pubsub subscriptions list`, never by memory.","Confirm the credentials' project matches the subscription's project.","Disable subscription expiration policies for long-lived source subscriptions."],"tags":["gcp","pubsub","resource-not-found","configuration"],"backgroundTag":"entity-not-found","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}