Appium 2 is unable to open emulator if not already attached

adb devices : This does not return anything as I dont have an emulator up and running

My capabilities for android

‘appium:platformName’: ‘Android’, // or “iOS”
‘appium:deviceName’: ‘Pixel_6_API_33’, // or “iPhone Simulator”
‘appium:platformVersion’: ‘13’, // or “16.2” (for running iOS v16)
‘appium:automationName’: ‘UiAutomator2’,
‘appium:app’: ‘./test.apk’

2023-06-16T15:06:17.261Z ERROR webdriver: Request failed with status 500 due to unknown error: An unknown server-side error occurred while processing the command. Original error: Could not find a connected Android device in 20146ms.

When I have the emulator up and running, it works just fine