OpenSpec icon indicating copy to clipboard operation
OpenSpec copied to clipboard

Error while flushing PostHog PostHogFetchNetworkError: Network error while fetching PostHog

Open animalau opened this issue 8 months ago • 4 comments

Error while flushing PostHog PostHogFetchNetworkError: Network error while fetching PostHog
at retriable (file:///C:/Users/l00011440/AppData/Roaming/npm/node_modules/@fission-ai/openspec/node_modules/@posthog/core/dist/posthog-core-stateless.mjs:627:23) at async retriable (file:///C:/Users/l00011440/AppData/Roaming/npm/node_modules/@fission-ai/openspec/node_modules/@posthog/core/dist/utils/index.mjs:25:25)
at async PostHog.fetchWithRetry (file:///C:/Users/l00011440/AppData/Roaming/npm/node_modules/@fission-ai/openspec/node_modules/@posthog/core/dist/posthog-core-stateless.mjs:616:16)
at async PostHog._flush (file:///C:/Users/l00011440/AppData/Roaming/npm/node_modules/@fission-ai/openspec/node_modules/@posthog/core/dist/posthog-core-stateless.mjs:588:17) {
error: [DOMException [AbortError]: This operation was aborted], [cause]: [DOMException [AbortError]: This operation was aborted] } Error while flushing PostHog PostHogFetchNetworkError: Network error while fetching PostHog at retriable (file:///C:/Users/l00011440/AppData/Roaming/npm/node_modules/@fission-ai/openspec/node_modules/@posthog/core/dist/posthog-core-stateless.mjs:627:23) at async retriable (file:///C:/Users/l00011440/AppData/Roaming/npm/node_modules/@fission-ai/openspec/node_modules/@posthog/core/dist/utils/index.mjs:25:25) at async PostHog.fetchWithRetry (file:///C:/Users/l00011440/AppData/Roaming/npm/node_modules/@fission-ai/openspec/node_modules/@posthog/core/dist/posthog-core-stateless.mjs:616:16)
at async PostHog._flush (file:///C:/Users/l00011440/AppData/Roaming/npm/node_modules/@fission-ai/openspec/node_modules/@posthog/core/dist/posthog-core-stateless.mjs:588:17) {
error: [DOMException [AbortError]: This operation was aborted], [cause]: [DOMException [AbortError]: This operation was aborted] }

animalau avatar Mar 31 '26 08:03 animalau

how to handle this problem when using openspec in enterpise enviroment

animalau avatar Mar 31 '26 08:03 animalau

On MacOS (worked for me): echo 'export OPENSPEC_TELEMETRY=0' >> ~/.zshrc && export OPENSPEC_TELEMETRY=0 On Windows (I have no way to test this): [System.Environment]::SetEnvironmentVariable("OPENSPEC_TELEMETRY", "0", "User")

parag-pv avatar Apr 01 '26 15:04 parag-pv

Thanks for flagging this. This is a real bug for locked-down enterprise environments, and telemetry failures should not surface like this in normal CLI use. For now, disabling telemetry is the right workaround with openspec config set telemetry.enabled false or OPENSPEC_TELEMETRY=0. We are treating this as a priority fix.

alfred-openspec avatar Apr 07 '26 13:04 alfred-openspec

Thanks for flagging this. This is a real bug for locked-down enterprise environments, and telemetry failures should not surface like this in normal CLI use. For now, disabling telemetry is the right workaround with openspec config set telemetry.enabled false or OPENSPEC_TELEMETRY=0. We are treating this as a priority fix.

this command doesn't seem to be working properly.

% openspec --version
1.2.0
% openspec config set telemetry.enabled false
Error: Invalid configuration key "telemetry.enabled". Unknown top-level key "telemetry".
Use "openspec config list" to see available keys.
Pass --allow-unknown to bypass this check.

should i add the --allow-unknown argument ?

hiyms avatar Apr 11 '26 04:04 hiyms