Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when compress video select from galery [iOS] #40

Closed
muhtar-wd opened this issue Oct 27, 2021 · 6 comments
Closed

Crash when compress video select from galery [iOS] #40

muhtar-wd opened this issue Oct 27, 2021 · 6 comments

Comments

@muhtar-wd
Copy link

muhtar-wd commented Oct 27, 2021

When I am trying to compress video from the gallery the app crash suddenly. but when I record video from the camera it's working well.
this happens only on iOS

dataUri pick from gallery:
file:///private/var/mobile/Containers/Data/Application/F2A6A75C-B834-427A-A565-EAD9E47DBE21/tmp/react-native-image-crop-picker/8C70B1F1-D253-42D0-B6F6-E236B283E475.mp4

dataUri take from camera:
file:///var/mobile/Containers/Data/Application/F2A6A75C-B834-427A-A565-EAD9E47DBE21/Library/Caches/Camera/BA027EA2-6AA0-4698-A50A-BC456FA4230E.mov

"react-native": "^0.63.4",
"react-native-image-crop-picker": "^0.36.0",
"react-native-compressor": "^0.5.2",
"react-native-camera": "^4.0.0",

@numandev1
Copy link
Owner

@mobilewd can you send that video here?

@numandev1
Copy link
Owner

@kuldeepworkid @HemendraKhatik

@krupalikevadiya we are using NextLevelSessionExporter pod for compression videos on ios. but on this video, it is giving an exception, therefore, I am returning the same URI. I have created issue on NextLevel/NextLevelSessionExporter#37 we have to wait for resolve issue from NextLevelSessionExporter size

#19 (comment)

@numandev1
Copy link
Owner

can you try a different video?

@HemendraKhatik
Copy link

can you try a different video?

I've tried with different video still not working

logs

java.lang.RuntimeException: An error occurred while executing doInBackground()
	at android.os.AsyncTask$4.done(AsyncTask.java:399)
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
	at java.util.concurrent.FutureTask.run(FutureTask.java:271)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.IllegalStateException: Can't stop due to wrong state.
	at android.media.MediaMuxer.stop(MediaMuxer.java:469)
	at com.zolad.videoslimmer.VideoSlimEncoder.releaseCoder(VideoSlimEncoder.java:622)
	at com.zolad.videoslimmer.VideoSlimEncoder.convertVideo(VideoSlimEncoder.java:391)
	at com.zolad.videoslimmer.VideoSlimTask.doInBackground(VideoSlimTask.java:30)
	at com.zolad.videoslimmer.VideoSlimTask.doInBackground(VideoSlimTask.java:11)
	at android.os.AsyncTask$3.call(AsyncTask.java:378)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	... 4 more

@numandev1
Copy link
Owner

@HemendraKhatik can you send me the video which is giving this error?

@numandev1
Copy link
Owner

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants