NativeScript / NativeScript/plugins

[Biometrics] Issue running angular demo

Open
#542 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
206
Forks
123
Avg merge
2d 1h
Merged PRs (30d)
1

Description

Hi,
When i run angular demo on ios or android, i get an error when i click on "Biometrics" label :

  JS: CONSOLE LOG: Angular is running in development mode. Call enableProdMode() to enable production mode.
  JS: CONSOLE ERROR: ERROR TypeError: Cannot read properties of undefined (reading 'status')
  JS: CONSOLE ERROR: ERROR TypeError: Cannot read properties of undefined (reading 'status')
  JS: CONSOLE ERROR: ERROR Error: Uncaught (in promise): TypeError: _nativescript_biometrics__WEBPACK_IMPORTED_MODULE_1__.BiometricAuth is not a constructor
  JS: TypeError: _nativescript_biometrics__WEBPACK_IMPORTED_MODULE_1__.BiometricAuth is not a constructor
  JS:     at new DemoSharedBiometrics (file: src/tools/demo/biometrics/index.ts:15:25)
  JS:     at BiometricsComponent.ngOnInit (file: src/plugin-demos/biometrics.component.ts:15:20)
  JS:     at callHook (file: node_modules/@angular/core/fesm2015/core.mjs:2418:0)
  JS:     at callHooks (file: node_modules/@angular/core/fesm2015/core.mjs:2387:0)
  JS:     at executeInitAndCheckHooks (file: node_modules/@angular/core/fesm2015/core.mjs:2338:0)
  JS:     at refreshView (file: node_modules/@angular/core/fesm2015/core.mjs:10319:0)
  JS:     at detectChangesInternal (file:///data/data/org.nativesc..

Here the steps i follow :

git clone git@github.com:NativeScript/plugins.git
cd plugins
npm run setup
npm start

In npm start :

  • @nativescript.build-all
  • focus.biometric
  • apps.demo-angular.ios

The application is deployed, and display "biometrics". When i click on "biometrics", i get the error "nativescript_biometrics__WEBPACK_IMPORTED_MODULE_1_.BiometricAuth is not a constructor"

My environment :

  • os : macos
  • yarn : 1.22.19
  • node : v18.16.1
  • npm : 8.19.4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the npm start workflow and inspect src/tools/demo/biometrics/index.ts, where DemoSharedBiometrics constructs BiometricAuth, then check src/plugin-demos/biometrics.component.ts. Reproduce the failure on the Angular demo and trace the undefined status and constructor errors; done means selecting Biometrics no longer throws these errors on the demo platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
mobile, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.