react-native-media-meta
react-native-media-meta copied to clipboard
Getting Read time outs when trying to build
We've been experiencing some weird error that comes up almost every time we try to build our project:
* What went wrong:
Could not resolve all files for configuration ':react-native-media-meta:debugRuntimeClasspath'.
> Could not resolve com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.+.
Required by:
project :react-native-media-meta
> Failed to list versions for com.github.wseemann:FFmpegMediaMetadataRetriever.
> Could not list versions using M2 pattern 'https://jitpack.io/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://jitpack.io/com/github/wseemann/FFmpegMediaMetadataRetriever/'.
> Could not GET 'https://jitpack.io/com/github/wseemann/FFmpegMediaMetadataRetriever/'.
> Read timed out
Gradle cleaning, cache-clearing, rebooting, or resetting does not fix this issue.
This pops up like 9 out of 10 times and the build fails. Then, miraculously, the build succeeds. Any idea what this could be?
try: MAC: cd android && ./gradlew cleanBuildCache Window: cd android && ./gradlew clean
Same here.
@Thanhcao86 thanks, but your solution is not working
I'm facing the same issue. Have you got any solution @Tsiniloiv @Alb93 ?
Plus while running on Android, getting this issue resulting App Crash,
java.lang.NoSuchFieldError: no "J" field "mNativeContext" in class "Lwseemann/media/FFmpegMediaMetadataRetriever;" or its superclasses at wseemann.media.FFmpegMediaMetadataRetriever.native_init(Native Method) at wseemann.media.FFmpegMediaMetadataRetriever.<clinit>(Unknown Source:43) at com.mybigday.rnmediameta.RNMediaMeta.getMetadata(Unknown Source:19) at com.mybigday.rnmediameta.RNMediaMeta.access$000(Unknown Source:0) at com.mybigday.rnmediameta.RNMediaMeta$1.run(Unknown Source:8)
Got Partial Solution For Now
go inside
node_module
-> react-native-media-meta
-> android
-> build.gradle
here, give specific version to FFmpegMediaMetadataRetriever
library,
from compile 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.+' to compile 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.12'
Then try to build. Debugging will work but Released APK will get fail.
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.package.project-V5Vzx7228VZS71q6MvlsKA==/base.apk"],nativeLibraryDirectories=[/data/app/com.package.project-V5Vzx7228VZS71q6MvlsKA==/lib/x86, /data/app/com.package.project-V5Vzx7228VZS71q6MvlsKA==/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libavutil.so" at java.lang.Runtime.loadLibrary0(Runtime.java:1011) at java.lang.System.loadLibrary(System.java:1657) at wseemann.media.FFmpegMediaMetadataRetriever.<clinit>(FFmpegMediaMetadataRetriever.java:124) at com.mybigday.rnmediameta.RNMediaMeta.getMetadata(RNMediaMeta.java:88) at com.mybigday.rnmediameta.RNMediaMeta.access$000(RNMediaMeta.java:23) at com.mybigday.rnmediameta.RNMediaMeta$1.run(RNMediaMeta.java:164)
Does anyone have any solution ?
Is there any solution for this problem. I am facing the same issue
i fixed it by not using proguard(not proud of the solution but works), what we can do is we can exclude the Lwseemann/media/FFmpegMediaMetadataRetriever class or superclass in proguard rules and still use the proguard i haven't tried yet but will tell here if it works
@akug17 did it work? excluding the class from proguard rules ?
Hey @akug17 @Tsiniloiv
i just solved this issue by adding these lines in progaurd-rules.pro file
-keep class com.mybigday. ** { *; } -keep class com.mybigday.rnmediameta. ** { ; } -keep class wseemann.media. ** {;}
it solved the issue in Release build.