Closed EarlGreytea16 closed 1 year ago
Apologies, this error can occur if you use an older version of rxdart, and the intention was to support both the old and new rxdart versions. I'll make a fix now.
Okay, I will update rxdart later. Thanks for the response.
I have just committed a fix to master
. Before you upgrade rxdart, would you mind first testing if this fix clears the error for you?
FYI, to test master
you can use this dependency override in your pubspec.yaml:
dependency_overrides:
audio_session:
git:
url: https://github.com/ryanheise/audio_session.git
It seems that the app depends on audio service fork from 0.18.0 (https://github.com/SongTube/audio_service-1) and it is forcing to use rxdart 0.26.0
I dont know the difference between setMockMethodCallHandler and setMethodCallHandler (https://github.com/ryanheise/audio_service/compare/master...SongTube:audio_service-1:master )but I'll try that. Thank you.
I got an error when pub get
S C:\Users\user\Desktop\SongTube-App-development\SongTube-App-development> D:\flutter\bin\flutter.bat pub get
Because just_audio >=0.9.7 <0.9.14 depends on audio_session ^0.1.6 and just_audio >=0.9.14 <0.9.22 depends on audio_session ^0.1.6+1, just_audio >=0.9.7 <0.9.22 requires audio_session ^0.1.6.
And because just_audio >=0.9.22 <0.9.29 depends on audio_session ^0.1.7 and just_audio >=0.9.29 depends on audio_session ^0.1.10, just_audio >=0.9.7 requires audio_session from hosted.
So, because songtube depends on both just_audio ^0.9.12 and audio_session from git, version solving failed.
Running "flutter pub get" in SongTube-App-development...
pub get failed (1; So, because songtube depends on both just_audio ^0.9.12 and audio_session from git, version solving
failed.)
just_audio's version is 0.9.30 in pubspec.lock after running pub get
Are you using dependency_override:
or just dependencies:
?
The link didn't show me any mention of audio_session.
Because songtube depends on just_audio ^0.9.30 which depends on audio_session ^0.1.10, audio_session from hosted is required.
So, because songtube depends on audio_session from git, version solving failed.
Running "flutter pub get" in SongTube-App-development...
pub get failed (1; So, because songtube depends on audio_session from git, version solving failed.)
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# Error reporting
# sentry_flutter: ^4.0.6
# Media Playback Packages
# flutter_audio_query null salfety by https://github.com/Mayb3Nots/flutter_audio_query
flutter_audio_query:
git:
url: https://github.com/harshmandan/flutter_audio_query
ref: master
video_player:
git:
url: https://github.com/SongTube/video_player
ref: master
just_audio: ^0.9.30
audio_session:
git:
url: https://github.com/ryanheise/audio_session.git
I had erased pubspec.lock but I got an error again.
With what you've just copied and pasted, I can't tell what section audio_session
is under. There is no mention of dependency_overrides
here. There is only a section called dependencies
but the indentation doesn't help to indicate the parent. Anyway, the main problem is that I don't see that you've actually declared the audio_session version under the dependency_overrides
section.
It seems that downgrading audio session to 0.1.10 had solved the problem
Yes, the bug was introduced in 0.1.11 along with a new feature, but I am trying to confirm with you whether the fix committed to master actually worked. Hence, can you answer my question about dependency_overrides? It does not seem according to what you copied and pasted that you actually used a dependency override.
Oh I had added audio session on dependencies.. sorry for that. And I got another log after adding dependencies.
> Task :app:compileFlutterBuildDebug
Invalid depfile: C:\Users\user\Desktop\SongTube-App-development\SongTube-App-development\.dart_tool\flutter_build\bf2aced7ecaee0e481345cfcac4b4462\kernel_snapshot.d
Invalid depfile: C:\Users\user\Desktop\SongTube-App-development\SongTube-App-development\.dart_tool\flutter_build\bf2aced7ecaee0e481345cfcac4b4462\kernel_snapshot.d
Error: Couldn't resolve the package 'audio_service' in 'package:audio_service/audio_service.dart'.
Couldn't resolve the package 'audio_service' in 'package:audio_service/audio_service.dart'.
lib/main.dart:21:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/lib.dart:3:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/internal/legacyPreferences.dart:7:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/provider/mediaProvider.dart:23:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/provider/preferencesProvider.dart:5:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/musicPlayer/collapsedPanel.dart:13:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/musicPlayer/expandedPanel.dart:6:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/youtubePlayer/collapsedPanel.dart:1:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/screens/music.dart:2:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/screens/library.dart:2:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/internal/models/playlist.dart:4:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/youtubePlayer/videoPlayer.dart:4:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/service/playerService.dart:7:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/service/screenStateStream.dart:5:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/musicPlayer/ui/playerBody.dart:3:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/screens/musicScreen/tabs/albums.dart:4:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/screens/musicScreen/tabs/artist.dart:2:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/screens/musicScreen/tabs/genre.dart:2:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/screens/musicScreen/tabs/songs.dart:1:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/musicPlayer/ui/playerControls.dart:15:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/ui/sheets/musicEqualizer.dart:3:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/ui/internal/snackbar.dart:9:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/screens/musicScreen/components/songsList.dart:4:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/internal/models/mediaItemSorts.dart:1:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/screens/musicScreen/components/music_type_expandable.dart:3:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/musicPlayer/currentPlaylist.dart:3:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/musicPlayer/ui/playerSlider.dart:3:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/musicPlayer/ui/randomButton.dart:5:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/players/components/musicPlayer/ui/repeatButton.dart:5:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/pages/tagsEditor.dart:2:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
^
lib/ui/sheets/localPlaylistSheet.dart:1:8: Error: Not found: 'package:audio_service/audio_service.dart'
import 'package:audio_service/audio_service.dart';
I guess that you've deleted the audio_service dependency. What I asked was to simply copy and paste the above code into your pubspec.yaml without changing anything else, but now I can't see what your pubspec.yaml looks like so I don't know. Nothing in the change I originally asked you to copy/paste should have caused that error so you must have done something else.
Can you please revert to your last working version before you made these changes, and then simply copy/paste in the code that I gave you above into your pubspec.yaml?
name: songtube
description: A new Flutter project.
publish_to: none
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 6.5.0+1400
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# Error reporting
# sentry_flutter: ^4.0.6
# Media Playback Packages
# flutter_audio_query null salfety by https://github.com/Mayb3Nots/flutter_audio_query
flutter_audio_query:
git:
url: https://github.com/harshmandan/flutter_audio_query
ref: master
video_player:
git:
url: https://github.com/SongTube/video_player
ref: master
just_audio: ^0.9.30
audio_service: ^0.18.7
# NewPipe Extractor
newpipeextractor_dart:
path: ../NewPipeExtractor_Dart
# Device Providers
shared_preferences: ^2.0.6
provider: ^6.0.0
device_info: ^2.0.2
path_provider: ^2.0.2
package_info: ^2.0.2
ext_storage: ^1.0.3
permission_handler: ^8.3.0
file_picker: ^3.0.2
path: ^1.7.0
# Text
intl: ^0.17.0
string_validator: ^0.3.0
google_fonts: ^2.2.0
# HTTP
dio: ^4.0.0
http: ^0.13.3
flutter_inappwebview: ^5.3.2
flutter_html:
git:
url: https://github.com/SongTube/flutter_html
# Icons
material_design_icons_flutter: ^4.0.5955
eva_icons_flutter: ^3.0.0
# Animations
shimmer: ^2.0.0
avatar_glow: ^2.0.1
flutter_glow: ^0.2.0
autolist:
git:
url: https://github.com/SongTube/autolist
ref: master
image_fade: ^0.2.1
animations: ^2.0.0
loading_indicator: ^2.1.1
floating_dots: ^0.2.2
# Tools
flutter_share: ^2.0.0
audio_tagger:
git: https://github.com/SongTube/audio_tagger
share: ^2.0.4
flutter_ffmpeg:
git:
url: https://github.com/SongTube/flutter-ffmpeg
ref: master
url_launcher: ^6.0.6
transparent_image: ^2.0.0
grouped_list: ^4.0.0
volume: ^1.0.1
flutter_screen: ^0.0.2
flutter_pip:
git:
url: https://github.com/Artx-II/flutter_pip
ref: main
file_operations:
git:
url: https://github.com/SongTube/file_operations
ref: main
apk_installer:
git:
url: https://github.com/SongTube/apk_installer
ref: main
# Database
sqflite: ^2.0.0+3
# Misc
flutter_xlider:
git:
url: https://github.com/swaroopsuthar/flutter_xlider.git
ref: master
flutter_material_color_picker: ^1.0.5
flutter_keyboard_visibility: ^5.0.2
flutter_staggered_grid_view: ^0.4.0
palette_generator: ^0.3.0
flutter_markdown: ^0.6.2
md2_tab_indicator: ^1.0.2
dependency_overrides:
platform: ^3.1.0
flutter_math_fork: ^0.5.0
html: ^0.15.0
audio_session:
git:
url: https://github.com/ryanheise/audio_session.git
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
- assets/LICENSE
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
fonts:
- family: YTSans
fonts:
- asset: assets/fonts/youtube-sans-medium.ttf
weight: 500
- asset: assets/fonts/youtube-sans-light.ttf
weight: 300
- asset: assets/fonts/youtube-sans-bold.ttf
weight: 700
- family: Product Sans
fonts:
- asset: assets/fonts/productSans/bold.ttf
weight: 700
- asset: assets/fonts/productSans/regular.ttf
weight: 400
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
I'm sorry I was unable to wait that long, so I went ahead and published it without your confirmation, and I'll close this issue. If you continue to run into issues with the new release, post below and I'll re-open.
Ok thanks. 👍
Here is the pubspec.yaml(use this if you want to test with this) pubspec.zip
This is the commit about the app https://github.com/EarlGreytea16/testbuilderror/commit/c1e819c6707c0fa36452fd4f15fe35d098c07b26
And this is the build log https://github.com/EarlGreytea16/testbuilderror/actions/runs/3656298545/jobs/6178580789
It seems to be another rxdart issue
As I said, I already published the fix because I couldn't wait for you to figure out how to reference the git version in dependency overrides. Now even after I've done that you're still trying to reference the git version?
https://stackoverflow.com/questions/67322054/the-getter-value-isnt-defined-for-the-type-behaviorsubject