Encountered internal error running command

I’m working on test automation for apk.

But, I have received these errors:
image

this is my desired cap:
{
“deviceName”: “Google Pixel 3”,
“platformName”: “Android”,
“app”: apk path
}

I’ve tried many solutions before but nothing solved for now :frowning:

Are you using the latest Appium version? What is the Android API level?
Have you tried to provide the main activity name manually as advised in https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md ?
What is the output of adb shell dumpsys window windows after the app has been started?