Ionic Native http abort request is not working (Json error)

Hi,

I am using ionic Native http plugin for call the API’s

I want to abort previous http request. So as per the GitHub - silkimen/cordova-plugin-advanced-http: Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning! I implement abort() method for abort http request

if(this.requestId && this.requestId !="" ){
                  
    this.httpNative.abort(this.requestId).then(data =>{
        console.log("abort :",data)
        this.requestId = "";
    }).catch(error => {
        this.requestId = "";
        console.log('error 21212', error);
      
    
    });
}else{
    this.spinner = true
  
    this.requestId = this.httpNative.post(this.baseurl+'?action=apiGetBooks', {keyword:this.keyword}, {})
    .then(data => {
        this.spinner = false
        if(data.data){
            this.books = JSON.parse(data.data);
            if(this.books.length == 0){
                this.message = "No result found with <b>"+this.keyword.trim()+"</b>";
            }else{
                this.message = ""
            }
            console.log("data :",data)
        }
    }).catch(error => {
        this.spinner = false
        console.log('status', error.status);
        console.log('error',error.error); // error message as string
        console.log('error',error.error);
    });
}

abort() function is not working on the Android 8 and 8+V

abort() function is return in the errror called JOSN error.

Ionic:

Ionic CLI : 6.16.3 (C:\Users\Sohan\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 5.6.10
@angular-devkit/build-angular : 12.0.5
@angular-devkit/schematics : 12.1.0
@angular/cli : 12.0.5
@ionic/angular-toolkit : 4.0.0

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : android 9.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 8 other plugins)

Utility:

cordova-res : 0.15.3
native-run : 1.4.0

System:

Android SDK Tools : 26.1.1 (C:\Users\Sohan\AppData\Local\Android\Sdk)
NodeJS : v14.17.1 (C:\Program Files\nodejs\node.exe)
npm : 7.8.0
OS : Windows 10

@mhartington no body react on this???

Just seeing this, most of the team has been out due to holidays.

Not able to tell much from what you’ve provided. If you have a sample project that we can test out that would help.

I created this PR which enabled this feature: feat(advanced-http): duplicate methods sync to be able to abort requests by EinfachHans · Pull Request #3575 · ionic-team/ionic-native · GitHub

All methods have been duplicated to not made it a breaking change, so if you need a post, use postSync to make it return the requestId