EddyVerbruggen / nativescript-printer

:fax: Send an image or the screen contents to a physical printer
MIT License
36 stars 13 forks source link

Cannot read property 'getApplicationContext' of undefined #30

Closed Mauoanel closed 3 years ago

Mauoanel commented 3 years ago

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'getApplicationContext' of undefined JS: TypeError: Cannot read property 'getApplicationContext' of undefined JS: at new Printer (file: node_modules/nativescript-printer/printer.android.js:8:33) JS: at new HomeComponent (file: src/app/home/home.component.ts:53:24) JS: at createClass (file: node_modules/@angular/core/fesm5/core.js:21158:0) JS: at createDirectiveInstance (file: node_modules/@angular/core/fesm5/core.js:21027:0) JS: at createViewNodes (file: node_modules/@angular/core/fesm5/core.js:29387:0) JS: at createRootView (file: node_modules/@angular/core/fesm5/core.js:29301:0) JS: at callWithDebugContext (file: node_modules/@angular/core/fesm5/core.js:30309:0) JS: at Object.debugCreateRootView [as createRootView] (file: nodemodules/@angular/core/fesm5/core.js:29819:0) JS: at ComponentFactory.push.../nodemodules/@angular/core/fesm5/core.js.ComponentFactory.create

Mauoanel commented 3 years ago

hi everyone, do any of you know as to why android throws the below error message? TypeError: Cannot read property 'getApplicationContext' of undefined

asharghi commented 3 years ago

You get that error when you try to use version 2.0.0 of this plugin on NS6. Try installing version 1.5.0 instead