Session not created exception while connecting to local emulator

Any idea why i am getting this error?? thanks in advance

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 404. Message: The session identified by 6a2cda78-162b-4224-ac57-98503aef49bc is not known
Build info: version: ‘4.2.0’, revision: ‘86eb611648’
System info: host: ‘C02FD8ARMD6M’, ip: ‘fe80:0:0:0:419:c21d:2d6d:91b2%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘11.4’, java.version: ‘11.0.11’
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {capabilities=[{appium:appActivity=com.sap.sac.MainActivity, appium:appPackage=com.sap.epm.fpa.debug, appium:app=/Users/i322019/Documents/app/CloudForAnalytics-1.32.0-20220526-Debug.apk, appium:deviceName=Nexus664, appium:newCommandTimeout=90, appium:platformVersion=11.0, platformName=Android, sauce:options={}}], desiredCapabilities=Capabilities {appActivity: com.sap.sac.MainActivity, appPackage: com.sap.epm.fpa.debug, appium:app: /Users/i322019/Documents/ap…, appium:deviceName: Nexus664, appium:newCommandTimeout: 90, appium:platformVersion: 11.0, platformName: Android, sauce:options: {}}}]
Capabilities {}

at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:144)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:126)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:102)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:146)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:180)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:588)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:225)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:184)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:79)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:87)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:116)
at com.sac.mobile.appiumlib.MobileDriverFactory.getMobileDriver(MobileDriverFactory.java:268)
at com.sac.mobile.appiumlib.MobileDriverFactory.getMobileDriver(MobileDriverFactory.java:137)
at com.sac.e2e.tests.android.SacFinalAcceptanceTestsAndroid.beforeClass(SacFinalAcceptanceTestsAndroid.java:55)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:61)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:366)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:320)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:176)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:122)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.testng.TestRunner.privateRun(TestRunner.java:764)
at org.testng.TestRunner.run(TestRunner.java:585)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
at org.testng.SuiteRunner.run(SuiteRunner.java:286)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.runSuites(TestNG.java:1069)
at org.testng.TestNG.run(TestNG.java:1037)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)

It’s not clear what’s happening here, but this is some good advice:

https://appium.io/docs/en/writing-running-appium/running-tests/#running-your-test-app-with-appium-android