jibon57 / nativescript-mediafilepicker

A complete file picker solution for NativeScript
Apache License 2.0
51 stars 39 forks source link

App crashes on open mediafilepicker #80

Closed kshipra-shelke closed 5 years ago

kshipra-shelke commented 5 years ago

System.err: An uncaught Exception occurred on "main" thread. System.err: No virtual method centerCrop()Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of 'com.bumptech.glide.request.RequestOptions' appears in /data/app/org.nativescript.drinkmates-1/base.apk:classes2.dex) System.err: System.err: StackTrace: System.err: java.lang.NoSuchMethodError: No virtual method centerCrop()Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of 'com.bumptech.glide.request.RequestOptions' appears in /data/app/org.nativescript.drinkmates-1/base.apk:classes2.dex) System.err: at com.vincent.filepicker.adapter.ImagePickAdapter.onBindViewHolder(ImagePickAdapter.java:118) System.err: at com.vincent.filepicker.adapter.ImagePickAdapter.onBindViewHolder(ImagePickAdapter.java:44) System.err: at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6781) System.err: at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6823) System.err: at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5752) System.err: at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6019) System.err: at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5858) System.err: at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5854) System.err: at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2230) System.err: at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:557) System.err: at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1517) System.err: at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:612) System.err: at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:171) System.err: at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3924) System.err: at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3641) System.err: at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4194) System.err: at android.view.View.layout(View.java:18798) System.err: at android.view.ViewGroup.layout(ViewGroup.java:5951) System.err: at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) System.err: at android.view.View.layout(View.java:18798) System.err: at android.view.ViewGroup.layout(ViewGroup.java:5951) System.err: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) System.err: at android.widget.FrameLayout.onLayout(FrameLayout.java:261) System.err: at android.view.View.layout(View.java:18798) System.err: at android.view.ViewGroup.layout(ViewGroup.java:5951) System.err: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:702) System.err: at android.view.Choreographer.doFrame(Choreographer.java:638) System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913) System.err: at android.os.Handler.handleCallback(Handler.java:751) System.err: at android.os.Handler.dispatchMessage(Handler.java:95) System.err: at android.os.Looper.loop(Looper.java:154) System.err: at android.app.ActivityThread.main(ActivityThread.java:6682) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

Getting this error on mediafilepicker after upgrading to Android Api 29

ditoglez commented 5 years ago

Looks like its related to https://github.com/fishwjy/MultiType-FilePicker/issues/55

tokiroto commented 5 years ago

Same here:

System.err: An uncaught Exception occurred on "main" thread.
System.err: Calling js method onGlobalLayout failed
System.err: TypeError: Cannot read property 'className' of undefined
System.err:
System.err: StackTrace:
System.err:     Frame: function:'', file:'file:///node_modules\nativescript-theme-core\index.js:87:0
System.err:     Frame: function:'push.../node_modules/tns-core-modules/data/observable/observable.js.Observable.notify', file:'file:///node_modules\tns-core-modules\data\observable\observable.js:110:0
System.err:     Frame: function:'onGlobalLayout', file:'file:///node_modules\tns-core-modules\application\application.js:187:0
System.err:     at com.tns.Runtime.callJSMethodNative(Native Method)
System.err:     at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242)
System.err:     at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1109)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1089)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1081)
System.err:     at com.tns.gen.android.view.ViewTreeObserver_OnGlobalLayoutListener.onGlobalLayout(ViewTreeObserver_OnGlobalLayoutListener.java:18)
System.err:     at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:1013)
System.err:     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2687)
System.err:     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1780)
System.err:     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7827)
System.err:     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
System.err:     at android.view.Choreographer.doCallbacks(Choreographer.java:723)
System.err:     at android.view.Choreographer.doFrame(Choreographer.java:658)
System.err:     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
System.err:     at android.os.Handler.handleCallback(Handler.java:789)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:98)
System.err:     at android.os.Looper.loop(Looper.java:164)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:6944)
System.err:     at java.lang.reflect.Method.invoke(Native Method)
System.err:     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Chokidar raised event change for ..\node_modules\nativescript-mediafilepicker\package.json.
Chokidar raised event change for ..\node_modules\nativescript-mediafilepicker\package.json.

When I open the mediaFilePicker with FilePickerOptions, it crashes with error above. I understand that lib itself causes this issue, since I am running on NC 6, with androidx support. While plugin uses implementation (in include.gradle):

com.android.support:recyclerview-v7:$supportVer

That seem, conflicts and requires migration. But when I used androidx.recycleView, it thrown "no livecycleOwner implementation found...". So I decided to update package dependencies: nativescript-theme-core to latest, and some other just in case (tns-core-modules). Then I removed and added android platform. And apparently it solved the problem. There is no null rootView anymore.