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

RNFetchBlob.fs.exists - java.lang.IllegalArgumentException: Unknown URI #223

Closed
demarchisd opened this issue Oct 25, 2018 · 1 comment
Closed

Comments

@demarchisd
Copy link

Hey! I'm trying to use the RNFetchBlob.fs.exists function, and the application stops working on my Android device.

I've got the logs from adb logcat:

E DatabaseUtils: Writing exception to parcel
E DatabaseUtils: java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/1235
E DatabaseUtils:         at com.android.providers.downloads.DownloadProvider.query(DownloadProvider.java:1114)
E DatabaseUtils:         at android.content.ContentProvider.query(ContentProvider.java:1063)
E DatabaseUtils:         at android.content.ContentProvider.query(ContentProvider.java:1155)
E DatabaseUtils:         at android.content.ContentProvider$Transport.query(ContentProvider.java:244)
E DatabaseUtils:         at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:102)
E DatabaseUtils:         at android.os.Binder.execTransact(Binder.java:682)
W System.err: java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/1235
W System.err:    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:165)
W System.err:    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
W System.err:    at android.content.ContentProviderProxy.query(ContentProviderNative.java:418)
W System.err:    at android.content.ContentResolver.query(ContentResolver.java:760)
W System.err:    at android.content.ContentResolver.query(ContentResolver.java:710)
W System.err:    at android.content.ContentResolver.query(ContentResolver.java:668)
W System.err:    at com.RNFetchBlob.Utils.PathResolver.getDataColumn(PathResolver.java:151)
W System.err:    at com.RNFetchBlob.Utils.PathResolver.getRealPathFromURI(PathResolver.java:45)
W System.err:    at com.RNFetchBlob.RNFetchBlobFS.normalizePath(RNFetchBlobFS.java:1125)
W System.err:    at com.RNFetchBlob.RNFetchBlobFS.exists(RNFetchBlobFS.java:651)
W System.err:    at com.RNFetchBlob.RNFetchBlob.exists(RNFetchBlob.java:178)
W System.err:    at java.lang.reflect.Method.invoke(Native Method)
W System.err:    at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
W System.err:    at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
W System.err:    at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
W System.err:    at android.os.Handler.handleCallback(Handler.java:789)
W System.err:    at android.os.Handler.dispatchMessage(Handler.java:98)
W System.err:    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
W System.err:    at android.os.Looper.loop(Looper.java:164)
W System.err:    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
W System.err:    at java.lang.Thread.run(Thread.java:764)
E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
E AndroidRuntime: Process: com.irpfvisaoapp, PID: 29841
E AndroidRuntime: java.lang.NullPointerException
E AndroidRuntime:        at java.io.File.<init>(File.java:282)
E AndroidRuntime:        at com.RNFetchBlob.RNFetchBlobFS.exists(RNFetchBlobFS.java:652)
E AndroidRuntime:        at com.RNFetchBlob.RNFetchBlob.exists(RNFetchBlob.java:178)
E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime:        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
E AndroidRuntime:        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
E AndroidRuntime:        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:789)
E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:98)
E AndroidRuntime:        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
E AndroidRuntime:        at android.os.Looper.loop(Looper.java:164)
E AndroidRuntime:        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
E AndroidRuntime:        at java.lang.Thread.run(Thread.java:764)
D Debug   : !@DumpState : SHIP
D Debug   : !@DumpState : debug level:0x4f4c
D Debug   : !@Dumpstate : Finally, system will skip dumpstate
W ActivityManager: crash : com.irpfvisaoapp,0
W ActivityManager:   Force finishing activity com.irpfvisaoapp/.MainActivity

Versions:
react-native: 0.55.1
rn-fetch-blob: 0.10.13
Android 8.0.0 (real device)

@demarchisd
Copy link
Author

Closing because it's dup of #225
PR #226 fixes the problem

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

1 participant