Open akbaraditamasp opened 6 months ago
java.lang.IllegalStateException: Tried to access a JS module before the React instance was fully set up. Calls to ReactContext#getJSModule should only happen once initialize() has been called on your native module. at com.facebook.react.bridge.ReactContext.getJSModule(SourceFile:21) at org.wonday.pdf.a.e(SourceFile:86) at y9.a.b(SourceFile:5) at com.github.barteksc.pdfviewer.e.T(SourceFile:60) at com.github.barteksc.pdfviewer.c.c(SourceFile:23) at com.github.barteksc.pdfviewer.c.onPostExecute(SourceFile:3) at android.os.AsyncTask.finish(AsyncTask.java:771) at android.os.AsyncTask.-$$Nest$mfinish(Unknown Source:0) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:224) at android.os.Looper.loop(Looper.java:318) at android.app.ActivityThread.main(ActivityThread.java:8772) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Its happening for me too
do u guys have any solution?
do u guys have any solution?
Nope, just use old architecture
can u explain more? im really frustrated and dont know how to fix this
I guess we need to wait for the upgrade to react native New Architecture.
do u have any suggestion what library/method i can use to show pdf? im new at react native i try to look up some libraries but some of them is deprecated
Its happening for me too
@akbaraditamasp did you happen to find any solution? I am also facing the same issue after the react-native version upgrade.
What
react-native
version are you using? 0.74.1 Whatreact-native-pdf
version are you using? 6.7.5 What platform does your issue occur on? (android/ios/both) Android Describe your issue as precisely as possible : 1) Steps to reproduce the issue or to explain in which case you get the issue2) Interesting
logs
ERROR Your app just crashed. See the error below. java.lang.IllegalStateException: Tried to access a JS module before the React instance was fully set up. Calls to ReactContext#getJSModule should only happen once initialize() has been called on your native module. com.facebook.react.bridge.ReactContext.getJSModule(ReactContext.java:180) org.wonday.pdf.PdfView.onPageChanged(PdfView.java:98) com.github.barteksc.pdfviewer.listener.Callbacks.callOnPageChange(Callbacks.java:123) com.github.barteksc.pdfviewer.PDFView.showPage(PDFView.java:382) com.github.barteksc.pdfviewer.PDFView.jumpTo(PDFView.java:359) com.github.barteksc.pdfviewer.PDFView.loadComplete(PDFView.java:833) com.github.barteksc.pdfviewer.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:90) com.github.barteksc.pdfviewer.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:27) android.os.AsyncTask.finish(AsyncTask.java:771) android.os.AsyncTask.-$$Nest$mfinish(Unknown Source:0) android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788) android.os.Handler.dispatchMessage(Handler.java:107) android.os.Looper.loopOnce(Looper.java:232) android.os.Looper.loop(Looper.java:317) android.app.ActivityThread.main(ActivityThread.java:8628) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)