Gitlab CI Bridge Job pending forever

I am trying to trigger a pipeline in a project when a tag is added to a certain project

Here is the content of the .gitlab-ci.yml file:

image: registry.gitlab.com/34ml/internal/laravel-docker-image-php:7.4

stages:
  - pretest
  - test
  - deploy

job1:
  stage: pretest
  rules:
    - if: $CI_COMMIT_TAG
  script: echo "PACKAGE=34ml/$(basename $CI_PROJECT_DIR)" > vars.env
  artifacts:
    reports:
      dotenv: vars.env

job2:
  stage: test
  script: echo $PACKAGE_NAME
  rules:
    - if: $CI_PIPELINE_SOURCE == "pipeline"

trigger_project_pipeline:
  variables:
    PACKAGE_NAME: $PACKAGE
  stage: deploy
  rules:
    - if: $CI_COMMIT_TAG
  trigger: 
    project: $MAIN_PROJECT_PATH
    branch: $MAIN_PROJECT_BRANCH

MAIN_PROJECT_PATH and MAIN_PROJECT_BRANCH are both gitlab CI env variables. However the bridge job is always pending no matter the value of the MAIN_PROJECT_PATH variable is correct or wrong or even not provided, the bridge job is always pending