Closed claudiozam closed 3 years ago
I don' have a clue what is wrong there. react-native-ffmpeg-test repository uses RN 0.65.1
with no issues.
Yes, react-native-ffmpeg-test repository RN 0.65.1 with no issues. Ok, i will review my code again. With RN 0.64.X no problem. Thanks!!!.
@tanersener add required stubs for react-native 0.65
RNFFmpegModule.java
@ReactMethod
public void addListener(String eventName) {
// Keep: Required for RN built in Event Emitter Calls.
}
@ReactMethod
public void removeListeners(Integer count) {
// Keep: Required for RN built in Event Emitter Calls.
}
These are needed to avoid console warnings about NativeEventEmitter being created without the required native module implementations
These are needed to avoid console warnings about NativeEventEmitter being created without the required native module implementations
Sorry, but I don't follow. In order to take an action about this issue, first we must agree that something is not right in the current implementation. My tests with RN 0.65
on react-native-test
were successful, I don't get those warnings. Therefore I don't see a reason to make a change at the moment. Am I missing something?
@tanersener you are 100% right. But your testing app does not interact with external libs like flipper or react-native-image-crop-picker.
Please check this
https://github.com/facebook/react-native/commit/114be1d2170bae2d29da749c07b45acf931e51e2 https://github.com/facebook/flipper/issues/2707
Thanks for your help and your project!!!
react-native-ffmpeg+0.5.1.patch
diff --git a/node_modules/react-native-ffmpeg/android/src/main/java/com/arthenica/reactnative/RNFFmpegModule.java b/node_modules/react-native-ffmpeg/android/src/main/java/com/arthenica/reactnative/RNFFmpegModule.java
index a394f46..b71bdd8 100644
--- a/node_modules/react-native-ffmpeg/android/src/main/java/com/arthenica/reactnative/RNFFmpegModule.java
+++ b/node_modules/react-native-ffmpeg/android/src/main/java/com/arthenica/reactnative/RNFFmpegModule.java
@@ -94,6 +94,16 @@ public class RNFFmpegModule extends ReactContextBaseJavaModule {
return "RNFFmpegModule";
}
+ @ReactMethod
+ public void addListener(String eventName) {
+ // Keep: Required for RN built in Event Emitter Calls.
+ }
+
+ @ReactMethod
+ public void removeListeners(Integer count) {
+ // Keep: Required for RN built in Event Emitter Calls.
+ }
+
@ReactMethod
public void getPlatform(final Promise promise) {
final String abi = AbiDetect.getAbi();
So, you say that if an application uses flipper
or react-native-image-crop-picker
, then all other plugins must implement addListener
, removeListener
methods to use them under RN 0.65.0
. But not flipper
or react-native-image-crop-picker
themselves. It's fine if they don have addListener
, removeListener
methods, right? Because they are not implementing them at the moment.
Anyway, it is fixed in the new release. Hope it will resolve the issues for you.
Thanks @tanersener!!!!
@tanersener this issue is not resolved for iOS in react-native 0.65. Request you to kindly check and update the repo.
thanks.
@jabirabbas Alright, can you provide the steps to reproduce it? I'm using react-native-ffmpeg-test to test and I don't see any errors on 0.65.1
.
Description
After calling RNFFmpeg.execute(".........") the lib throws a warning / error related to NativeEventEmitter
Expected behavior
No warning / error after calling RNFFmpeg.execute(".........")
Screenshots
Logs
WARN
new NativeEventEmitter()
was called with a non-null argument without the requiredaddListener
method. Loading react-native-ffmpeg.Environment
react: 17.0.2 react Native: 0.65.1 react-native-ffmpeg: 0.5.1 Device: Samsung S10 / Samsung S20 / Android Emulator OS: Android 11
package.json