rinukkusu / spotify-dart

A dart library for interfacing with the Spotify API.
BSD 3-Clause "New" or "Revised" License
191 stars 91 forks source link

Bug: `album.tracks` throwing exception "type 'double' is not a subtype of type 'int?' in type cast" #207

Closed KRTirtho closed 4 months ago

KRTirtho commented 4 months ago

Now, album.tracks endpoint's Paging is also infected. It says it's the limit, but I doubt it's happening for every int type fields. I doubt it'll start to happen for other fields as well

#0      _$PagingFromJson (package:spotify/src/models/_models.g.dart:523:27)
#1      new Paging.fromJson (package:spotify/src/models/paging.dart:44:57)
#2      Pages.getPage (package:spotify/src/endpoints/endpoint_paging.dart:240:20)
<asynchronous suspension>
#3      AlbumQueries.tracksOfJob.<anonymous closure> (package:spotube/services/queries/album.dart:45:11)
<asynchronous suspension>
#4      _AsyncCompleter.complete (dart:async/future_impl.dart:41:3)
<asynchronous suspension>
#5      Retryer.retryOperation (package:fl_query/src/core/mixins/retryer.dart:17:7)
<asynchronous suspension>
#6      CancelableCompleter.complete.<anonymous closure> (package:async/src/cancelable_operation.dart:425:16)
<asynchronous suspension>
rinukkusu commented 4 months ago

Thanks for chiming in - your fix has been published with 0.13.3! Please report back, if everything works now for your app!

KRTirtho commented 4 months ago

Awesome. Thanks for being so quick 😄

KRTirtho commented 4 months ago

It works fine. I tested the changes with my app