DMouayad / taggy

Dart & Flutter packages to read, write and convert audio tags
MIT License
5 stars 2 forks source link

'rawData.length == 2': is not true. #6

Open ljyh223 opened 1 month ago

ljyh223 commented 1 month ago

First of all I would like to thank the developers for this project, but I'm running into some problems,

E/flutter (14556): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter_rust_bridge/src/basic.dart': Failed assertion: line 145 pos 12: 'rawData.length == 2': is not true.
E/flutter (14556): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter (14556): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter (14556): #2      FlutterRustBridgeBase._parseData (package:flutter_rust_bridge/src/basic.dart:145:12)
E/flutter (14556): #3      FlutterRustBridgeBase._transformRust2DartMessage (package:flutter_rust_bridge/src/basic.dart:133:15)
E/flutter (14556): #4      FlutterRustBridgeBase.executeNormal.<anonymous closure> (package:flutter_rust_bridge/src/basic.dart:70:51)
E/flutter (14556): <asynchronous suspension>
E/flutter (14556): #5      TaggyInterface.writePrimary (package:taggy/src/taggy_api.dart:97:12)
E/flutter (14556): <asynchronous suspension>
E/flutter (14556): #6      _HomePage.build.<anonymous closure> (package:cnd/page/Home.dart:170:23)
E/flutter (14556): <asynchronous suspension>
flutter_rust_bridge 1.82.1 (1.82.6 available)

and flutter doctor

PS C:\Users\jinch> flutter doctor
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.19.6, on Microsoft Windows [版本 10.0.22631.3593], locale zh-CN)
    ! Warning: `flutter` on your path resolves to D:\scoop\apps\flutter-cn\3.19.6\bin\flutter, which is not inside your
      current Flutter SDK checkout at D:\scoop\apps\flutter-cn\current. Consider adding
      D:\scoop\apps\flutter-cn\current\bin to the front of your path.
    ! Warning: `dart` on your path resolves to D:\scoop\apps\flutter-cn\3.19.6\bin\dart, which is not inside your
      current Flutter SDK checkout at D:\scoop\apps\flutter-cn\current. Consider adding
      D:\scoop\apps\flutter-cn\current\bin to the front of your path.
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✗] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
[✓] Android Studio (version 2023.3)
[✓] IntelliJ IDEA Community Edition (version 2024.1)
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 2 categories.
ljyh223 commented 1 month ago

Oh! I forgot to upload my code.

var tag = const Tag(
                trackTitle: 'Title',
                trackArtist: 'Artist',
                album: 'Album',
                albumArtist: 'Album Artist',
                genre: 'Genre',
                year: 2023,
                trackNumber: 1,
                trackTotal: 10, tagType: TagType.VorbisComments, pictures: [],
              );
              await Taggy.writePrimary(
                  path: filePath, tag: tag, keepOthers: true);
DMouayad commented 1 month ago

Thanks for your contribution, but unfortunately I have not been maintaining the package.

Anyway I'll try to help, can you try without setting the tagType ?