heroiclabs / nakama-dart

Pure Dart Client for Nakama Server
https://heroiclabs.com/docs/nakama/client-libraries/dart
166 stars 51 forks source link

Leaderboard API not returning records. #91

Closed trey-a-hope closed 6 months ago

trey-a-hope commented 7 months ago

Describe the bug The leaderboards api is not working. Previously, it would return all records for a specific leaderboard. However, now it only returns a leaderboard record if you specify the ownerID with the request. As you can image, this isn't very helpful.

Reproduction Code final leaderboardRecordList = await getNakamaClient().listLeaderboardRecords( limit: 10, leaderboardName: _leaderboardName, session: nakamaSession.value!, // ownerIds: ['7bf0f4c0-0fde-4f57-995f-f9843351679c'], // ownerIds: ['d59c4636-ff71-4490-b58f-554ef1d63f43'], );

final leaderboardRecords = leaderboardRecordList.records;

return leaderboardRecords;

(leaderboardRecords is always empty).

Expected behavior I should be returned all records for a leaderboard without specifying an ownerID.

Screenshots

nakama_dashboard

leaderboard_screen

Flutter Doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.16.3, on macOS 14.2.1 23C71 darwin-arm64, locale en-GB) [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3) ✗ cmdline-tools component is missing Run path/to/sdkmanager --install "cmdline-tools;latest" See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.1) [✓] IntelliJ IDEA Community Edition (version 2021.2.1) [✓] VS Code (version 1.86.0) [✓] Connected device (4 available) [✓] Network resources

! Doctor found issues in 1 category.

pubspec.yaml name: gift_grab description: Game made using Flame where users grab presents to increase their scores. publish_to: "none" version: 1.0.9+9

environment: sdk: ">=2.19.6 <3.0.0"

dependencies: flutter: sdk: flutter

cupertino_icons: ^1.0.2 device_info_plus: ^9.1.1 flame: ^1.4.0 flame_audio: ^2.0.5 go_router: ^13.0.1 hive: ^2.2.3 path_provider: ^2.0.11 toggle_switch: ^2.0.1 nakama: ^1.0.5 flutter_riverpod: ^2.3.6 uuid:

dev_dependencies: flutter_test: sdk: flutter

flutter_lints: ^2.0.0

flutter: uses-material-design: true

assets:

obrunsmann commented 6 months ago

Thank you for reporting. It should be fixed in the 1.0.6 version. Please check once it's released