Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

FATAL EXCEPTION: AsyncTask #2 #206

Closed
snsekar opened this issue Dec 2, 2016 · 2 comments
Closed

FATAL EXCEPTION: AsyncTask #2 #206

snsekar opened this issue Dec 2, 2016 · 2 comments

Comments

@snsekar
Copy link

snsekar commented Dec 2, 2016

Hi,
I am using RNFetchBlob.fs.lstat(path) api and getting following error in Android 4.2.2

E/AndroidRuntime(31827): FATAL EXCEPTION: AsyncTask #2
E/AndroidRuntime(31827): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime(31827): 	at android.os.AsyncTask$3.done(AsyncTask.java:299)
E/AndroidRuntime(31827): 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
E/AndroidRuntime(31827): 	at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
E/AndroidRuntime(31827): 	at java.util.concurrent.FutureTask.run(FutureTask.java:239)
E/AndroidRuntime(31827): 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
E/AndroidRuntime(31827): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
E/AndroidRuntime(31827): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
E/AndroidRuntime(31827): 	at java.lang.Thread.run(Thread.java:856)
E/AndroidRuntime(31827): Caused by: java.lang.NullPointerException
E/AndroidRuntime(31827): 	at com.RNFetchBlob.RNFetchBlobFS$1.doInBackground(RNFetchBlobFS.java:582)
E/AndroidRuntime(31827): 	at com.RNFetchBlob.RNFetchBlobFS$1.doInBackground(RNFetchBlobFS.java:571)
E/AndroidRuntime(31827): 	at android.os.AsyncTask$2.call(AsyncTask.java:287)
E/AndroidRuntime(31827): 	at java.util.concurrent.FutureTask.run(FutureTask.java:234)
E/AndroidRuntime(31827): 	... 4 more

Please help me to resolve issue

@wkh237
Copy link
Owner

wkh237 commented Dec 2, 2016

@snsekar , thanks for reporting this issue.

I think that's because you passed null or undefined to the method and the native part didn't handle the exception well, as such the app crashed. I'll fix this issue in next releae 😄

wkh237 added a commit that referenced this issue Dec 2, 2016
@wkh237 wkh237 added the beta label Dec 2, 2016
@snsekar
Copy link
Author

snsekar commented Dec 2, 2016

@wkh237 Thanks for fixing

@wkh237 wkh237 closed this as completed Jan 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants