ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.27k stars 627 forks source link

Build Failed on running samples demos in FLUTTER #4807

Closed hiren3897 closed 1 year ago

hiren3897 commented 1 year ago

Hello team, Thanks for the great work on this project

I am trying to get familiar with your project by installing your project on my local machine and trying to use the "samples" apps.

I have thoroughly followed you're documentation for the setup but when I try to build and run the project on my machine the build fails.
https://resources.antmedia.io/docs/flutter-sdk

THE LOG:

Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' has fewer named arguments than those of overridden method 'File.create'.
  Future<File> create({bool recursive = false});
               ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create').
  Future<File> create({bool recursive = false, bool exclusive = false});
               ^
../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' doesn't have the named parameter 'exclusive' of overridden method 'File.create'.
  Future<File> create({bool recursive = false});
               ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create').
  Future<File> create({bool recursive = false, bool exclusive = false});
               ^
../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method 'ForwardingFile.createSync' has fewer named arguments than those of overridden method 'File.createSync'.
  void createSync({bool recursive = false}) =>
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync').
  void createSync({bool recursive = false, bool exclusive = false});
       ^
../../../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method 'ForwardingFile.createSync' doesn't have the named parameter 'exclusive' of overridden method 'File.createSync'.
  void createSync({bool recursive = false}) =>
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync').
  void createSync({bool recursive = false, bool exclusive = false});
       ^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

* Where:
Script '/home/hiren/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1151

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/hiren/snap/flutter/common/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
Exception: Gradle task assembleDebug failed with exit code 1

Can you please help me to resolve this problem.

Thanks

1992MichaelK commented 1 year ago

I get the same error message after updating to Flutter version 3.7.1.

hiren3897 commented 1 year ago

I get the same error message after updating to Flutter version 3.7.1.

It was working with the old flutter version? if yes, please specify.

mekya commented 1 year ago

Thank you for the issue @hiren3897

I've moved the issue to the backlog to schedule.

hiren3897 commented 1 year ago

Hi @mekya, Thank you :)

Mohit-3196 commented 1 year ago

Hi @hiren3897 , Thank you for the issue.

I have checked this and I can reproduce the issue on my end. I tried running the samples with Flutter 3.7.6 and while running the samples, I encountered the same issue.

Launching lib\main.dart on motorola one fusion in debug mode... Running Gradle task 'assembleDebug'... Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level> Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level> Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. /C:/Users/mohit/AppData/Local/Pub/Cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' has fewer named arguments than those of overridden method 'File.create'. Future create({bool recursive = false}); ^ org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create'). Future create({bool recursive = false, bool exclusive = false}); ^ /C:/Users/mohit/AppData/Local/Pub/Cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' doesn't have the named parameter 'exclusive' of overridden method 'File.create'. Future create({bool recursive = false}); ^ org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create'). Future create({bool recursive = false, bool exclusive = false}); ^ /C:/Users/mohit/AppData/Local/Pub/Cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method 'ForwardingFile.createSync' has fewer named arguments than those of overridden method 'File.createSync'. void createSync({bool recursive = false}) => ^ org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync'). void createSync({bool recursive = false, bool exclusive = false}); ^ /C:/Users/mohit/AppData/Local/Pub/Cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method 'ForwardingFile.createSync' doesn't have the named parameter 'exclusive' of overridden method 'File.createSync'. void createSync({bool recursive = false}) => ^ org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync'). void createSync({bool recursive = false, bool exclusive = false}); ^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

BUILD FAILED in 42s Exception: Gradle task assembleDebug failed with exit code 1

It will be assigned to one of the developers in the coming sprint. Thank you.

hiren3897 commented 1 year ago

Thanks @Mohit-3196

USAMAWIZARD commented 1 year ago

Fix is available here @Mohit-3196 is testing it

Mohit-3196 commented 1 year ago

We did some tests for the flutter SDK and it is building now. There are issues with publishing streams and the app keeps crashing. Hence @USAMAWIZARD is refactoring the same.

USAMAWIZARD commented 1 year ago

I was able to fix the crashes will make a pull request soon thanks @Mohit-3196 for your help

Mohit-3196 commented 1 year ago

Thank you @USAMAWIZARD Works well for me now.

@hiren3897 , How are you? The above issues have been fixed so please try the updated SDK and let us know if you face any issues. Thank you

Cebo-Mkhwanazi commented 1 year ago

The above issues are appearing on flutter version 3.7.12 again . Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level> ../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' has fewer named arguments than those of overridden method 'File.create'. Future create({bool recursive = false});.

please help

Cebo-Mkhwanazi commented 1 year ago

Launching lib/main.dart on MGA LX9 in debug mode... Running Gradle task 'assembleDebug'... Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level> ../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' has fewer named arguments than those of overridden method 'File.create'. Future create({bool recursive = false}); ^ org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create'). Future create({bool recursive = false, bool exclusive = false}); ^ ../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' doesn't have the named parameter 'exclusive' of overridden method 'File.create'. Future create({bool recursive = false}); ^ org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create'). Future create({bool recursive = false, bool exclusive = false}); ^ ../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method 'ForwardingFile.createSync' has fewer named arguments than those of overridden method 'File.createSync'. void createSync({bool recursive = false}) => ^ org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync'). void createSync({bool recursive = false, bool exclusive = false}); ^ ../../../.pub-cache/hosted/pub.dev/file-6.1.2/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method 'ForwardingFile.createSync' doesn't have the named parameter 'exclusive' of overridden method 'File.createSync'. void createSync({bool recursive = false}) => ^ org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync'). void createSync({bool recursive = false, bool exclusive = false}); ^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

BUILD FAILED in 8s Exception: Gradle task assembleDebug failed with exit code 1

USAMAWIZARD commented 1 year ago

I tried running the samples application with these versions Flutter 3.7.12 Flutter 3.7.8 Flutter 3.10.1 ( Latest )

Everything is working fine on my end with these versions please make you are using latest code from the master branch. or latest package from the repository ant_media_flutter 1.0.1 we can also connect in a call to check this issue together

Cebo-Mkhwanazi commented 1 year ago

I would love a call


From: USAMA @.> Sent: Monday, May 22, 2023 11:59 PM To: ant-media/Ant-Media-Server @.> Cc: Cebo Mkhwanazi (220110554) @.>; Comment @.> Subject: Re: [ant-media/Ant-Media-Server] Build Failed on running samples demos in FLUTTER (Issue #4807)

I tried running the samples application with these versions Flutter 3.7.12 Flutter 3.7.8 Flutter 3.10.1 ( Latest )

Everything is working fine on my end with these versions please make you are using latest code from the master branchhttps://github.com/ant-media/WebRTC-Flutter-SDK/. we can also connect in a call to check this issue together

— Reply to this email directly, view it on GitHubhttps://github.com/ant-media/Ant-Media-Server/issues/4807#issuecomment-1558648338, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZIFBRSJLPCRTTLOIBDFUSDXHRN4LANCNFSM6AAAAAAUUIKD4U. You are receiving this because you commented.Message ID: @.***>

UKZN email disclaimer: The contents of this e-mail may contain personal information, and/or privileged information, and/or confidential information. The information contained herein is therefore only meant for consumption by the recipient mentioned and for the purpose as specified in the body of the e-mail. Should you receive this e-mail in error kindly inform the sender of such by responding to the sender via a response e-mail and thereafter please delete the original e-mail received as well as the response e-mail. The University of KwaZulu-Natal e-mail platform is meant for business purposes (of the University) only and the University therefore does not accept any liability whatsoever that may arise from instances where such platform is utilised for personal reasons. Any views or opinions expressed in this e-mail represent those of the author and may not necessarily be binding on the University. The author of the e-mail may also not bind the University in any manner that may be construed from the contents of the e-mail unless such sender has been granted the requisite authority to do so by the University.

USAMAWIZARD commented 1 year ago

@Cebo-Mkhwanazi please reach out to me via email on usama.tahseen@antmedia.io

USAMAWIZARD commented 1 year ago

I am closing this issue because of inactivity please reopen the issue If you still facing the problem