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

[Android] Bug: App Crashes on - java.lang.IllegalStateException: Already closed #882

Open
anasvemmully opened this issue Nov 8, 2024 · 8 comments

Comments

@anasvemmully
Copy link

anasvemmully commented Nov 8, 2024

What react-native version are you using?
0.74.5

What react-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 issue
  2. Interesting logs

Join a screenshot or video of the problem on the simulator or device?
image

Show us the code you are using?

<Modal
  animationType="fade"
      transparent={false}
      visible
      onRequestClose={onSyllubusViewRequestClose}
      style={syllabusViewStyle.container}>
      {syllabusLink && (
        <Pdf
          trustAllCerts={false}
          source={{
            uri: syllabusLink,
            cache: true,
            cacheFileName: syllabusLink.split("/")[syllabusLink.split("/").length - 1],
          }}
          onLoadComplete={onLoadComplete}
          onError={onPDFError}
          style={{
            flex: 1,
            marginTop: 50,
            width: Dimensions.get("window").width,
            height: Dimensions.get("window").height - 50,
          }}
        />
      )}
</Modal>

Iam using ExpoSDK 51
this happens when immediately closing the pdf before its loaded while testing,

Is there any solution for this, i though this gets fixed in last version!

@anasvemmully anasvemmully changed the title [Android] Bug: java.lang.IllegalStateException: Already closed [Android] Bug: App Crashes on - java.lang.IllegalStateException: Already closed Nov 8, 2024
@NJneeraj
Copy link

NJneeraj commented Nov 9, 2024

Same issue

2 similar comments
@keung7252
Copy link

Same issue

@BerkeAras-SMM
Copy link

Same issue

@BerkeAras-SMM
Copy link

@wonday Any ideas?

@vladimirivanoviliev
Copy link

Seems the same as: #830

@vladimirivanoviliev
Copy link

Also seems mentioned in latest version: #840

@Mallikarjuna-s
Copy link

same issue "react-native-pdf": "6.7.5", any solution?. let me know here

Screenshot 2024-12-12 at 3 17 35 PM Fatal Exception: java.lang.IllegalStateException: Already closed at io.legere.pdfiumandroid.util.ConfigKt.handleAlreadyClosed(Config.kt:20) at io.legere.pdfiumandroid.PdfPage.renderPageBitmap(PdfPage.kt:358) at io.legere.pdfiumandroid.PdfPage.renderPageBitmap$default(PdfPage.kt:349) at io.legere.pdfiumandroid.PdfiumCore.renderPageBitmap(PdfiumCore.kt:407) at com.github.barteksc.pdfviewer.PdfFile.renderPageBitmap(PdfFile.java:301) at com.github.barteksc.pdfviewer.RenderingHandler.proceed(RenderingHandler.java:109) at com.github.barteksc.pdfviewer.RenderingHandler.handleMessage(RenderingHandler.java:66) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:257) at android.os.Looper.loop(Looper.java:368) at android.os.HandlerThread.run(HandlerThread.java:67)

@bjutkoski
Copy link

any news? same issue here

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

7 participants