Describe the bug
PDF display is broken on the mobile platform.
The file appears to be loading fine into the browser as a Uint8Array, but is then failing to display.
Line 85 - Msg: Uncaught (in promise) TypeError: this[#e].getOrInsertComputed is not a function
It appears fine on desktop platform. I'm unable to check web platform at the moment without a way to add files to OPFS.
Expected behaviour
PDF is displayed on mobile.
Additional context
I think this is the same issue as mozilla/pdf.js#20680.
As per their FAQs PDF.js targets the latest browser versions only, whereas I assume Capacitor and/or Android is using an older version of webview/chrome so fails.
I think I'll need to use a legacy version of the library/keep downgrading until I find the first version that works for mobile and fix to that version.
This may require explicitly deciding the supported Android versions for the project (15/16 only?) and further work if the PDF.js APIs are different between package versions, as the same application code then couldn't be shared between all platforms.
Describe the bug
PDF display is broken on the mobile platform.
The file appears to be loading fine into the browser as a Uint8Array, but is then failing to display.
It appears fine on desktop platform. I'm unable to check web platform at the moment without a way to add files to OPFS.
Expected behaviour
PDF is displayed on mobile.
Additional context
I think this is the same issue as mozilla/pdf.js#20680.
As per their FAQs PDF.js targets the latest browser versions only, whereas I assume Capacitor and/or Android is using an older version of webview/chrome so fails.
I think I'll need to use a legacy version of the library/keep downgrading until I find the first version that works for mobile and fix to that version.
This may require explicitly deciding the supported Android versions for the project (15/16 only?) and further work if the PDF.js APIs are different between package versions, as the same application code then couldn't be shared between all platforms.