Open VladRoscaDev opened 3 years ago
Thank you for submitting this Issue.
Does the problem with the example provided in the package also occur with their access?
In my test with the 2.0.0 and the 1.1.3 I can not reproduce this Issue.
config: FbNewsConfig( backgroundColor: Colors.white, subtitle: 'from Facebook', waiting: Column( children: [ CircularProgressIndicator(), SizedBox(height: 10), ], ), noDataOrError: Card( color: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(15)), elevation: 5, child: Container( width: context.width * 0.8, height: context.height * 0.2, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ SizedBox( width: context.width * 0.02, ), Icon( Icons.warning, color: Colors.orange, size: 50, ), SizedBox( width: context.width * 0.02, ), Flexible( child: Text( 'There seems to be an issue with the facebook feed. Please come back later and try again', style: TextStyle( color: Colors.black, fontWeight: FontWeight.bold), ), ) ], ), ), ), fields: [ FbNewsFields.header, FbNewsFields.attachmentsPhotos, FbNewsFields.attachmentsShare, FbNewsFields.attachmentsVideos, FbNewsFields.attachmentsVideoDirectResponseAutoplay, FbNewsFields.message, FbNewsFields.footer, ],
This is how I wrote the code according to your example. How do I align the code so it can be more understandable?
I think this is the same issue: https://stackoverflow.com/questions/64191623/the-video-player-plugin-fails-to-play-videos-flutter
Any updates on this?
i have update the version to version 2.0.0 and i still get the following error on both physical device and on emulator:
E/flutter ( 479): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(NullPointerException, java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.endsWith(java.lang.String)' on a null object reference, null, null)
E/flutter ( 479): #0 VideoPlayerApi.create
package:video_player_platform_interface/messages.dart:189
E/flutter ( 479): <asynchronous suspension>
E/flutter ( 479): #1 MethodChannelVideoPlayer.create
package:video_player_platform_interface/method_channel_video_player.dart:47
E/flutter ( 479): <asynchronous suspension>
E/flutter ( 479): #2 VideoPlayerController.initialize
package:video_player/video_player.dart:308
E/flutter ( 479): <asynchronous suspension>
Do you need any more info or any help on this?
@VladRoscaDev sorry for the late response.
I have updated the dependencies. Could you check if the problem still occurs?
You can include the version as follows
flutter_fb_news:
git:
url: https://github.com/cedteg/flutter_fb_news.git
I will test this out, also I noticed something, but maybe this is how it is intended. I don't get access to all the feed, it loads up 25 posts, no matter the limit that I set.
Is this how it is supposed to be or do i have to specify something else. I have set the limit to 50 posts
I created a Issue for the bug https://github.com/cedteg/flutter_fb_news/issues/24
I will test this out, also I noticed something, but maybe this is how it is intended. I don't get access to all the feed, it loads up 25 posts, no matter the limit that I set.
Is this how it is supposed to be or do i have to specify something else. I have set the limit to 50 posts
You need to change the class FbNewsService like this
The video doesn't work, facebook doesn't send me the "source" url, just the regular url. Does anyone know why?
I will test this out, also I noticed something, but maybe this is how it is intended. I don't get access to all the feed, it loads up 25 posts, no matter the limit that I set. Is this how it is supposed to be or do i have to specify something else. I have set the limit to 50 posts
You need to change the class FbNewsService like this
Thank you for the hint
The video doesn't work, facebook doesn't send me the "source" url, just the regular url. Does anyone know why?
Strange,
but it looks like the video is not publicly available and the API token has no access to the video
Any updates on this?
I kept testing and this is the error that I am getting:
[ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(NullPointerException, java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.endsWith(java.lang.String)' on a null object reference, null, null)
E/flutter (20858): #0 VideoPlayerApi.create
package:video_player_platform_interface/messages.dart:189
E/flutter (20858): <asynchronous suspension>
E/flutter (20858): #1 MethodChannelVideoPlayer.create
package:video_player_platform_interface/method_channel_video_player.dart:47
E/flutter (20858): <asynchronous suspension>
E/flutter (20858): #2 VideoPlayerController.initialize
package:video_player/video_player.dart:308
E/flutter (20858): <asynchronous suspension>
E/flutter (20858): #3 _FbNewsAttachmentsVideoState.initPlayer
package:flutter_fb_news/fb_news_attachments_video.dart:34
E/flutter (20858): <asynchronous suspension>
E/flutter (20858):
Is it possible that facebook doesn't share videos, or does facebook id required some specific config for sharing videos?
Any updates on this?
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
FbNewsFields.header, FbNewsFields.attachmentsPhotos, FbNewsFields.attachmentsShare, FbNewsFields.attachmentsVideos, FbNewsFields.attachmentsVideoDirectResponseAutoplay, FbNewsFields.message, FbNewsFields.footer,
]Expected behavior When i run the app I want to see the videos too.
Screenshots
Smartphone (please complete the following information):
Additional context The error that I get is the following:
E/flutter ( 6441): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: 'package:flutter/src/services/message_codec.dart': Failed assertion: line 111 pos 15: 'code != null': is not true. E/flutter ( 6441): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39) E/flutter ( 6441): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5) E/flutter ( 6441): #2 new PlatformException package:flutter/…/services/message_codec.dart:111 E/flutter ( 6441): #3 VideoPlayerApi.create package:video_player_platform_interface/messages.dart:205 E/flutter ( 6441): <asynchronous suspension> E/flutter ( 6441): #4 MethodChannelVideoPlayer.create package:video_player_platform_interface/method_channel_video_player.dart:46 E/flutter ( 6441): <asynchronous suspension> E/flutter ( 6441): #5 VideoPlayerController.initialize package:video_player/video_player.dart:282 E/flutter ( 6441): <asynchronous suspension> E/flutter ( 6441): #6 _FbNewsAttachmentsVideoState.initPlayer package:flutter_fb_news/fb_news_attachments_video.dart:34
I am using the 1.1.3 version because I haven't migrated yet to null-safety Am I doing something wrong?