-1
java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'C:\\Users\\Happyselling.in\\.katalon\\tools\\android_sdk\\platform-tools\\adb.exe -P 5037 -s 04a793890405 shell settings delete global hidden_api_policy_pre_p_apps' exited with code 4294967295'; Stderr: 'Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
    at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:1819)
    at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1027)
    at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1010)
    at com.android.providers.settings.SettingsProvider.delete(SettingsProvider.java:592)
    at android.content.ContentProvider$Transport.delete(ContentProvider.java:343)
    at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:406)
    at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:289)
    at android.os.ShellCommand.exec(ShellCommand.java:103)
    at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:51)
    at android.os.Binder.shellCommand(Binder.java:634)
    at android.os.Binder.onTransact(Binder.java:532)
    at android.os.Binder.execTransact(Binder.java:731)'; Code: '4294967295'
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'HAPPYSELLINGIN', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_181'
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'C:\\Users\\Happyselling.in\\.katalon\\tools\\android_sdk\\platform-tools\\adb.exe -P 5037 -s 04a793890405 shell settings delete global hidden_api_policy_pre_p_apps' exited with code 4294967295'; Stderr: 'Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

Can anyone help?

Daemon Painter
  • 3,208
  • 3
  • 29
  • 44

2 Answers2

0

If you are using Mi device then this can be an issue with MIUI. Try the following steps:

USB debugging -Debug mode when USB is connected

Install via USB -Allow installing apps via USB

USB debugging (Security Settings) - Allow granting permissions and simulating input via USB debugging

Amit Kumar
  • 438
  • 1
  • 4
  • 15
0

To resolve java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session, you have to follow below steps:

  • Upgrade Appium server version
  • Remove io.appium.uiautomator2.server.test and appium.uiautomator2.server from your devices. adb uninstall io.appium.uiautomator2.server.test adb uninstall appium.uiautomator2.server
  • Delete folder C:Users//<user_folder>/.katalon/tools/android_sdk and let Katalon download again

Watch the below video for detail explanation: https://youtu.be/Y8QuOL7EKng

סטנלי גרונן
  • 2,917
  • 23
  • 46
  • 68