iOS app is closing immediately after launch on real device webdriverio automation

While performing native app automation on iOS real device, once we run the script app is closing/ appearing to background, immediately after launch. Here are capabilities we used

platformName: ‘iOS’,
noReset: true,
fullReset: false,
maxInstances: 1,
automationName: ‘XCUITest’,
deviceName: ‘iPhoneXR’,
platformVersion: 15.1,
bundleId: “”,
udid: ““,
app: “”,
useNewWDA: false,
xcodeOrgId: “”,
xcodeSigningId: “iPhone Developer”,
bootstrapPath: “/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent”,
agentPath: “/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj”

App seems to be closed on the screen but when I swipe up I see the app on the background. So I tried activeApp to activate the app. Till app closed abruptly

Also used queryAppState and we are getting ‘4’ as a result which means app is on foreground but actually its not.

Please help.

Could you share the full appium log?

I am not able to send whole logs, it is showing error like can’t share more than 4 urls

i had
same issue before , in my case i had write wrong test case of launching app >>> ios app is launching automatically by default.

What about creating a gist or something and attaching the link?

The attached error addressed 'webDriverAgentUrl' of null. It means probably the session failed to create a WDA process in somewhere, so I needed the log to figure the reason out.