Search code examples
f#paket

Paket TimeoutException


I have the following paket.dependencies:

source https://www.nuget.org/api/v2

nuget Fable.Compiler 1.3.0-beta-002 beta
nuget FSharp.Core
nuget Fable.Core prerelease
nuget Fable.Import.Browser

clitool dotnet-fable 1.2.0-beta-005

group Build
framework: net46

    source https://nuget.org/api/v2
    nuget FSharp.Core  redirects:force, content:none
    nuget FAKE

Trying to run an update gives me the following error:

[harm@localhost fable-powerpack]$ mono ./.paket/paket.exe update
Paket version 5.119.9-beta001
Resolving packages for group Build:
Performance:
 - Resolver: 3 minutes (1 runs)
    - Runtime: 116 milliseconds
    - Blocked (retrieving package versions): 3 minutes (1 times)
 - Average Request Time: 17 seconds
 - Number of Requests: 11
 - Runtime: 3 minutes, 1 second
Paket failed with
-> Unable to retrieve package versions for 'FAKE'
-> TimeoutException: Waited 180 seconds for a request to finish.
         Check the following sources, they might be rate limiting and stopped responding:
          - https://www.nuget.org/api/v2

Trying v3 in paket.dependencies gives me:

[harm@localhost fable-powerpack]$ SET PAKET_RESOLVER_TASK_TIMEOUT=-1
bash: SET: command not found...
[harm@localhost fable-powerpack]$ mono ./.paket/paket.exe update
Paket version 5.119.9-beta001
Resolving packages for group Build:
Possible Performance degration, could not retrieve 'https://nuget.org/api/v3/Packages?semVerLevel=2.0.0&$filter=Id eq 'FAKE'', ignoring further warnings for this source
Trial1 (NuGet.GetVersions) did not yield any results, trying again.
Trial1 (NuGet.GetVersions) did not yield any results, trying again.
Performance:
 - Resolver: 57 seconds (1 runs)
    - Runtime: 71 milliseconds
    - Blocked (retrieving package versions): 57 seconds (1 times)
 - Average Request Time: 7 seconds
 - Number of Requests: 12
 - Runtime: 58 seconds
Paket failed with
-> Unable to retrieve package versions for 'FAKE'
-> Could not find versions for package FAKE on https://nuget.org/api/v3.
-> Source 'https://nuget.org/api/v3' yielded no results
    -  Request 'https://nuget.org/api/v3/FindPackagesById()?semVerLevel=2.0.0&id='FAKE'' finished with error
    -> Could not retrieve data from 'https://nuget.org/api/v3/FindPackagesById()?semVerLevel=2.0.0&id='FAKE''
    -> RequestFailedException: Request to 'https://www.nuget.org/api/v3/FindPackagesById()?semVerLevel=2.0.0&id='FAKE'' failed with: 'NotFound'
    -  Request 'https://nuget.org/api/v3/Packages?semVerLevel=2.0.0&$filter=Id eq 'FAKE'' finished with error
    -> Could not retrieve data from 'https://nuget.org/api/v3/Packages?semVerLevel=2.0.0&$filter=tolower(Id) eq 'fake''
    -> RequestFailedException: Request to 'https://www.nuget.org/api/v3/Packages?semVerLevel=2.0.0&$filter=tolower(Id) eq 'fake'' failed with: 'NotFound'

Does this have anything to do with unreliable uptime of nuget.org or is there a setting that can be changed in paket?


Solution

  • The following seems to help:

    export PAKET_RESOLVER_TASK_TIMEOUT=-1
    

    It will take a long time to complete compared to npm/yarn but it does complete.