nstudio / nstudio/nativescript-plugins

[nativescript-barcodescanner] [Android] blank page in release mode

Open
#93 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
55
Forks
42
Avg merge
49m
Merged PRs (30d)
1

Description

I've a very strange problem:

1- created new test application with:

ns create --template @nativescript/template-drawer-navigation-ng

2- installed plugin:

npm install @nstudio/nativescript-barcodescanner

3 - modified home.component.ts

import { BarcodeScanner} from "@nstudio/nativescript-barcodescanner";

  CameraScan(): void {
    var barcodescanner = new BarcodeScanner;
  }

Compiling and installing in debug mode (tns run android --device XYZ) the home page is displayed.
Compiling and installing in release mode (tns run android --device XYZ --release --key-store....) the home page is displayed blank.

No error, no crash, no log error.
The page is simply blank.

Commenting out the line with BarcodeScanner reference

  CameraScan(): void {
    // var barcodescanner = new BarcodeScanner;
  }

the home page is display as expected.

package.js

{
  "name": "TestScannerApp",
  "main": "src/main.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "~13.2.0",
    "@angular/common": "~13.2.0",
    "@angular/compiler": "~13.2.0",
    "@angular/core": "~13.2.0",
    "@angular/forms": "~13.2.0",
    "@angular/platform-browser": "~13.2.0",
    "@angular/platform-browser-dynamic": "~13.2.0",
    "@angular/router": "~13.2.0",
    "@nativescript/angular": "^13.0.0",
    "@nativescript/core": "~8.2.0",
    "@nativescript/theme": "~3.0.2",
    "@nstudio/nativescript-barcodescanner": "^5.0.1",
    "nativescript-ui-sidedrawer": "~10.0.2",
    "rxjs": "~7.5.0",
    "zone.js": "~0.11.5"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~13.2.0",
    "@angular/compiler-cli": "~13.2.0",
    "@nativescript/android": "8.2.2",
    "@nativescript/types": "~8.2.0",
    "@nativescript/webpack": "~5.0.6",
    "@ngtools/webpack": "~13.2.0",
    "typescript": "~4.5.5"
  }
}

Physical device is Android 8.0.0.

Any Idea how to solve?

Contributor guide

No contributing guide indexed for this repository

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 home.component.ts and package.js, then reproduce the issue using the listed debug and release commands on Android 8.0.0 while comparing the resulting behavior and available logs. Done means the release build displays the home page with the BarcodeScanner reference present.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, angular, typescript
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.