NativeScript / NativeScript/plugins

[Biometrics] Issue running angular demo

未关闭
#542 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
206
派生
123
平均合并
2 天 1 小时
30 天内合并 PR
1

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 npm start 工作流开始,检查 src/tools/demo/biometrics/index.ts,其中 DemoSharedBiometrics 构造 BiometricAuth,然后检查 src/plugin-demos/biometrics.component.ts。在 Angular demo 中复现该故障,并跟踪 undefined status 和 constructor 错误;完成标准是,在 demo 平台上选择 Biometrics 不再抛出这些错误。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
mobile, security
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。