Skip to content

Initial sync fails on 2.0.0-alpha.1 #166

@fcharlier

Description

@fcharlier

Describe the bug
After adding my server to the source, doing the initial sync runs but after it finishes the UI says "No items found".

I can see requests to the API on my server, the last ones are:

"GET /rest/search3.view?v=1.13.0&c=subtracks&u=redacted&s=%28e%29f&t=8b35a78ab3bc179ab9e62eaff8bc3138&query=%22%22&songCount=500&songOffset=41500&artistCount=0&albumCount=0 HTTP/1.0" 200 221820 "-" "subtracks/android"
"GET /rest/search3.view?v=1.13.0&c=subtracks&u=redacted&s=%5B%5EsC&t=dfc113431e137b9533f7990f3b8b2f98&query=%22%22&songCount=500&songOffset=42000&artistCount=0&albumCount=0 HTTP/1.0" 200 215326 "-" "subtracks/android"
"GET /rest/search3.view?v=1.13.0&c=subtracks&u=redacted&s=%40%22Ki&t=c9696f83d2e8792b3b1d0e1a47947f32&query=%22%22&songCount=500&songOffset=42500&artistCount=0&albumCount=0 HTTP/1.0" 200 59040 "-" "subtracks/android"
"GET /rest/getAlbumList2.view?v=1.13.0&c=subtracks&u=redacted&s=redacted&type=newest&size=500&offset=500 HTTP/1.0" 200 145734 "-" "subtracks/android"
"GET /rest/getAlbumList2.view?v=1.13.0&c=subtracks&u=redacted&s=redacted&type=newest&size=500&offset=1000 HTTP/1.0" 200 146106 "-" "subtracks/android"
"GET /rest/getAlbumList2.view?v=1.13.0&c=subtracks&u=redacted&s=redacted&type=newest&size=500&offset=1500 HTTP/1.0" 200 146307 "-" "subtracks/android"
"GET /rest/getAlbumList2.view?v=1.13.0&c=subtracks&u=redacted&s=redacted&type=newest&size=500&offset=2000 HTTP/1.0" 200 146408 "-" "subtracks/android"
"GET /rest/getAlbumList2.view?v=1.13.0&c=subtracks&u=redacted&s=redacted&type=newest&size=500&offset=2500 HTTP/1.0" 200 147273 "-" "subtracks/android"
"GET /rest/getAlbumList2.view?v=1.13.0&c=subtracks&u=redacted&s=redacted&type=newest&size=500&offset=3000 HTTP/1.0" 200 147413 "-" "subtracks/android"
"GET /rest/getAlbumList2.view?v=1.13.0&c=subtracks&u=redacted&s=redacted&type=newest&size=500&offset=3500 HTTP/1.0" 200 1017 "-" "subtracks/android"

I have an error showing in adb logcat, see end of the report.

To Reproduce
Steps to reproduce the behavior:

  1. Add my server to sources
  2. Pull down on the "Music note" tab
  3. Wait for the sync to go on
  4. Nothing

Expected behavior
There should be items in the music library or an error should be shown

Device

  • Model: OnePlus 7
  • OS: Android 12
  • Subtracks version 2.0.0-alpha.1

Server

  • Software: ampache
  • Version: 5.5.7

Additional context
Logs which appear relevant from adb logcat:

05-02 12:39:58.146 25273 25305 E flutter : [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: SqliteException(1): while preparing statement, too many SQL variables, SQL logic error (code 1)
05-02 12:39:58.146 25273 25305 E flutter :   Causing statement: DELETE FROM "songs" WHERE "source_id" = ? AND "id" NOT IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?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, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
05-02 12:39:58.146 25273 25305 E flutter : #0      DriftCommunication.request (package:drift/src/remote/communication.dart:113)
05-02 12:39:58.146 25273 25305 E flutter : #1      _BaseExecutor._runRequest (package:drift/src/remote/client_impl.dart:97)
05-02 12:39:58.146 25273 25305 E flutter : #2      _BaseExecutor.runDelete (package:drift/src/remote/client_impl.dart:114)
05-02 12:39:58.146 25273 25305 E flutter : #3      DeleteStatement.go.<anonymous closure> (package:drift/src/runtime/query_builder/statements/delete.dart:54)
05-02 12:39:58.146 25273 25305 E flutter : #4      DatabaseConnectionUser.doWhenOpened.<anonymous closure> (package:drift/src/runtime/api/connection_user.dart:162)
05-02 12:39:58.146 25273 25305 E flutter : #5      _rootRunUnary (dart:async/zone.dart:1406)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : #6      SubtracksDatabase.deleteSongsNotIn (package:subtracks/database/database.dart:254)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : #7      SyncService._syncAllSongs (package:subtracks/services/sync_service.dart:79)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : #8      DatabaseConnectionUser.transaction.<anonymous closure>.<anonymous closure> (package:drift/src/runtime/api/connection_user.dart:462)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : #9      DatabaseConnectionUser.transaction (package:drift/src/runtime/api/connection_user.dart:455)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : #10     Future.wait.<anonymous closure> (dart:async/future.dart:522)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : #11     SyncService.syncAll.<anonymous closure> (package:subtracks/services/sync_service.dart:19)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : #12     DatabaseConnectionUser.transaction.<anonymous closure>.<anonymous closure> (package:drift/src/runtime/api/connection_user.dart:462)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : #13     DatabaseConnectionUser.transaction (package:drift/src/runtime/api/connection_user.dart:455)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : #14     SyncService.syncAll (package:subtracks/services/sync_service.dart:18)
05-02 12:39:58.146 25273 25305 E flutter : <asynchronous suspension>
05-02 12:39:58.146 25273 25305 E flutter : 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions