Can someone help me identify why this express server returns a 404?

This test fails with a 404 error, can someone help me figure out what is wrong because I really don’t see the issue, I need a second pair of eyes I think. I am trying to mock a Microsoft Graph API request to remove someone from an Entra group. It works fine the actual code but I am trying to write an integration tests with a mock backend as you can see.

import axios from "axios";
import express from "express";
import { Server } from "http";

describe.only("fourohfour", () => {
  const app = express();
  app.use(express.json());
  // Entra remove member
  app.delete("graph/groups/:group/members/:userId/$ref", (req, res) => {
    console.log(`ENDPOINT remove ${req.params.group} ${req.params.userId}`);
    res.sendStatus(200);
  });

  let server: Server;

  beforeAll(done => {
    server = app.listen(3001, done);
  });

  afterAll(async () => {
    server.close();
  });

  it("should not four oh four", async () => {
    const res = await axios.delete(
      "http://localhost:3001/graph/groups/123/members/456/$ref",
    );

    expect(res.status).toBe(200);
  });
});

How do I check if the data in column 6 of my Spreadsheet A exists in the column 1 of my Spreadsheet B?

I want to check if the newly inserted values in column 6 match the records in another google sheet, and I want to reject the user input if it does not match. What is the issue(s) of my code below?

function onnameEdit(e) {var range = e.range;var sheetName = range.getSheet().getName();var column = range.getColumn();var row = range.getRow();var inputValue = e.value;
if (sheetName == 'Join Queue [FOR ADVISEES]' && column == 6) {var sName = inputValue;var db = SpreadsheetApp.openById('1jdEUJK2uw71YAn_AeK3uEQK77oOtGCVOI12TJHWN0QE').getSheetByName('Login');var snameExists = false;
var recordsData = db.getRange("B:B").getValues(); // Assuming the names are in column B (column 2)
for (var i = 0; i < recordsData.length; i++) {
  if (recordsData[i][0].toString().toLowerCase() === sName.toString().toLowerCase()) {
    snameExists = true;
    break;
  }
}

if (!snameExists) {
  SpreadsheetApp.getUi().alert("The entered name does not exist in the records. Please register first, or make sure you're entering the correct name.");
  range.clearContent();
} else {
  var dateCell = range.offset(0, 3); // Assuming the date will be written 3 columns to the right of the edited cell
  if (dateCell.getValue() === "") {
    dateCell.setValue(new Date()); // Set current date and time
  }
}
}}

Additionaly, I also want to ensure that a datecell will be added if the user input is accepted00

Instagram embed code only shows “view on instagram” instead of displaying image

I am building an HTML/CSS/Javascript application that dynamically embeds facebook posts based on an API that returns a list of facebook post ID’s. I loop through the post ID’s, generate an embed code with postId inserted for each post, and append to the DOM. Simple stuff.

However I need to append some simple text above each post, and I cannot figure out how to do this dynamically in Javascript. When I dynamically create the text and try to append it to the ID tag of each post, nothing seems to happen. I know the facebook embed code is generating a ton of code, so perhaps it’s getting overwritten. Is there any way to achieve this? See below for my code.

// Array of facebook post ID's
facebookArr = [{
    post_id: "pfbid0cm7x6wS3jCgFK5hdFadprTDMqx1oYr6m1o8CC93AxoE1Z3Fjodpmri7y2Qf1VgURl"
  },
  {
    post_id: "pfbid0azgTbbrM5bTYFEzVAjkVoa4vwc5Fr3Ewt8ej8LVS1hMzPquktzQFFXfUrFedLyTql"
  },
];

// Variables to store post ID, embed code, parent container
let postId = "";
let embedCode = "";
let facebookContainer = document.getElementById("facebook-feed-container");
$(facebookContainer).empty();

// Loop through data to display posts

facebookArr.forEach((post) => {
  postId = post.post_id;

  postLink = `${postId}/?utm_source=ig_embed&amp;utm_campaign=loading`;

  embedCode = `<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2FIconicCool%2Fposts%2F${postId}&show_text=true&width=500" width="200" height="389" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share" id=fb-post__${postId}></iframe>`;

  // Update the DOM
  facebookContainer.innerHTML += embedCode;
});

facebookArr.forEach((post) => {
  let additionalText = document.createElement("div");
  additionalText.innerText = "additional text to append";

  let postContainer = document.getElementById(`fb-post__${postId}`)
  postContainer.append(additionalText)
});
#facebook-feed-container {
  display: flex;
  flex-direction: row;
  row-gap: 1rem;
  column-gap: 3rem;
  padding: 1rem;
}
// Jquery script
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

// Parent container for posts
<div id="facebook-feed-container"></div>

create-react-app command throws npm ENOENT error

I am new to React and NodeJS. I am trying to create a React app using the command npx create-react-app my-app, but every time I run this command, I get the error shown below about MySQL

npm error meesage

does react need MySQL to function and how do i get rid of this error?
Thank you.

Here are some of the things I have tried:

  • reinstalled node and npm multiple times, even used nvm.
  • added MySQL bin directory to PATH.
  • ran the command create-react-app without npx.
  • tried npm create vite@latest.

npm packages, modular architecture, problem with managing dependencies

in our team we have decided that we will use modular architecture for our web application.
But we ran into a problem.
How to properly manage the dependencies of these packages.

There is no question with devDependencies, they are used only for the development of the package itself.

The other thing is dependencies.

We have several npm modules.
@uikit-module, @dashboard-module, @profile-module.

@dashboard-module depends on @profile-module.

@dashboard-module, @profile-module depend on @uikit-module

There are several questions:

  1. How to properly remove dependecies from the resulting build? Using external properties in the module builder.
  2. How to manage peerDependecies?
  3. What are some convenient package management tools for colocated development?

`{
“name”: “@dashboard-module”,
“dependencies”: {
“@profile-module”: “^0.0.1”,
“@uikit-module”: “^0.0.1”
}
}

{
“name”: “@profile-module”,
“dependencies”: {
“@uikit-module”: “^0.0.1”
}
}
`

How to change the volume of Video on ReactPixi?

I try to play video using @pixi/react.
I can play & stop video below code.
But I don’t know how to change the volume of a video.

  const videoRef = useRef(null);
  ...
  if(...){ //when click "close"
     videoRef.current.destroy(true); // stop video
  }
...
  return(
...
            <Sprite
              image={videourl}
              width={width}
              height={height}
              x={0}
              y={0}
              ref={videoRef}
            />
    )

logo image appearing in print for firefox but not appearing for chrome and microsoft edge

I am trying to have a link which on click does windows print function on a particular html element that includes a logo.
The logo appears if I try the link in firefox browser but the logo is not appearing with chrome and microsoft edge.
When if I do a window.print() on the whole document body the image is appearing with all 3 browsers.

Can help me point to the right direction to solve the issue with print with logo in chrome and edge for the element.

TestPage.jsp

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="/WEB-INF/anti_csrf.tld" prefix="anti_csrf" %>

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
  <title><spring:message code="Common.Info1.ApplicationName" text="Common.Info1.ApplicationName"/></title>
  <link rel="stylesheet" href="<c:url value="/resources/css/main.css"/>"/>
  <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.0-rc.2/themes/smoothness/jquery-ui.css" title="no title" charset="utf-8">
  <link rel="stylesheet" href="<c:url value="/resources/css/spinner.css"/>"/>
 
</head>

<body>
    <div>Some Text</div>
    <div>Some Text</div>
    <div>Some Text</div>
    <div><select class="form-control" id="yy" name="yy" onChange="actionRefresh()">
         <c:forEach var="i" begin="1" end="21" step="1">    
           <option value="i" selected>${i+1}</option>
         </c:forEach> 
      </select>
    </div>
   <div class="row form-element-margin">
<div class="col-sm-11"> </div>
<div class="col-sm-1">                                                  
   <a href="#" onclick="printDiv('generateData')"><i class="fa fa-print fa-2x" aria-hidden="true"></i></a>
</div>
    <div  style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt;" id="genericData">
       <div style="font-family: Arial, Helvetica, sans-serif;font-size: 10pt;" class="row form-element-margin">
<div class="col-sm-12 col-xs-12 txt_right">
<c:if test="${not empty requestScope.logo}">
<label class="header"><img  height="35" src="<c:url value="/resources/assets/${requestScope.logo}" />"/></label>
</c:if> 
</div>
<div class="col-xs-12 col-sm-4">    </div>
<div class="col-sm-4 text-center">  
<label  class="header" ><b><c:out value="${requestScope.ReportTitle1}" /></b></label></br>
<label class="header"><b><c:out value="${requestScope.ReportTitle2}" /></b></label>
</div>
    </div>
</div>
<div>Some more text</div>

<script src="<c:url value="/resources/js/Testmenu.js" />"></script>

</body>
</html>

Testmenu.js

function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
}

JavaScript | React | Sharing state between two components in different files

I have a react file that has the next useState:

 const [isEmpty, setIsEmpty] = useState(false);

in this file I have the next useEffect:

useEffect(() => {
    //when the state of isEmpty is changed, do something
}, isEmpty);

I have a second react file that I would like also to have the same useEffect code, so I could do some stuff if the state of isEmpty is changed on the first file.

How can I so that?

I tried to export the useState but I get an error.
is there an easy way to share state between 2 react files?
can someone give share an example?

Vuetify 3 text is not ellipsed on v-autocomplete

I’m using Vuetify 3 and trying to truncate long text in a v-autocomplete component using text-overflow: ellipsis, but it doesn’t seem to work. Here’s my code:

<div id="app">
  <v-app id="inspire">
    <v-row align="center">
      <v-col cols="12">
        <v-autocomplete
          :items="items"
          :menu-props="{ top: true, offsetY: true }"
          label="Label"
          class="basic"
        ></v-autocomplete>
      </v-col>
    </v-row>
  </v-app>
</div>

Css

.basic{
  width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

JS

new Vue({
  el: '#app',
  vuetify: new Vuetify(),
  data: () => ({
    items: ['Foo', 'Bar', 'Fizz', 'Buzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'],
  }),
})

Here for testing
https://codepen.io/luigisaggese/pen/mdgMRBw

Getting php in JS [duplicate]

ok, i am trying to have JavaScript code that calls for a PHP function so far i have this

PHP:

function loadMSG() {
  ob_end_clean();
  $MSG = fopen("MSG.txt", "r");
  echo fread($MSG, filesize("MSG.txt"));
  fclose($MSG);
}

// Reload MSG
function reloadMSG() {
  if (in_array(filemtime("MSG.txt"), range(time() - 30, time() + 30))) {
    loadMSG();
  } else {
    sleep(3);
  
  }
}

it works on it’s own so there’s no problem there it’s just i need it to be called by JS. i have seen many other people give answers to similar questions but they aren’t very explanatory and all use jquery which i don’t understand much.

Backup and restoring Hyperledger fabric network one instance to other instanc

#!/bin/bash
echo "One click backup"
set -e

if [ -d "./backup" ] 
then
    echo "Back up is already exists." 
    sudo cp -r ../wallet/ backup/
    # sudo rm -rf backup
else
# sudo rm -rf backup
    mkdir backup
    echo "Created backup folder......"    
    echo
    #Copying Certificates and Configuration files
    sleep 5
    
    sudo cp -r y-network/organizations/ backup/
    sudo cp -r y-network/channel-artifacts/ backup/
    sudo cp -r y-network/system-genesis-block/ backup/
    
    # cd ..
    
    sudo cp -r ../wallet/ backup/
    
    cd backup
    # mkdir peer
    # mkdir orderer
    cd ..
    #Copying Peer and orderer data
    sleep 5
    sudo docker cp peer0.org1.yaliyomo.net:/var/hyperledger/production/ backup/peer0.org1/
    sudo docker cp peer0.org2.yaliyomo.net:/var/hyperledger/production/ backup/peer0.org2/
    sudo docker cp peer0.org3.yaliyomo.net:/var/hyperledger/production/ backup/peer0.org3/
    sudo docker cp orderer.yaliyomo.net:/var/hyperledger/production/orderer/ backup/orderer/
    sudo docker cp orderer1.yaliyomo.net:/var/hyperledger/production/orderer/ backup/orderer1/
    sudo docker cp orderer2.yaliyomo.net:/var/hyperledger/production/orderer/ backup/orderer2/
    sudo docker cp orderer3.yaliyomo.net:/var/hyperledger/production/orderer/ backup/orderer3/
    sudo docker cp orderer4.yaliyomo.net:/var/hyperledger/production/orderer/ backup/orderer4/
    
    #All done
    exit 1 
fi

This is my Backup shell script file.

set -e

#bringing network down and clearing volumes

cd ../docker-compose/

sudo ./networkDelete.sh

# sudo docker-compose -f docker-compose.yml down

sudo docker volume prune

sudo docker network prune

# Copying the wallet data from backup to application wallet
echo
echo "Copying the wallet data from backup to application wallet"
echo "Current working directory: $(pwd)"

cd ../Blockchain/backup

if sudo cp -r ./wallet/* ../../wallet/; then
    echo "Wallet data copied successfully."
else
    echo "Failed to copy wallet data."
    exit 1
fi

# sudo cp -r ./wallet/* ../../wallet/

echo "Bringing network Up with Previous Backup"

cd ..

if sudo docker-compose -f restore-network.yaml up -d; then
    echo "Containers successfully started."
    # All done...
    sleep 20
    echo "Successfully up the containers"
else
    echo "Failed to start containers."
    exit 1
fi


# sudo docker-compose -f restore-network.yaml up -d
# #All done...
# sleep 20
# echo "successfully up the containers"


# Querying Data


# cd ./y-network/scripts/
# sudo ./envVar.sh
# exit 1


cd ./y-network/scripts/

if sudo ./envVar.sh; then
    echo "Data queried successfully."
else
    echo "Failed to query data."
    exit 1
fi

exit 0

This is Restoring shell script.

# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

version: '2'

volumes:
  orderer.yaliyomo.net:
  orderer1.yaliyomo.net:
  orderer2.yaliyomo.net:
  orderer3.yaliyomo.net:
  orderer4.yaliyomo.net:
  peer0.org1.yaliyomo.net:
  peer0.org2.yaliyomo.net:
  peer0.org3.yaliyomo.net:
  grafana-data:

networks:
  test:

services:

  ca_org1:
    image: hyperledger/fabric-ca:$IMAGE_TAG
    restart: always
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca-org1
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_SERVER_PORT=7054
    ports:
      - "7054:7054"
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
    volumes:
      - ./backup/organizations/fabric-ca/org1:/etc/hyperledger/fabric-ca-server
    container_name: ca_org1
    networks:
      - test

  ca_org2:
    image: hyperledger/fabric-ca:$IMAGE_TAG
    restart: always
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca-org2
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_SERVER_PORT=8054
    ports:
      - "8054:8054"
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
    volumes:
      - ./backup/organizations/fabric-ca/org2:/etc/hyperledger/fabric-ca-server
    container_name: ca_org2
    networks:
      - test

  ca_org3:
    image: hyperledger/fabric-ca:$IMAGE_TAG
    restart: always
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca-org3
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_SERVER_PORT=6054
    ports:
      - "6054:6054"
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
    volumes:
      - ./backup/organizations/fabric-ca/org3:/etc/hyperledger/fabric-ca-server
    container_name: ca_org3
    networks:
      - test

  ca_orderer:
    image: hyperledger/fabric-ca:$IMAGE_TAG
    restart: always
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca-orderer
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_SERVER_PORT=9054
    ports:
      - "9054:9054"
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
    volumes:
      - ./backup/organizations/fabric-ca/ordererOrg:/etc/hyperledger/fabric-ca-server
    container_name: ca_orderer
    networks:
      - test
  couchdb0:
    container_name: couchdb0
    image: hyperledger/fabric-couchdb
    restart: always
    # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
    # for CouchDB.  This will prevent CouchDB from operating in an "Admin Party" mode.
    environment:
      - COUCHDB_USER=
      - COUCHDB_PASSWORD=
    # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
    # for example map it to utilize Fauxton User Interface in dev environments.
    ports:
      - "5984:5984"
    networks:
      - test
    volumes:
     - /data/couchdb0:/opt/couchdb/data

  couchdb1:
    container_name: couchdb1
    image: hyperledger/fabric-couchdb
    restart: always
    # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
    # for CouchDB.  This will prevent CouchDB from operating in an "Admin Party" mode.
    environment:
      - COUCHDB_USER=
      - COUCHDB_PASSWORD=
    # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
    # for example map it to utilize Fauxton User Interface in dev environments.
    ports:
      - "7984:5984"
    networks:
      - test
    volumes:
      - /data/couchdb1:/opt/couchdb/data

  couchdb2:
    container_name: couchdb2
    image: hyperledger/fabric-couchdb
    restart: always
    # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
    # for CouchDB.  This will prevent CouchDB from operating in an "Admin Party" mode.
    environment:
      - COUCHDB_USER=
      - COUCHDB_PASSWORD=
    # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
    # for example map it to utilize Fauxton User Interface in dev environments.
    ports:
      - "6984:5984"
    networks:
      - test
    volumes:
     - /data/couchdb2:/opt/couchdb/data
    
  orderer.yaliyomo.net:
    container_name: orderer.yaliyomo.net
    image: hyperledger/fabric-orderer:$IMAGE_TAG
    restart: always
    environment:
      - FABRIC_LOGGING_SPEC=INFO
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_LISTENPORT=7050
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
      # enabled TLS
      - ORDERER_GENERAL_TLS_ENABLED=true
      - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
      - ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
      - ORDERER_KAFKA_VERBOSE=true
      - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: orderer
    volumes:
        - ./backup/system-genesis-block/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer.yaliyomo.net/msp:/var/hyperledger/orderer/msp
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer.yaliyomo.net/tls/:/var/hyperledger/orderer/tls
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer:/var/hyperledger
        - ./backup/orderer:/var/hyperledger/production/orderer 
        #- /var/hyperledger/orderer:/var/hyperledger/production              
    ports:
      - 7050:7050
    networks:
      - test
  orderer1.yaliyomo.net:
    container_name: orderer1.yaliyomo.net
    image: hyperledger/fabric-orderer:$IMAGE_TAG
    restart: always
    environment:
      - FABRIC_LOGGING_SPEC=INFO
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_LISTENPORT=7050
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
      # enabled TLS
      - ORDERER_GENERAL_TLS_ENABLED=true
      - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
      - ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
      - ORDERER_KAFKA_VERBOSE=true
      - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: orderer
    volumes:
        - ./backup/system-genesis-block/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer1.yaliyomo.net/msp:/var/hyperledger/orderer/msp
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer1.yaliyomo.net/tls/:/var/hyperledger/orderer/tls
        - ./backup/orderer1:/var/hyperledger/production/orderer 
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer1:/var/hyperledger
        #- /var/hyperledger/orderer:/var/hyperledger/production              
    ports:
      - 7150:7050
    networks:
      - test
  orderer2.yaliyomo.net:
    container_name: orderer2.yaliyomo.net
    image: hyperledger/fabric-orderer:$IMAGE_TAG
    restart: always
    environment:
      - FABRIC_LOGGING_SPEC=INFO
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_LISTENPORT=7050
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
      # enabled TLS
      - ORDERER_GENERAL_TLS_ENABLED=true
      - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
      - ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
      - ORDERER_KAFKA_VERBOSE=true
      - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: orderer
    volumes:
        - ./backup/system-genesis-block/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer2.yaliyomo.net/msp:/var/hyperledger/orderer/msp
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer2.yaliyomo.net/tls/:/var/hyperledger/orderer/tls
        - ./backup/orderer2:/var/hyperledger/production/orderer 
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer2:/var/hyperledger
        #- /var/hyperledger/orderer:/var/hyperledger/production              
    ports:
      - 7250:7050
    networks:
      - test  
  orderer3.yaliyomo.net:
    container_name: orderer3.yaliyomo.net
    image: hyperledger/fabric-orderer:$IMAGE_TAG
    restart: always
    environment:
      - FABRIC_LOGGING_SPEC=INFO
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_LISTENPORT=7050
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
      # enabled TLS
      - ORDERER_GENERAL_TLS_ENABLED=true
      - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
      - ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
      - ORDERER_KAFKA_VERBOSE=true
      - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: orderer
    volumes:
        - ./backup/system-genesis-block/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer3.yaliyomo.net/msp:/var/hyperledger/orderer/msp
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer3.yaliyomo.net/tls/:/var/hyperledger/orderer/tls
        - ./backup/orderer3:/var/hyperledger/production/orderer 
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer3:/var/hyperledger
        #- /var/hyperledger/orderer:/var/hyperledger/production              
    ports:
      - 7350:7050
    networks:
      - test  
  orderer4.yaliyomo.net:
    container_name: orderer4.yaliyomo.net
    image: hyperledger/fabric-orderer:$IMAGE_TAG
    restart: always
    environment:
      - FABRIC_LOGGING_SPEC=INFO
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_LISTENPORT=7050
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
      # enabled TLS
      - ORDERER_GENERAL_TLS_ENABLED=true
      - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
      - ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
      - ORDERER_KAFKA_VERBOSE=true
      - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: orderer
    volumes:
        - ./backup/system-genesis-block/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer4.yaliyomo.net/msp:/var/hyperledger/orderer/msp
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer4.yaliyomo.net/tls/:/var/hyperledger/orderer/tls
        - ./backup/orderer4:/var/hyperledger/production/orderer 
        - ./backup/organizations/ordererOrganizations/yaliyomo.net/orderers/orderer4:/var/hyperledger
        #- /var/hyperledger/orderer:/var/hyperledger/production              
    ports:
      - 7450:7050
    networks:
      - test  

  peer0.org1.yaliyomo.net:
    container_name: peer0.org1.yaliyomo.net
    restart: always
    image: hyperledger/fabric-peer:$IMAGE_TAG
    environment:
      #Generic peer variables
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      # the following setting starts chaincode containers on the same
      # bridge network as the peers
      # https://docs.docker.com/compose/networking/
      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_test
      - FABRIC_LOGGING_SPEC=INFO
      #- FABRIC_LOGGING_SPEC=DEBUG
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_GOSSIP_USELEADERELECTION=true
      - CORE_PEER_GOSSIP_ORGLEADER=false
      - CORE_PEER_PROFILE_ENABLED=true
      - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
      - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
      - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
      # Peer specific variabes
      - CORE_PEER_ID=peer0.org1.yaliyomo.net
      - CORE_PEER_ADDRESS=peer0.org1.yaliyomo.net:7051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:7051
      - CORE_PEER_CHAINCODEADDRESS=peer0.org1.yaliyomo.net:7052
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.yaliyomo.net:7051
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.yaliyomo.net:7051
      - CORE_PEER_LOCALMSPID=Org1MSP
      - CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9443  # operation RESTful API
      - CORE_METRICS_PROVIDER=prometheus  # prometheus will pull metrics from orderer via /metrics RESTful API
      - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
      - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984
      # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
      # provide the credentials for ledger to connect to CouchDB.  The username and password must
      # match the username and password set for the associated CouchDB.
      - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
      - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
    volumes:
        - /var/run/:/host/var/run/
        - ./backup/organizations/peerOrganizations/org1.yaliyomo.net/peers/peer0.org1.yaliyomo.net/msp:/etc/hyperledger/fabric/msp
        - ./backup/organizations/peerOrganizations/org1.yaliyomo.net/peers/peer0.org1.yaliyomo.net/tls:/etc/hyperledger/fabric/tls
        - ./backup/peer0.org1:/var/hyperledger/production
        #- /var/hyperledger/peer01:/var/hyperledger/production
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: peer node start
    ports:
      - 7051:7051
    networks:
      - test
    depends_on:
      - couchdb0  

  peer0.org2.yaliyomo.net:
    container_name: peer0.org2.yaliyomo.net
    image: hyperledger/fabric-peer:$IMAGE_TAG
    restart: always
    environment:
      #Generic peer variables
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      # the following setting starts chaincode containers on the same
      # bridge network as the peers
      # https://docs.docker.com/compose/networking/
      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_test
      - FABRIC_LOGGING_SPEC=INFO
      #- FABRIC_LOGGING_SPEC=DEBUG
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_GOSSIP_USELEADERELECTION=true
      - CORE_PEER_GOSSIP_ORGLEADER=false
      - CORE_PEER_PROFILE_ENABLED=true
      - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
      - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
      - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
      # Peer specific variabes
      - CORE_PEER_ID=peer0.org2.yaliyomo.net
      - CORE_PEER_ADDRESS=peer0.org2.yaliyomo.net:8051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:8051
      - CORE_PEER_CHAINCODEADDRESS=peer0.org2.yaliyomo.net:8052
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8052
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.yaliyomo.net:8051
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.yaliyomo.net:8051
      - CORE_PEER_LOCALMSPID=Org2MSP
      - CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9443  # operation RESTful API
      - CORE_METRICS_PROVIDER=prometheus  # prometheus will pull metrics from orderer via /metrics RESTful API
      - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
      - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984
      # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
      # provide the credentials for ledger to connect to CouchDB.  The username and password must
      # match the username and password set for the associated CouchDB.
      - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
      - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
    volumes:
        - /var/run/:/host/var/run/
        - ./backup/organizations/peerOrganizations/org2.yaliyomo.net/peers/peer0.org2.yaliyomo.net/msp:/etc/hyperledger/fabric/msp
        - ./backup/organizations/peerOrganizations/org2.yaliyomo.net/peers/peer0.org2.yaliyomo.net/tls:/etc/hyperledger/fabric/tls
        - ./backup/peer0.org2:/var/hyperledger/production
        #- /var/hyperledger/peer02:/var/hyperledger/production                
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: peer node start
    ports:
      - 8051:8051
    networks:
      - test
    depends_on:
      - couchdb1
  
  peer0.org3.yaliyomo.net:
    container_name: peer0.org3.yaliyomo.net
    image: hyperledger/fabric-peer:$IMAGE_TAG
    restart: always
    environment:
      #Generic peer variables
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      # the following setting starts chaincode containers on the same
      # bridge network as the peers
      # https://docs.docker.com/compose/networking/
      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_test
      - FABRIC_LOGGING_SPEC=INFO
      #- FABRIC_LOGGING_SPEC=DEBUG
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_GOSSIP_USELEADERELECTION=true
      - CORE_PEER_GOSSIP_ORGLEADER=false
      - CORE_PEER_PROFILE_ENABLED=true
      - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
      - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
      - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
      # Peer specific variabes
      - CORE_PEER_ID=peer0.org3.yaliyomo.net
      - CORE_PEER_ADDRESS=peer0.org3.yaliyomo.net:6051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:6051
      - CORE_PEER_CHAINCODEADDRESS=peer0.org3.yaliyomo.net:6052
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:6052
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.yaliyomo.net:6051
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org3.yaliyomo.net:6051
      - CORE_PEER_LOCALMSPID=Org3MSP
      - CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9443  # operation RESTful API
      - CORE_METRICS_PROVIDER=prometheus  # prometheus will pull metrics from orderer via /metrics RESTful API
      - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
      - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb2:5984
      # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
      # provide the credentials for ledger to connect to CouchDB.  The username and password must
      # match the username and password set for the associated CouchDB.
      - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
      - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
    volumes:
        - /var/run/:/host/var/run/
        - ./backup/organizations/peerOrganizations/org3.yaliyomo.net/peers/peer0.org3.yaliyomo.net/msp:/etc/hyperledger/fabric/msp
        - ./backup/organizations/peerOrganizations/org3.yaliyomo.net/peers/peer0.org3.yaliyomo.net/tls:/etc/hyperledger/fabric/tls
        - ./backup/peer0.org3:/var/hyperledger/production        
        #- /var/hyperledger/peer03:/var/hyperledger/production
    working_dir: /opt/gopath/src/3github.com/hyperledger/fabric/peer
    command: peer node start
    ports:
      - 6051:6051
    networks:
      - test
    depends_on:
      - couchdb2  
  
  # prometheus:
  #   image: prom/prometheus
  #   restart: always
  #   volumes:
  #     - ./prometheus.yml:/etc/prometheus/prometheus.yml
  #   networks:
  #     - test
  
  pushGateway:
    image: prom/pushgateway
    restart: always
    ports:
      - "9091:9091"
    networks:
      - test

  node_exporter:
    image: prom/node-exporter
    restart: always
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /:/rootfs:ro
    command:
      - '--path.procfs=/host/proc'
      - '--path.sysfs=/host/sys'
      - '--path.rootfs=/host'
      - '--collector.filesystem.ignored-mount-points="^(/rootfs|/host|)/(sys|proc|dev|host|etc)($$|/)"'
      - '--collector.filesystem.ignored-fs-types="^(sys|proc|auto|cgroup|devpts|ns|au|fuse.lxc|mqueue)(fs|)$$"'  
    networks:
      - test


  # grafana:
  #   image: grafana/grafana
  #   restart: always
  #   volumes: 
  #     - grafana-data:/var/lib/grafana
  #     - ./grafana/:/etc/grafana/provisioning/
  #   ports:
  #     - "3001:3000"
  #   networks:
  #     - test

This is restoring yml configuration.

i am following https://www.devprovider.com/2019/10/30/how-to-restore-hyperledger-fabric-from-backup/ this for taking backup and restoring.

in same instance it will working fine as excepted. but one instance to other instance i will get certificate issue.

I am trying to restore one HLF backup into another instance like dev1 backup restore into dev2 environment.

that time getting issue

2024-03-27 05:26:21.293 UTC 002e ERRO [core.comm] ServerHandshake -> Server TLS handshake failed in 655.908µs with error remote error: tls: bad certificate server=PeerServer remoteaddress=172.23.0.20:46364
2024-03-27 05:26:21.328 UTC 002f ERRO [core.comm] ServerHandshake -> Server TLS handshake failed in 933.209µs with error remote error: tls: bad certificate server=PeerServer remoteaddress=172.23.0.19:32894
2024-03-27 05:26:22.295 UTC 0030 ERRO [core.comm] ServerHandshake -> Server TLS handshake failed in 856.132µs with error remote error: tls: bad certificate server=PeerServer remoteaddress=172.23.0.20:46380
2024-03-27 05:26:22.329 UTC 0031 ERRO [core.comm] ServerHandshake -> Server TLS handshake failed in 996.547µs with error remote error: tls: bad certificate server=PeerServer remoteaddress=172.23.0.19:32906
2024-03-27 05:26:23.999 UTC 0032 ERRO [core.comm] ServerHandshake -> Server TLS handshake failed in 747.401µs with error remote error: tls: bad certificate server=PeerServer remoteaddress=172.23.0.20:46382
2024-03-27 05:26:24.033 UTC 0033 ERRO [core.comm] ServerHandshake -> Server TLS handshake failed in 687.64µs with error remote error: tls: bad certificate server=PeerServer remoteaddress=172.23.0.19:32920
2024-03-27 05:26:24.237 UTC 0034 WARN [gossip.gossip] func1 -> Deep probe of peer0.org3.yaliyomo.net:6051 for channel mychannel failed: context deadline exceeded
2024-03-27 05:26:24.237 UTC 0036 WARN [gossip.discovery] func1 -> Could not connect to Endpoint: peer0.org3.yaliyomo.net:6051, InternalEndpoint: peer0.org3.yaliyomo.net:6051, PKI-ID: <nil>, Metadata:  : context deadline exceeded

cordova-background-geolocation-plugin don’t giving any response in cordova android app

i am using cordova-background-geolocation-plugin in cordova android using voltbuilder the plugin configure successfully but when running code in debug console it is not showing any output

Here is the plugin configuration in config.xml

<plugin name="cordova-background-geolocation-plugin">
        <variable name="GOOGLE_PLAY_SERVICES_VERSION" value="11+" />
        <!-- <variable name="ANDROID_SUPPORT_LIBRARY_VERSION" value="23+" /> -->
        <!-- <variable name="ICON" value="@mipmap/ic_launcher" />
        <variable name="SMALL_ICON" value="@mipmap/ic_launcher" /> -->
        <!-- <variable name="ACCOUNT_NAME" value="@string/app_name" />
        <variable name="ACCOUNT_LABEL" value="@string/app_name" />
        <variable name="ACCOUNT_TYPE" value="${PACKAGE_NAME}.account" />
        <variable name="CONTENT_AUTHORITY" value="${PACKAGE_NAME}" /> -->
        <variable name="ALWAYS_USAGE_DESCRIPTION" value="App requires background tracking " />
        <variable name="MOTION_USAGE_DESCRIPTION" value="App requires motion detection" /> 
    </plugin>

<platform name="android">
        <allow-intent href="market:*" />
        <preference name="AndroidXEnabled" value="true" />
        <preference name="android-minSdkVersion" value="23" />
        <preference name="android-targetSdkVersion" value="33" />
        <preference name="hostname" value="localhost" />
        <preference name="AndroidInsecureFileModeEnabled" value="true" />
        <preference name="KeepRunning" value="true"/>
        <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:usesCleartextTraffic="true" />
        </edit-config>
        <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity">
            <application android:exported="true" />
        </edit-config>
        <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/uses-permission" xmlns:android="http://schemas.android.com/apk/res/android">
            <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> 
            <uses-permission android:name="android.permission.ACTION_CREATE_DOCUMENT" />
            <uses-permission android:name="android.permission.ACTION_OPEN_DOCUMENT" />
            <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
            <uses-permission android:name="android.permission.VIBRATE" />
            <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
        </edit-config>
        <preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/android/icon.png"/>
        <icon src="resources/android/ldpi.png" density="ldpi" />
        <icon src="resources/android/mdpi.png" density="mdpi" />
        <icon src="resources/android/hdpi.png" density="hdpi" />
        <icon src="resources/android/xhdpi.png" density="xhdpi" />
        <icon src="resources/android/xxhdpi.png" density="xxhdpi" />
        <icon src="resources/android/xxxhdpi.png" density="xxxhdpi" />
    </platform>

and here is the sample code i am trying to check

Code

 BackgroundGeolocation.configure({
        locationProvider: BackgroundGeolocation.ACTIVITY_PROVIDER,
        desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,
        stationaryRadius: 50,
        distanceFilter: 50,
        notificationTitle: 'Background tracking',
        notificationText: 'enabled',
        debug: true,
        interval: 10000,
        fastestInterval: 5000,
        activitiesInterval: 10000,
      });

Output

Promise {<pending>}

Code

window.BackgroundGeolocation.checkStatus(function(status) {
              console.log('[INFO] BackgroundGeolocation service is running', status.isRunning);
              console.log('[INFO] BackgroundGeolocation services enabled',status.locationServicesEnabled);
              console.log('[INFO] BackgroundGeolocation auth status: ' + status.authorization);
            });

Output

undefined

i had tried this plugin every combination

<plugin name="cordova-background-geolocation-plugin">
        <variable name="GOOGLE_PLAY_SERVICES_VERSION" value="11+" />
        <!-- <variable name="ANDROID_SUPPORT_LIBRARY_VERSION" value="23+" /> -->
        <!-- <variable name="ICON" value="@mipmap/ic_launcher" />
        <variable name="SMALL_ICON" value="@mipmap/ic_launcher" /> -->
        <!-- <variable name="ACCOUNT_NAME" value="@string/app_name" />
        <variable name="ACCOUNT_LABEL" value="@string/app_name" />
        <variable name="ACCOUNT_TYPE" value="${PACKAGE_NAME}.account" />
        <variable name="CONTENT_AUTHORITY" value="${PACKAGE_NAME}" /> -->
        <variable name="ALWAYS_USAGE_DESCRIPTION" value="App requires background tracking " />
        <variable name="MOTION_USAGE_DESCRIPTION" value="App requires motion detection" /> 
    </plugin>

https://github.com/haylltd/cordova-background-geolocation-plugin

and i had also tried this plugin but voltbuilder made it deprecated

mauron85/cordova-plugin-background-geolocation

File Upload Handling: Inconsistent HTTP Response Codes for Different File Sizes with Exception in Tomcat

When uploading files smaller than 5MB that trigger a server-side exception, the server correctly responds with a 500 Internal Server Error, as expected.
However, for files larger than 5MB that also trigger an exception, instead of a 500 error, the client receives a net::ERR_CONNECTION_RESET error.
This inconsistency in behavior for different file sizes is puzzling, especially since the maxPostSize setting should theoretically allow for files of any size, and I would expect the server to consistently return a 500 error for all exceptions.

upload.html

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>File Upload Example</title>
</head>

<body>

  <h2>File Upload to JSP</h2>

  <input type="file" id="fileInput" name="file">
  <button onclick="uploadFile()">Upload File</button>

  <script>
    function uploadFile() {
      var fileInput = document.getElementById('fileInput');
      var file = fileInput.files[0];
      var formData = new FormData();
      formData.append('file', file);

      const xhr = new XMLHttpRequest();
      xhr.open('POST', './upload1.jsp', true);
      xhr.addEventListener('load', function () {
        console.log('done', xhr.responseText);
      });
      xhr.upload.addEventListener('progress', function (e) {
        console.log('progress', e.loaded, e.total);
      });
      xhr.addEventListener('error', function (e) {
        console.log('error', e);
      });
      xhr.onreadystatechange = function () {
        console.log(xhr.readyState, xhr.status)
      }
      xhr.send(formData);
    }
  </script>

</body>

</html>

upload1.jsp

<%@page contentType="text/html;charset=utf-8" %>
<%
try{
    int a = 10/0; // 서버 측 예외 상황 시뮬레이션
}catch(Exception e){
    response.setStatus(response.SC_INTERNAL_SERVER_ERROR);
}
%>

Using tomcat 8.5, and configuring maxPostSize to -1 in Tomcat to allow unlimited file sizes