cordova-screenshot icon indicating copy to clipboard operation
cordova-screenshot copied to clipboard

Cannot read property URI of undefined

Open mayankkataria opened this issue 5 years ago • 1 comments

My code:

this.screenShot.URI(80)
    .then(ev => console.log('ss success: ', ev))
    .catch(err => console.log('ss error: ', err));

When this code is executed, I'm getting the following error msg:

ss error:  TypeError: Cannot read property 'URI' of undefined
    at index.js:41
    at common.js:8
    at new ZoneAwarePromise (zone-evergreen.js:960)
    at tryNativePromise (common.js:7)
    at getPromise (common.js:26)
    at Screenshot.push.jAoO.Screenshot.URI (index.js:40)
    at SketchPage.done (sketch.page.ts:478)
    at SketchPage_ion_row_1_Template_ion_button_click_15_listener (template.html:31)
    at executeListenerWithErrorHandling (core.js:14316)
    at wrapListenerIn_markDirtyAndPreventDefault (core.js:14351)

Is there any way to get rid of it?

Thanks

mayankkataria avatar Feb 21 '21 10:02 mayankkataria

The plugin does not work on browser as it cannot take screenshots. It works fine on device though.

rluque8 avatar May 06 '21 13:05 rluque8