ui.MainActivity' exited with code 127'; Command output: /system/bin/sh: com.XXX.XXX.dev/com.XXX.XXX.presentation.ui.MainActivity: inaccessible or not found

UnknownError: An unknown server-side error occurred while processing the command. Original error: Error attempting to start URI. Original error: Error: Error executing adbExec. Original error: ‘Command ‘/Users/abhishek-admin/Library/Android/sdk/platform-tools/adb -P 5037 -s RF8N61N0S9L shell am start -W -a android.intent.action.VIEW -d https://DEEPLINK
XXX.ui.MainActivity’ exited with code 127’; Command output: /system/bin/sh: com.XXX.XXX.dev/com.XXX.XXX.presentation.ui.MainActivity: inaccessible or not found

Appium Server logs:

[AndroidDriver] Executing native command ‘mobile:deepLink’
[ADB] Running ‘/Users/abhishek-admin/Library/Android/sdk/platform-tools/adb -P 5037 -s RF8N61N0S9L shell am start -W -a android.intent.action.VIEW -d https://XXX.page.link?link=https://XXX-connect-dev.firebaseapp.com//auth/action?apiKey%XXX__YYY%26continueUrl%3Dhttps://XXX.page.link/authdemo%26lang%3Den&apn=com.XXX.connect.dev&amv=0.9.2-dev-04 com.XXX.connect.dev/com.XXX.concept.ZZZ.ui.MainActivity’
[W3C (86fecb04)] Encountered internal error running command: Error: Error attempting to start URI. Original error: Error: Error executing adbExec. Original error: 'Command '/Users/abhishek-admin/Library/Android/sdk/platform-tools/adb -P 5037 -s RF8N61N0S9L shell am start -W -a android.intent.action.VIEW -d https://XXX.page.link?link=https://XXX-connect-dev.firebaseapp.com/
/auth/action?apiKey.dfssadfasdfa.26mode%3DsignIn%sfdsfsaddfsdgagasdg-DGVDSGDFGDSGD-Ag%26continueUrl%3Dhttps://XXX.page.link/authdemo%26lang%3Den\&;apn=com.XXX.connect.dev\&;amv=0.9.2-dev-04 com.XXX.connect.dev/com.XXX.concept.YYY.ui.MainActivity’ exited with code 127’; Command output: /system/bin/sh: com.XXX.connect.dev/com.XXX.concept.YYY.ui.MainActivity: inaccessible or not found

I am not able to navigate back to correct screen after hitting the deeplink it throws above error

I am using below mentioned code for deep link

driver.execute_script(“mobile:deepLink”,{“url”: sign_in,“package”: “com.XXX.connect.dev/com”
“.XXX.concept.YYY.ui”
“.MainActivity”})

@Wreed @Aleksei any suggestion

i use for android:

driver.get("YOUR_APP_NAME://" + linkTxt);

see also https://www.browserstack.com/guide/test-deep-links-on-android-and-ios (same solution)

same error is shown to me when using approach suggested by you

Is it works using adb command? Does your app works with deep link correctly using native way?

https://stackoverflow.com/questions/28802115/i-am-trying-to-test-android-deep-link-urls-through-adb-to-launch-my-app

zsh: parse error near `&’

is shown to me when i try to run in below format:

adb shell am start -a android.intent.action.VIEW -d "example://gizmos (deeplink)" com.myapp (App acitivty)

adb shell am start -a android.intent.action.VIEW -d “https://app.page.link?link=https://app-connect-dev.firebaseapp.com/__/auth/action?apiKey%3DAIzaSyBAR7KWVfHuFEBnTv-IqJpMego2fETaeDE%26mode%3DsignIn%26oobCode%3DyoDeyRhjvz-62l5QCSVWEAOvxfowPirht1AFSXLNsYcAAAGGLD__xA%26continueUrl%3Dhttps://app.page.link/authdemo%26lang%3Den&apn=com.app.connect.dev&amv=0.9.2-dev-04” com.app.qaqa.qaqa/com.app.concept.presentation.ui.MainActivity

Though manually it’s working fine

ok. so at least you have workaround. you can start your deep links using ADB command :slight_smile:https://appium.io/docs/en/writing-running-appium/android/android-shell/ should also work for you.

now compare what the difference between your successful ADB command and what Appium does…

only you can find errors :slight_smile:

Using adb shell am start -W -a android.intent.action.VIEW -d “your deep link url”
shows below logs:

/system/bin/sh: amp: inaccessible or not found

/system/bin/sh: amp: inaccessible or not found

Starting: Intent { act=android.intent.action.VIEW dat=https://appdeep.page.link/… }

Status: ok

LaunchState: UNKNOWN (0)

Activity: com.android.chrome/org.chromium.chrome.browser.document.ChromeLauncherActivity

WaitTime: 586

Complete

Main activity is not shown strange and it’s also hitting the URL multiple times :expressionless:

Issue is resolved, there is issue with URL received via API.