Get Component when Collider trigger

I want get component Planet when Player Contact but it’s not work

ContactPlanet(){
    if(this.collider){
        this.collider.on(Contact2DType.BEGIN_CONTACT,this.onBeginContactPlanet, this);
        this.collider.on(Contact2DType.END_CONTACT,this.onEndContactPlanet, this);
    }
}
onBeginContactPlanet(contact: any, selfCollider: CircleCollider2D, otherCollider: CircleCollider2D){
    console.log("Đã va chạm");
    this.isPlanet = true;
    this.GetComponentPlanet(otherCollider);
}
onEndContactPlanet(contact: any, selfCollider: CircleCollider2D, otherCollider: CircleCollider2D){
    console.log("Thoát va chạm");
    this.isPlanet = false;
}
// @property({type:CircleCollider2D})
// planetCollider: CircleCollider2D; <------- variable declaration
GetComponentPlanet(planetCollider: CircleCollider2D) {
    console.log(planetCollider);
    if (planetCollider instanceof CircleCollider2D) {
        this.planetCollider = planetCollider;
        this.acreage = this.planetCollider.radius;
        console.log
    }
}

you haven’t passed the component of other collider , you have just defined the type of the other collider
use otherCollider = this.getcomponent(cc.circlecoolder2d);
above this.GetComponentPlanet(otherCollider);
and then try