question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Paginate MissingMethodException

See original GitHub issue

Hi. While using the Paginate method as described on your website, I get a runtime error:

  System.MissingMethodException -  Method not found: 'System.Collections.Generic.IAsyncEnumerable`1<!!0> SpotifyAPI.Web.SpotifyClient.Paginate(SpotifyAPI.Web.IPaginatable`1<!!0>, SpotifyAPI.Web.IPaginator, System.Threading.CancellationToken)'

I’m using version 6.0 of your library in a C# class library with .NET Standard 2.1, which is referenced by a WPF application with .NET 5.0. PaginateAll is working fine.

var sourcePlaylist = await spotifyClient.Playlists.Get(sourcePlaylistId).ConfigureAwait(false);
var sourceUris = new List<string>();

// This doesn't work
await foreach (var playlistTrack in spotifyClient.Paginate(sourcePlaylist.Tracks))
{
    var track = (FullTrack)playlistTrack.Track;
    sourceUris.Add(track.Uri);
}

// but this works
//var tracks = await spotifyClient.PaginateAll(sourcePlaylist.Tracks).ConfigureAwait(false);

//sourceUris = tracks
//    .Select(t => ((FullTrack)t.Track).Uri)
//    .ToList();

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JohnnyCrazycommented, Mar 2, 2021

Thanks for the repro repo, was a great help 👍

The master contains a fix for this issue. I was using #if NET_STANDARD2_1 checks to enable the Paginate method. This was not very future-friendly (see NET5), so I replaced them with #if !NET_STANDARD2_0 checks.

I will also release a new version containing this fix soon! Thanks again 😃

1reaction
Noxxyscommented, Mar 2, 2021

Hi Jonas. I’ve created the repo: https://github.com/Noxxys/SpotifyIssue I found another problem while comparing with a .NET 5.0 class library, please see the readme file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GORM paginateParams usage problem - grails
I'm just trying to do pagination but until now I couldn't make it. I have 2 domain classes and one to many relationship....
Read more >
HibernateCriteriaBuilder problem
MissingMethodException : No signature of method: grails.orm. ... avoid it as there is no way to paginate without doing another query
Read more >
Calling for Maintainers · Issue #1053 · domaindrivendev ...
I just came by to ask what the current status is? Are there enough maintainers, is the project dead, what is happening? It...
Read more >
[grails-user] list.gsp with filter and pagination - Pascal Demilly
MissingMethodException : No signature of method: java.util.LinkedHashMap.putAll() is applicable for argument types: (org.codehaus.groovy.runtime.
Read more >
Topics with Label: Paginated Report
Report viewing, installation, configuration, and everything else in Power BI Report Server (on-premises).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found