cnjon / react-native-pdf-view

React Native PDF View
MIT License
404 stars 167 forks source link

Broken with react-native 0.19.0? #3

Closed alexbepple closed 8 years ago

alexbepple commented 8 years ago

With 0.19.0, the PDF is not shown. I have no real hypothesis as to why. Does anybody know?

I noticed many "Could not find generated setter for class …" messages which did not use to be there with 0.18.1, including this one:

Could not find generated setter for class com.keyee.pdfview.PDFViewManager

Googling has not been much of a help, except for this issue: https://github.com/facebook/react-native/issues/5304, which made me aware of something with @ReactProp, which in turn reminded me of this commit in the changelog for 0.19.0: https://github.com/facebook/react-native/commit/57f6cbb3dc12d2dcc3eedd9712c36bb3d39149a5

Here is the complete log of the app starting and trying to show the PDF:

                            Process com.terex created for activity com.terex/.MainActivity
                            PID: 4958   UID:    GIDs:

         OpenGLRenderer  D  Use EGL_SWAP_BEHAVIOR_PRESERVED: true
                         D  HostConnection::get() New Host Connection established 0xf3e369f0, tid 4958
                    art  I  Thread[15,tid=4978,WaitingForJniOnLoad,Thread*=0xf3c34000,peer=0x12d51520,"AsyncTask #1"]
                            recursive attempt to load library "/data/app/com.terex-1/lib/x86/libreactnativejni.so"
                  Atlas  D  Validating map...
wManagerPropertyUpdater  W  Could not find generated setter for class com.facebook.react.views.art.ARTRenderableViewMa
                            nager
                         W  Could not find generated setter for class com.facebook.react.views.art.ARTGroupShadowNode
                         W  Could not find generated setter for class com.facebook.react.views.art.ARTShapeShadowNode
                         W  Could not find generated setter for class com.facebook.react.views.art.ARTTextShadowNode
                         W  Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewManag
                            er
                         W  Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewShado
                            wNode
                         W  Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPicke
                            rManager
                         W  Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
                         W  Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayou
                            tManager
                         W  Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPic
                            kerManager
                         W  Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalS
                            crollViewManager
                         W  Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
                         W  Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgre
                            ssBarViewManager
                         W  Could not find generated setter for class com.facebook.react.views.progressbar.ProgressBar
                            ShadowNode
                         W  Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManage
                            r
                         W  Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNod
                            e
                         W  Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewM
                            anager
                         W  Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchM
                            anager
                         W  Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchM
                            anager$ReactSwitchShadowNode
                         W  Could not find generated setter for class com.facebook.react.views.text.ReactTextInlineIma
                            geViewManager
                         W  Could not find generated setter for class com.facebook.react.views.text.ReactTextInlineIma
                            geShadowNode
                         W  Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInpu
                            tManager
                         W  Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInpu
                            tShadowNode
                         W  Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManag
                            er
                         W  Could not find generated setter for class com.facebook.react.views.toolbar.ReactToolbarMan
                            ager
                         W  Could not find generated setter for class com.facebook.react.views.view.ReactViewManager
                         W  Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPage
                            rManager
                         W  Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextVi
                            ewManager
                         W  Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewMan
                            ager
                         W  Could not find generated setter for class com.facebook.react.views.recyclerview.RecyclerVi
                            ewBackedScrollViewManager
                         W  Could not find generated setter for class com.facebook.react.views.swiperefresh.SwipeRefre
                            shLayoutManager
                         W  Could not find generated setter for class com.keyee.pdfview.PDFViewManager
                 libEGL  D  loaded /system/lib/egl/libEGL_emulation.so
                         D  loaded /system/lib/egl/libGLESv1_CM_emulation.so
                         D  loaded /system/lib/egl/libGLESv2_emulation.so
                         D  HostConnection::get() New Host Connection established 0xeec39450, tid 4979
         OpenGLRenderer  I  Initialized EGL, version 1.4
                         D  Enabling debug mode 0
          EGL_emulation  W  eglSurfaceAttrib not implemented
         OpenGLRenderer  W  Failed to set EGL_SWAP_BEHAVIOR on surface 0xeec35860, error=EGL_SUCCESS
          unknown:React  W  Unable to dispatch keyboard events in JS as the react instance has not been attached
                    art  I  Background partial concurrent mark sweep GC freed 1554(81KB) AllocSpace objects, 4(196KB)
                            LOS objects, 40% free, 1646KB/2MB, paused 11.910ms total 23.726ms
          ReactNativeJS  I  Running application "terex" with appParams: {"initialProps":{},"rootTag":1}. __DEV__ === t
                            rue, development-level warning are ON, performance optimizations are OFF
                         I  On wifi? true
          EGL_emulation  W  eglSurfaceAttrib not implemented
         OpenGLRenderer  W  Failed to set EGL_SWAP_BEHAVIOR on surface 0xeec35860, error=EGL_SUCCESS
cnjon commented 8 years ago

Thanks for your help! In 0.2.0 has been fix.

alexbepple commented 8 years ago

I can confirm it works with RN 0.20.0. Thanks!