98 Subaru Legacy Outback air in brake system

I have an 1998 Subaru Outback Legacy. Recently brakes began to feel little soft so I decided to check whether there’s air in the system and there was. I could not get the brakes bled. No matter how long I tried there was always air in each single caliper. I replaced the master cylinder (albeit with a one from a junkyard) but the problem persists. There is no visible leaks along the line and there’s no leaking from the calipers. Is it possible, it’s a faulty brake booster?

Some things worth mentioning. When I press the brake bubbles come up in the brake fluid reservoir. Also, check engine light came on about the same time I started having problems.