# ExternalProject/FetchContent\_Add with unresolveable URL hangs forever on Windows, how to fix/prevent.

**URL:** https://discourse.cmake.org/t/externalproject-fetchcontent-add-with-unresolveable-url-hangs-forever-on-windows-how-to-fix-prevent/14358
**Category:** Usage
**Created:** [July 14, 2025, 2:41pm UTC](https://discourse.cmake.org/t/externalproject-fetchcontent-add-with-unresolveable-url-hangs-forever-on-windows-how-to-fix-prevent/14358 "2025-07-14T14:41:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![snoriman](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@snoriman](https://discourse.cmake.org/u/snoriman)
#### Post date: [July 14, 2025, 2:41pm UTC](https://discourse.cmake.org/t/externalproject-fetchcontent-add-with-unresolveable-url-hangs-forever-on-windows-how-to-fix-prevent/14358/1 "2025-07-14T14:41:14Z")

</div>

I’m using `FetchContent_` and had a typo in the `URL` which made CMake (4.0.3) hang forever. I tried adding `TIMEOUT` and `INACTIVITY_TIMEOUT` which didn’t do anything. Is this a bug or should I use another solution to at least get an error/timeout?

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [July 14, 2025, 8:35pm UTC](https://discourse.cmake.org/t/externalproject-fetchcontent-add-with-unresolveable-url-hangs-forever-on-windows-how-to-fix-prevent/14358/2 "2025-07-14T20:35:36Z")

</div>

In my experience, such cases do eventually timeout and give an error. I haven’t seen it hang indefinitely before just because a URL was wrong. For cases that do hang, it is usually because ExternalProject/FetchContent is waiting for user input to enter a password for a SSH key or something similar. To check if that’s what’s happening to you, add `USES_TERMINAL_DOWNLOAD YES` to the `ExternalProject_Add()` or `FetchContent_Declare()` arguments.

---

<div class="post-metadata">

### Author: ![snoriman](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@snoriman](https://discourse.cmake.org/u/snoriman)
#### Post date: [July 15, 2025, 7:50am UTC](https://discourse.cmake.org/t/externalproject-fetchcontent-add-with-unresolveable-url-hangs-forever-on-windows-how-to-fix-prevent/14358/3 "2025-07-15T07:50:45Z")

</div>

Thanks Craig! In this case it was just a typo in an hostname which couldn’t be resolved. I would indeed also expect it to timeout and that the timeout is controlled via the TIMEOUT property, but this didn’t seem to have any impact.
