vue-pdf icon indicating copy to clipboard operation
vue-pdf copied to clipboard

Cannot read properties of undefined (reading 'catch')

Open windsonR opened this issue 3 years ago • 6 comments

rendering error:

vue.esm.js?a026:1906 
        
       TypeError: Cannot read properties of undefined (reading 'catch')
    at PDFJSWrapper.renderPage (pdfjsWrapper.js?a068:196)
    at VueComponent.resize (componentFactory.js?0d60:75)
    at invokeWithErrorHandling (vue.esm.js?a026:1872)
    at VueComponent.invoker (vue.esm.js?a026:2197)
    at invokeWithErrorHandling (vue.esm.js?a026:1872)
    at VueComponent.Vue.$emit (vue.esm.js?a026:3912)
    at VueComponent.handler (resize-sensor.vue?c7ed:49)
    at invokeWithErrorHandling (vue.esm.js?a026:1872)
    at Watcher.run (vue.esm.js?a026:4593)
    at flushSchedulerQueue (vue.esm.js?a026:4335)

https://github.com/FranckFreiburger/vue-pdf/blob/1a47de972abefd2079a4e23485041f08d9f68aab/src/pdfjsWrapper.js#L196

this pdfRender.cancel() is undefined

environment: vue-pdf: 4.3.0 vue.js: 2.6.14 webpack: 5.50.0 browser: Microsoft Edge 94.0.989.0 and FireFox 93.0a1 os: macos 11.5.2

windsonR avatar Aug 23 '21 03:08 windsonR

有类似的issue 自己守一下 降版本就行

naimao001 avatar Aug 23 '21 07:08 naimao001

有类似的issue 自己守一下 降版本就行

😂😂😂😂😂😂

windsonR avatar Aug 26 '21 08:08 windsonR

"pdfjs-dist": "2.5.207", "vue-pdf": "4.2.0" 锁定这两个版本完美解决

chenxu1112 avatar Aug 26 '21 10:08 chenxu1112

😂😂😂😂😂😂😂😂😂

操作好骚

windsonR avatar Aug 27 '21 07:08 windsonR

sorry for the question... is this fix now available for npm update? thanks

flavionobredev avatar Oct 21 '21 18:10 flavionobredev

As this project seems to be abandoned, I created a fork which corrects this bug. The package can be found here:

https://www.npmjs.com/package/@teckel/vue-pdf

teckel12 avatar Apr 07 '23 22:04 teckel12