Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Can't open the QR Code Scanner: Access denied finding property "vendor.camera.aux.packagelist" #25

Closed
zNoobs opened this issue Mar 19, 2021 · 2 comments
Labels
needs reply needs reply from the user

Comments

@zNoobs
Copy link

zNoobs commented Mar 19, 2021

Describe the bug
Nothing happens on the android app when I call:
await BarcodeScanner.startScan()

Expected behavior
The bar code scanner should appear.

Version
I'm using Ionic 5 Angular with Capacitor, here the versions:

"@angular/core": "~11.2.0",
"@ionic/angular": "^5.5.2",
"@ionic-native/core": "^5.31.1",
"@capacitor-community/barcode-scanner": "^1.2.1",
"@capacitor/android": "^2.4.6",
 "@capacitor/core": "2.4.6",

Smartphone (please complete the following information):

  • Device: Xiaomi Mi A1
  • OS: Android 9

Additional context
I added
Here the error logs I get on Android studio when I call await BarcodeScanner.startScan():

2021-03-19 17:44:35.059 871-11602/? E/mm-camera: <STATS_AIS ><ERROR> 173: dsps_send_req: DSPS Send Request Timeout!!
2021-03-19 17:44:35.059 871-11602/? E/mm-camera: <STATS_AIS ><ERROR> 173: dsps_send_req: DSPS Send Request Timeout!!
2021-03-19 17:44:35.067 871-11587/? E/mm-camera: <IFACE ><ERROR> 637: iface_queue_buf_int: iface_queue_buf_int: queue buf to kernel failed, rc = -1
2021-03-19 17:44:35.067 871-11587/? E/mm-camera: <IFACE ><ERROR> 1862: iface_axi_divert_ack: iface_axi_divert_ack: isp_queue_buf error = -1
2021-03-19 17:44:35.067 871-11587/? E/mm-camera: <IFACE ><ERROR> 11498: iface_util_divert_ack: iface_util_divert_ack: VFE1 IFACE_AXI_ACTION_CODE_STREAM_DIVERT_ACK failed! rc = -1
2021-03-19 17:44:35.067 871-11587/? E/mm-camera: <ISP   ><ERROR> 1366: isp_util_forward_event: failed: mct_port_send_event_to_peer event->type 2
2021-03-19 17:44:35.068 871-11587/? E/mm-camera: <ISP   ><ERROR> 473: isp_port_process_upstream_event: failed: isp_handler_enqueue_event_to_trigger_queue
2021-03-19 17:44:35.068 871-11587/? E/mm-camera: <ISP   ><ERROR> 528: isp_port_event: failed: isp_port_process_upstream_event
2021-03-19 17:44:35.068 871-11587/? E/mm-camera: <PPROC ><ERROR> 678: base_port_handle_buf_divert_ack: base_port_handle_buf_divert_ack:678, failed
2021-03-19 17:44:35.068 871-11587/? E/mm-camera: <IMGLIB><ERROR> 565: module_imgbase_forward_port_event: module_imgbase_forward_port_event_paaf:565] Fowarding event 2 from src port failed
2021-03-19 17:44:35.068 871-11587/? E/mm-camera: <CPP   ><ERROR> 900: cpp_module_send_event_upstream: send_event_to_peer failed 0
2021-03-19 17:44:35.068 871-11587/? E/mm-camera: <CPP   ><ERROR> 976: cpp_module_send_buf_divert_ack: [CPP_BUF:] send_event_upstream failed -14
2021-03-19 17:44:35.099 871-11602/? E/mm-camera: <MCT   ><ERROR> 1108: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
2021-03-19 17:44:35.115 871-11736/? E/quadracfa_dummy: inside dummy remosaic_deinit 1
2021-03-19 17:44:35.244 5966-10915/io.ionic.starter E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2021-03-19 17:44:35.245 5966-10915/io.ionic.starter E/libc: Access denied finding property "vendor.camera.aux.packagelist2"
2021-03-19 17:44:35.245 5966-10915/io.ionic.starter E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2021-03-19 17:44:35.245 5966-10915/io.ionic.starter E/libc: Access denied finding property "vendor.camera.aux.packagelist2"
2021-03-19 17:44:35.256 24944-11742/? E/FileSource: Failed to open file '/product/media/audio/ui/camera_click.ogg'. (No such file or directory)
2021-03-19 17:44:35.256 24944-11742/? E/GenericSource: Failed to create data source!
2021-03-19 17:44:35.256 24943-24943/? E/MediaPlayerNative: error (1, -2147483648)
2021-03-19 17:44:35.256 24943-27642/? E/CameraService: Failed to load CameraService sounds: /product/media/audio/ui/camera_click.ogg
2021-03-19 17:44:35.258 586-29986/? E/SDM: HWCDisplay::GetHWCLayer: [0] GetLayer(210705) failed: no such layer
2021-03-19 17:44:35.274 24944-11749/? E/FileSource: Failed to open file '/product/media/audio/ui/VideoRecord.ogg'. (No such file or directory)
2021-03-19 17:44:35.274 24944-11749/? E/GenericSource: Failed to create data source!
2021-03-19 17:44:35.274 24943-24943/? E/MediaPlayerNative: error (1, -2147483648)
2021-03-19 17:44:35.274 24943-27642/? E/CameraService: Failed to load CameraService sounds: /product/media/audio/ui/VideoRecord.ogg
2021-03-19 17:44:35.288 24944-11755/? E/FileSource: Failed to open file '/product/media/audio/ui/VideoStop.ogg'. (No such file or directory)
2021-03-19 17:44:35.288 24944-11755/? E/GenericSource: Failed to create data source!
2021-03-19 17:44:35.289 24943-24943/? E/MediaPlayerNative: error (1, -2147483648)
2021-03-19 17:44:35.289 24943-27642/? E/CameraService: Failed to load CameraService sounds: /product/media/audio/ui/VideoStop.ogg
2021-03-19 17:44:35.338 871-11769/? E/mm-camera: <STATS_AIS ><ERROR> 173: dsps_send_req: DSPS Send Request Timeout!!
2021-03-19 17:44:35.340 24945-24961/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'INTERFACE' not found
2021-03-19 17:44:35.340 24945-24961/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'STATE' not found
2021-03-19 17:44:35.340 24945-24961/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
2021-03-19 17:44:35.340 24945-24961/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
2021-03-19 17:44:35.347 871-871/? E/mm-camera: <STATS ><ERROR> 2827: stats_port_check_caps_reserve: Invalid Port capability type!
2021-03-19 17:44:35.347 871-871/? E/mm-camera: <STATS ><ERROR> 2827: stats_port_check_caps_reserve: Invalid Port capability type!
2021-03-19 17:44:35.357 871-11786/? E/mm-camera: <MCT   ><ERROR> 1108: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
2021-03-19 17:44:35.359 871-11786/? E/mm-camera: <MCT   ><ERROR> 1108: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
2021-03-19 17:44:35.364 5966-10915/io.ionic.starter E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2021-03-19 17:44:35.364 5966-10915/io.ionic.starter E/libc: Access denied finding property "vendor.camera.aux.packagelist2"
2021-03-19 17:44:35.364 5966-10915/io.ionic.starter E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2021-03-19 17:44:35.364 5966-10915/io.ionic.starter E/libc: Access denied finding property "vendor.camera.aux.packagelist2"
2021-03-19 17:44:35.377 577-11760/? E/QCameraParameters: setMorphoHDR, ++
2021-03-19 17:44:35.377 577-11760/? E/QCameraParameters: setMorphoHHT, ++
2021-03-19 17:44:35.388 871-11786/? E/mm-camera: <MCT   ><ERROR> 1108: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
2021-03-19 17:44:35.389 577-11760/? E/QCameraParameters: str_val (null)
2021-03-19 17:44:35.389 577-11760/? E/QCameraMorphoPostProc: Enable: nothing to changed!
2021-03-19 17:44:35.389 577-11760/? E/QCameraMorphoPostProc: Enable: nothing to changed!
2021-03-19 17:44:35.389 577-11760/? E/QCameraMorphoPostProc: Enable: nothing to changed!
2021-03-19 17:44:35.389 871-11786/? E/mm-camera: <MCT   ><ERROR> 1108: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
2021-03-19 17:44:35.403 871-11786/? E/mm-camera: <IFACE ><ERROR> 2791: iface_util_modify_plane_info_for_native_buf: iface_util_modify_plane_info_for_native_buf: Invalid cam_format 2088533116
2021-03-19 17:44:35.403 871-11786/? E/mm-camera: <IFACE ><ERROR> 2826: iface_util_calculate_frame_length_for_native_buf: iface_util_calculate_frame_length_for_native_buf: returned fail=-1
2021-03-19 17:44:35.403 871-11786/? E/mm-camera: <IFACE ><ERROR> 2791: iface_util_modify_plane_info_for_native_buf: iface_util_modify_plane_info_for_native_buf: Invalid cam_format 2088533116
2021-03-19 17:44:35.403 871-11786/? E/mm-camera: <IFACE ><ERROR> 2826: iface_util_calculate_frame_length_for_native_buf: iface_util_calculate_frame_length_for_native_buf: returned fail=-1
2021-03-19 17:44:35.403 871-11786/? E/mm-camera: <MCT   ><ERROR> 1108: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
2021-03-19 17:44:35.404 871-11786/? E/mm-camera: <MCT   ><ERROR> 1108: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
2021-03-19 17:44:35.410 871-11786/? E/mm-camera: <IMGLIB><ERROR> 4525: faceproc_hw_comp_create: Library not loaded, handle=0x0, p_ops=0xf0654c4c
2021-03-19 17:44:35.559 871-11767/? E/mm-camera: <SENSOR><ERROR> arc_ov12a10_eeprom_get_calibration_items: 501: ENTER arc_ov12a10_eeprom_get_calibration_items
2021-03-19 17:44:35.559 871-11767/? E/mm-camera: <SENSOR><ERROR> arc_ov12a10_eeprom_get_calibration_items: 516: is_wbc:1,is_afc:1,is_lsc:1,is_dpc:0,is_insensor:0,        is_ois:0
2021-03-19 17:44:35.559 871-11767/? E/mm-camera: <SENSOR><ERROR> arc_ov12a10_eeprom_get_calibration_items: 517:  Exit 
2021-03-19 17:44:35.565 871-11767/? E/mm-camera: <SENSOR><ERROR> arc_ov12a10_autofocus_calibration: 565: Enter
2021-03-19 17:44:35.565 871-11767/? E/mm-camera: <SENSOR><ERROR> arc_ov12a10_autofocus_calibration: 593: [xiaomi af otp] marco: 708, infinity: 203
2021-03-19 17:44:35.565 871-11767/? E/mm-camera: <SENSOR><ERROR> arc_ov12a10_autofocus_calibration: 609: [xiaomi af otp] adjusted code_per_step: 125, qvalue: 128
2021-03-19 17:44:35.572 871-11786/? E/mm-camera: <SENSOR><ERROR> arc_ov12a10_eeprom_get_calibration_items: 501: ENTER arc_ov12a10_eeprom_get_calibration_items
2021-03-19 17:44:35.572 871-11786/? E/mm-camera: <SENSOR><ERROR> arc_ov12a10_eeprom_get_calibration_items: 516: is_wbc:1,is_afc:1,is_lsc:1,is_dpc:0,is_insensor:0,        is_ois:0
2021-03-19 17:44:35.572 871-1163/? E/quadracfa_dummy: inside dummy remosaic_init 1
2021-03-19 17:44:35.572 871-11786/? E/mm-camera: <SENSOR><ERROR> arc_ov12a10_eeprom_get_calibration_items: 517:  Exit 
2021-03-19 17:44:35.572 871-1163/? E/quadracfa_dummy: inside dummy remosaic_gainmap_gen 1
2021-03-19 17:44:35.579 871-11786/? E/mm-camera: <IFACE ><ERROR> 4075: iface_util_set_hw_stream_config_pix: iface_util_set_hw_stream_config_pix: Assigned vfe 1 intf 0 for related cam type 1
2021-03-19 17:44:35.598 871-11786/? E/mm-camera: <IMGLIB><ERROR> 396: faceproc_comp_get_param: faceproc_comp_get_param:396] Error type 520
2021-03-19 17:44:35.598 871-11786/? E/mm-camera: <IMGLIB><ERROR> 1701: faceproc_sw_wrapper_get_config: Null pointer p_handle=0x0, p_config=0xebe0079c
2021-03-19 17:44:35.598 871-11786/? E/mm-camera: <IMGLIB><ERROR> 318: faceproc_comp_set_param: Error param=521
2021-03-19 17:44:35.598 871-11786/? E/mm-camera: <IMGLIB><ERROR> 3396: module_faceproc_client_exec: rc -4
2021-03-19 17:44:35.635 577-11761/? E/mm-still: omx_component_set_callbacks: Bad Parameter
2021-03-19 17:44:35.721 871-11777/? E/mm-camera: <ERROR> 831: dmlroc_init: dmlroc_init cfg: camif 1080x1920, elem 44x60, thres 0.001600, accur 8
2021-03-19 17:44:35.721 871-11777/? E/mm-camera: <ERROR> 832: dmlroc_init: dmlroc_init cfg: offsetH 0, offsetV 12
2021-03-19 17:44:35.721 871-11777/? E/mm-camera: <ERROR> 833: dmlroc_init: dmlroc_init mesh: rxc 10x13, subs 4, hxw 30x30, offset vert 0, horz 0
2021-03-19 17:44:35.749 871-11782/? E/mm-camera: <STATS_AF ><ERROR> 904: af_process_parse_stats: Invalid FV data!
2021-03-19 17:44:40.518 24945-24961/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'INTERFACE' not found
2021-03-19 17:44:40.518 24945-24961/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'STATE' not found
2021-03-19 17:44:40.518 24945-24961/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
2021-03-19 17:44:40.518 24945-24961/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found

Here a part of my AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="io.ionic.starter">
    <!-- Permissions -->

    <uses-permission android:name="android.permission.INTERNET" />
    <!-- Camera, Photos, input file -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <!-- Geolocation API -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-feature android:name="android.hardware.location.gps" />
    <!-- Network API -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <!-- Navigator.getUserMedia -->
    <!-- Video -->
    <uses-permission android:name="android.permission.CAMERA" />
    <!-- Audio -->
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <!-- capacitor-community/barcode-scanner -->
    <uses-sdk tools:overrideLibrary="com.google.zxing.client.android" />
    <uses-feature android:name="android.hardware.camera" />
    <application
        android:hardwareAccelerated="true"

Here a part of my MainActivity.java:

public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
      ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.CAMERA},50);
    }
    // Initializes the Bridge
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
      // Additional plugins you've installed go here
      // Ex: add(TotallyAwesomePlugin.class);
      add(BarcodeScanner.class);

    }});
  }
}

Here the javascript code I use:

  async scanQRCode() {
    try {
      const { BarcodeScanner } = Plugins;
      BarcodeScanner.hideBackground(); // make background of WebView transparent
      const result = await BarcodeScanner.startScan(); // start scanning and wait for a result
      // if the result has content
      console.log(result);
      if (result.hasContent) {
        console.log(result.content); // log the raw scanned content
      }
    } catch (error) {
      ToastHelper.toastError(`Problem with the QR Code Scanner, error: ${error}`);
    }
  }

The android app already has Camera/Location/Microphone/Storage permissions granted on the phone.

@tafelnl
Copy link
Member

tafelnl commented Mar 19, 2021

It looks like the scanner is appearing, but it is hidden by the elements in the WebView. Can you please try debugging it like this: https://github.com/DutchConcepts/capacitor-barcode-scanner/issues/7#issuecomment-744441148

@tafelnl tafelnl added the needs reply needs reply from the user label Mar 19, 2021
@zNoobs
Copy link
Author

zNoobs commented Mar 22, 2021

So you were right the scanner is appearing but it's hidden, setting a transparent background to the elements didn't work, the only thing that worked was to change the body opacity like this comment: #7 (comment)

@zNoobs zNoobs closed this as completed Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs reply needs reply from the user
Projects
None yet
Development

No branches or pull requests

2 participants