New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paket fails to restore from MyGet feed #2508

Closed
eugene-g opened this Issue Jul 11, 2017 · 12 comments

Comments

Projects
None yet
4 participants
@eugene-g
Contributor

eugene-g commented Jul 11, 2017

Description

5.6.1 and upper gives following error:

Paket failed with:
-> The NuGet source https://www.myget.org/F/<FEED_NAME> for package <PACKAGE_NAME> was not found in the paket.dependencies file with sources [NuGetV3 {Url = "https://api.nuget.org/v3/index.json";
             Authentication = None;};
    NuGetV3 {Url = "https://www.myget.org/F/<FEED_NAME>/api/v3/index.json";
             Authentication = None;}]

Where FEED_NAME and PACKAGE_NAME are our actual names.
paket.dependencies file is valid and I can find mentioned packages manually.

Repro steps

Unfortunately, can't give more details. Package versioning uses ~> operator, if it matters.

Known workarounds

Downgrade to Paket 5.5.3

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jul 11, 2017

Member

can you please provide a repro?

/cc @maartenba @matthid

Member

forki commented Jul 11, 2017

can you please provide a repro?

/cc @maartenba @matthid

@eugene-g

This comment has been minimized.

Show comment
Hide comment
@eugene-g

eugene-g Jul 11, 2017

Contributor

Unfortunately, it is easier to fix, than to make a repro.
Reverted one line from that commit by @matthid and it works now.

I have no idea if it's a correct change and how to create correct repro/test.

Contributor

eugene-g commented Jul 11, 2017

Unfortunately, it is easier to fix, than to make a repro.
Reverted one line from that commit by @matthid and it works now.

I have no idea if it's a correct change and how to create correct repro/test.

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid Jul 11, 2017

Member

I think the correct fix is that we use normalization for comparison only, because otherwise we will never use V3 for any source besides nuget.... I'm not exactly sure where this comparison fails so a repro would definitely help or maybe a verbose log

Member

matthid commented Jul 11, 2017

I think the correct fix is that we use normalization for comparison only, because otherwise we will never use V3 for any source besides nuget.... I'm not exactly sure where this comparison fails so a repro would definitely help or maybe a verbose log

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid Jul 11, 2017

Member

Or maybe the stacktrace would help as well, please run with PAKET_DETAILED_ERRORS=true environment variable.

Member

matthid commented Jul 11, 2017

Or maybe the stacktrace would help as well, please run with PAKET_DETAILED_ERRORS=true environment variable.

@eugene-g

This comment has been minimized.

Show comment
Hide comment
@eugene-g

eugene-g Jul 11, 2017

Contributor

I'm really not in position to disclose any source code. My lunch is over, maybe I'll dig it in my free time.
Here is the stacktrace:

  StackTrace:
        at Paket.RestoreProcess.ExtractPackage@87-22.Invoke(String message)
        at Paket.RestoreProcess.ExtractPackage@73-21.Invoke(Unit unitVar)
        at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@841.Invoke(AsyncParams`1 args)
     --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
        at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a](AsyncImplResult`1 res)
        at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronouslyInCurrentThread[a](CancellationToken token, FSharpAsync`1 computation)
        at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout)
        at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
        at Paket.RestoreProcess.Restore(String dependenciesFileName, FSharpOption`1 projectFile, Boolean force, FSharpOption`1 group, FSharpList`1 referencesFileNames, Boolean ignoreChecks, Boolean failOnChecks, FSharpOption`1 targetFramework)
        at <StartupCode$Paket-Core>.$PublicAPI.Restore@311-11.Invoke(Unit unitVar0)
        at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc`2 action)
        at Paket.Program.main@724-13.Invoke(ParseResults`1 results)
        at Paket.Program.processWithValidation[T](Boolean silent, FSharpFunc`2 validateF, FSharpFunc`2 commandF, ParseResults`1 result)
        at Paket.Program.main$cont@708(ParseResults`1 results, Boolean silent, Boolean fromBootstrapper, Unit unitVar)
        at Paket.Program.main()
Contributor

eugene-g commented Jul 11, 2017

I'm really not in position to disclose any source code. My lunch is over, maybe I'll dig it in my free time.
Here is the stacktrace:

  StackTrace:
        at Paket.RestoreProcess.ExtractPackage@87-22.Invoke(String message)
        at Paket.RestoreProcess.ExtractPackage@73-21.Invoke(Unit unitVar)
        at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@841.Invoke(AsyncParams`1 args)
     --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
        at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a](AsyncImplResult`1 res)
        at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronouslyInCurrentThread[a](CancellationToken token, FSharpAsync`1 computation)
        at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout)
        at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
        at Paket.RestoreProcess.Restore(String dependenciesFileName, FSharpOption`1 projectFile, Boolean force, FSharpOption`1 group, FSharpList`1 referencesFileNames, Boolean ignoreChecks, Boolean failOnChecks, FSharpOption`1 targetFramework)
        at <StartupCode$Paket-Core>.$PublicAPI.Restore@311-11.Invoke(Unit unitVar0)
        at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc`2 action)
        at Paket.Program.main@724-13.Invoke(ParseResults`1 results)
        at Paket.Program.processWithValidation[T](Boolean silent, FSharpFunc`2 validateF, FSharpFunc`2 commandF, ParseResults`1 result)
        at Paket.Program.main$cont@708(ParseResults`1 results, Boolean silent, Boolean fromBootstrapper, Unit unitVar)
        at Paket.Program.main()
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jul 11, 2017

Member

because otherwise we will never use V3 for any source besides nuget

yeah that never worked

Member

forki commented Jul 11, 2017

because otherwise we will never use V3 for any source besides nuget

yeah that never worked

@maartenba

This comment has been minimized.

Show comment
Hide comment
@maartenba

maartenba Jul 11, 2017

Not sure what the HTTP requests are triggering this error? The feed URL looks okay.

maartenba commented Jul 11, 2017

Not sure what the HTTP requests are triggering this error? The feed URL looks okay.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jul 11, 2017

Member

@eugene-g sorry for the trouble. in order to fix it properly I released a new version (Paket 5.6.5) that has more trace info.

Can you please run the same command as before but with addition -v?

It should show one of the following traces:

Downloading with combined url ...
Downloading directly from DownloadLink ...

I assume it's the first one and we do not combine it properly. If you give use the trace then I'm probably able to fix it.

Member

forki commented Jul 11, 2017

@eugene-g sorry for the trouble. in order to fix it properly I released a new version (Paket 5.6.5) that has more trace info.

Can you please run the same command as before but with addition -v?

It should show one of the following traces:

Downloading with combined url ...
Downloading directly from DownloadLink ...

I assume it's the first one and we do not combine it properly. If you give use the trace then I'm probably able to fix it.

@eugene-g

This comment has been minimized.

Show comment
Hide comment
@eugene-g

eugene-g Jul 11, 2017

Contributor

@forki
No "downloading" messages at all.
Failure happens on that line.

Important note: package.Source points to V2 feed. In paket.dependencies we specify only V3 feeds. I remember seeing similar error when somebody tried to switch myget source from v2 to v3 on different project. Back then, package name was always different, but always from custom myget feed. Same story here. Probably, some recent changes in Paket hid the problem and introduced fallback to V2 even when V3 is specified.

Hope it helps. Sorry for being obscure on describing the error.

Contributor

eugene-g commented Jul 11, 2017

@forki
No "downloading" messages at all.
Failure happens on that line.

Important note: package.Source points to V2 feed. In paket.dependencies we specify only V3 feeds. I remember seeing similar error when somebody tried to switch myget source from v2 to v3 on different project. Back then, package name was always different, but always from custom myget feed. Same story here. Probably, some recent changes in Paket hid the problem and introduced fallback to V2 even when V3 is specified.

Hope it helps. Sorry for being obscure on describing the error.

@forki forki closed this in #2509 Jul 11, 2017

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jul 11, 2017

Member

ok this is actually helpful. Can you please retry with 5.6.6?

Member

forki commented Jul 11, 2017

ok this is actually helpful. Can you please retry with 5.6.6?

@eugene-g

This comment has been minimized.

Show comment
Hide comment
@eugene-g

eugene-g Jul 11, 2017

Contributor

@forki it works. We can now remove Paket version pinning on build server.

Contributor

eugene-g commented Jul 11, 2017

@forki it works. We can now remove Paket version pinning on build server.

eugene-g added a commit to eugene-g/Paket that referenced this issue Sep 20, 2017

@eugene-g

This comment has been minimized.

Show comment
Hide comment
@eugene-g

eugene-g Sep 20, 2017

Contributor

I was trying to repro that issue almost 2 months ago and I was pretty sure I reported my results here...

In short: it wasn't reproducible with the same paket.dependencies file and with the same lock file, but on empty project.

I'd suggest to clean backlog by removing needs-test-case tag. And probably remove that "feed normalization" to have less wtf moments in code. Maybe if we won't hide that discrepancy under the rug, eventually we'll be able to pinpoint the problem.

Since I could forget some details, I've built version without V3->V2 fallback and it works fine on the current version of our project. Pull request incoming.

Contributor

eugene-g commented Sep 20, 2017

I was trying to repro that issue almost 2 months ago and I was pretty sure I reported my results here...

In short: it wasn't reproducible with the same paket.dependencies file and with the same lock file, but on empty project.

I'd suggest to clean backlog by removing needs-test-case tag. And probably remove that "feed normalization" to have less wtf moments in code. Maybe if we won't hide that discrepancy under the rug, eventually we'll be able to pinpoint the problem.

Since I could forget some details, I've built version without V3->V2 fallback and it works fine on the current version of our project. Pull request incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment