GithubHelp home page GithubHelp logo

okcagent's Introduction

OkcAgent

Build status

A utility that makes OpenKeychain available in your Termux shell.

Features

This tool acts as a bridge/proxy between Termux and OpenKeychain, enabling you to perform crypto operations in Termux using your keys stored in OpenKeychain, like:

  • authenticate SSH connections
  • sign/verify/encrypt/decrypt messages

This tool implements the existing protocols in this field so you can seamlessly integrate it with other command line utilities like ssh and git.

Demonstration

Install

This project consists of two components: the OkcAgent app, and command line utilities to be used in the Termux shell. You need to install both of them to make it work.

The OkcAgent app

Command line utilities

How to use

  1. Install OpenKeychain, Termux and the necessary components mentioned above.
  2. Open the app and configure the keys to be used for crypto operations.
  3. Use the command line utilities.
    • okc-ssh-agent acts as an SSH agent. You can use okc-ssh-agent as ssh-agent, just eval $(okc-ssh-agent), it will set SSH_AUTH_SOCK to that path to inform programs like ssh to connect to it.
    • okc-gpg supports a limited set of GPG options so you can use it to perform some crypto operations. Read GpgArguments.kt for a complete list of supported options.

Starting okc-ssh-agent automatically

Like the normal ssh-agent, okc-ssh-agent needs to be started first to allow SSH clients to connect to it, and it will be handy to have it started automatically. You can put some startup script in ~/.bashrc or ~/.profile to start the agent when you open a new shell.

For v0.1.1 and earlier versions (of the command line tools, not the OkcAgent app), you need to spefify socket path as its first argument. Take a look at this issue for details.

Starting from v0.1.2, okc-ssh-agent supports most command line options of ssh-agent, so you can use the same script for ssh-agent to start okc-ssh-agent. For example, the following script will start okc-ssh-agent if there isn't one already running and then setup environment variables.

if ! pgrep okc-ssh-agent > /dev/null; then
	okc-ssh-agent > "$PREFIX/tmp/okc-ssh-agent.env"
fi
source "$PREFIX/tmp/okc-ssh-agent.env"

Or you can just add the following line to start it:

eval $(okc-ssh-agent)

Notes about the app

This app is available in Play Store at the price of $1. I didn't intend to make profit from this project and simply consider it as a way of donation. If you don't want to pay, you can always download the dev releases for free using the links mentioned above, or even build the app from its source code. However, please note that the APK files from these two sources are signed with different keys, which means that you have to uninstall the existing app first if you want to switch between them.

This app uses Bugsnag for error reporting.

okcagent's People

Contributors

ddosolitary avatar dependabot[bot] avatar kunoisayami avatar poussinou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

okcagent's Issues

java.lang.RuntimeException in IntentRunnerActivity

Error in OkcAgent

java.lang.RuntimeException in IntentRunnerActivity
Failure delivering result ResultInfo{who=null, request=0, result=-1, data=Intent { act=org.openintents.ssh.action.SIGN (has extras) }} to activity {org.ddosolitary.okcagent/org.ddosolitary.okcagent.IntentRunnerActivity}: java.lang.NullPointerException

View on Bugsnag

Stacktrace

ActivityThread.java:4491 - android.app.ActivityThread.deliverResults

View full stacktrace

Created automatically via Bugsnag

Getting popups saying OpenKeyChain is not installed yet it is - OKCAgent works fine otherwise

So, as of lately I've been getting very frequent popups saying that OKCAgent can't connect to OpenKeyChain and asking me to install it:

OKC

Yet, OpenKeyChain is installed and configured just fine. Authenticating in Termux with SSH works normally with the Yubikey I chose in OKCAgent.

The popups keep happening when I'm in other apps than OKC, OKCAgent or Termux. Especially when I switch to other apps like Firefox. I'm wondering if this has to do with OKC being killed in the background and OKCAgent losing access to it as a result? My phone is an S8 so quite low on RAM these days.

Perhaps even a toggle to stop this from appearing would work, at the moment it's quite annoying constantly popping up :) I didn't see a settings menu in OKCAgent.

PS I use the version from the play store, 0.2.3. It's really really great to finally be able to use my SSH keys in Termux, and to be able to use them with SSH forwarding as well (which never worked in TermBot).

SSH login problems with nistp521

It looks like there is some problem with ssh agent when I try to login with nistp521 auth key on my Nitrokey Storage
I am able to login with Android password store that directly uses OpenKeychain, but logging with okc-ssh-agent fails without any errors:

debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: Victor Bessonov <[email protected]> (64f9753035dcc389) ECDSA SHA256:0IEyhhSNBrxGd99iZs3CVWYn6ns/p+BfAITSq/cAKq8 agent
debug1: Server accepts key: Victor Bessonov <[email protected]> (64f9753035dcc389) ECDSA SHA256:0IEyhhSNBrxGd99iZs3CVWYn6ns/p+BfAITSq/cAKq8 agent
debug1: Authentications that can continue: publickey

It presents the key, tries to use it, authorization OpenKeychain popup finishes without any errors, but the server won't accept the result (tried on GitHub and my own server)
The Nitrokey token contains three keys:

  • Brainpool 384 for encrypt and sign
  • Nist p521 for auth

How to use okc-ssh-agent?

I'm having trouble understanding the docs. I have installed openkeychain, termux, and okcagent (app and termux package). I have selected my gpg and ssh key inside the okcagent app.

This command gives an error "No such file or directory".
okc-ssh-agent $PREFIX/tmp/socket &

If I just run okc-ssh-agent and ssh user@host, it asks me for password instead.

java.lang.RuntimeException in MainActivity

Error in OkcAgent

java.lang.RuntimeException in MainActivity
Unable to resume activity {org.ddosolitary.okcagent/org.ddosolitary.okcagent.MainActivity}: java.lang.SecurityException: Not allowed to bind to service Intent { act=org.openintents.ssh.authentication.ISshAuthenticationService pkg=org.sufficientlysecure.keychain }

View on Bugsnag

Stacktrace

ActivityThread.java:4343 - android.app.ActivityThread.performResumeActivity

View full stacktrace

Created automatically via Bugsnag

bintray.com -> github

What is the reason to use bintray for binaries while they can be uploaded directly into github releases?

Notification hangs "Serving SSH agent requests..."

app version: 0.2.0
download source: F-Droid

When I try to SSH, I get the OkcAgent notification with "SSH Agent Service - Serving SSH agent requests...", but it just hangs in there indefinitely and OpenKeychain never shows up.
I'm not sure where to find more logs to troubleshoot this.

I am using GrapheneOS (Android 10), in case that's relevant

Don't echo agent pid

I start the okc-ssh-agent with a script similar to Starting okc-ssh-agent automatically. When the file in tmp gets sourced it writes a line about the agent PID. I don't need this line and find it slightly annoying.
Is there a way to get rid of it? eg a switch for the commandline...

Thanks

Crash when selecting SSH keys

The app appears to crash when I try to select an SSH key.
When I select my SSH key and press the select button it closes immediately and when I reopen the app it does not have the key selected.

Git doesn't use the agent

I have an ssh key added to the OKC-agent and I am able to use ssh to login to the machine/user combo directly but git fails to use the agent when trying to perform operations. I just get the "Permission denied (publickey)" message when I try.

okc-ssh-agent - please specify path of the agent socket

Greetings, thank you for making such an awesome tool. I am a long time linux user, but I have no idea what I should be doing. If I run okc-ssh-agent after installing the android app and the okc packages, I get this error and nothing else.

EDIT: I may have found an example of how to do this. I will report back the results

okc-gpg and git

I'm trying to use okc-gpg for signing of commits with git. SSH works as expected. But gpg troubles me. it does not seem to sign the commit. I set git config --global gpg.program okc-gpg. Then I used git commit -s -m "signing test 1" okc-agent does not ask to unlock my key. git has this in its log 71c8a (HEAD -> signing, origin/signing) Author: baitmooth <[email protected]> Date: Sun Jul 11 14:46:59 2021 +0200 signing test 1 Signed-off-by: baitmooth <[email protected]>.

Is it even possible to use okc-gpg this way? And if so, how to do it right?
Thanks so far for this nice app.

okc-gpg usage

How okc-gpg should be used? Is it just gpg replacement with openkeychain support?

I just got OkcAgent has stopped when launch okc-gpg in termux shell.

no keys were found on gpg encrypt

For each encryption openkeychain asks to select a key, with the following message:

Please review the list of recipients!

No keys were found for these email addresses:
<ID form .password-store/.gpg-id goes here>

But it allows to select a key and encryption succeeds.

unable to use okc-gpg, only okc-ssh-agent works?

this was an issue for me a while back on android 6 too, and on android 8, now on android 11, always same no matter if it's the stable, or dev versions (of either the app or the CLI):

~/tmp $ ./okc-gpg --help
Nov 27 03:42:24.111 ERRO java.lang.Exception: No supported action is found, remote_port: 40942
Nov 27 03:42:24.112 ERRO StringError("an error has occurred in the app"), remote_port: 40942

the remote_port changes, of course...
meanwhile okc-ssh-agent works fine...

Can not add gpg or ssh key, App

When I press either of the buttons nothing happens. I can't import any keys.
Trying to use okc-gpg like shown in the example "crashes" (closes?) the app and I get an error message in termux when I tap on the pinned notification.

reorder ssh keys

What about to add a way to reored ssh keys?
I solved my problem by adding keys in the correct order, but it'd be nice to be able to drag them.

Something like this for example:
image

ExampleException in home#example

Test error in Example.com

ExampleException in home#example
Something really bad happened

View on Bugsnag

Stacktrace

app/controllers/home_controller.rb:123 - example
app/controllers/other_controller.rb:12 - broken
lib/important/magic.rb:4 - load_something

View full stacktrace

Created by DDoSolitary via Bugsnag

Simplify Demonstration using eval

I just found out that it also works to just execute
eval $(okc-ssh-agent)
and then use
ssh ...

Maybe the presentation video could be changed to use this, as it seems easier to use.

Thank you for this great tool!

Pre-alpha release

This is a pre-alpha release for those who want to test.

  1. Install OpenKeychain and import your authentication key in it.
  2. Download binaries.zip and extract it.
  3. Install app-debug.apk.
  4. Open the OkcAgent app, select a crypto provider and an authentication key.
  5. Copy okc-ssh-agent into your Termux's home directory and run chmod +x okc-ssh-agent
  6. Run ./okc-ssh-agent <socket-path>, replace <socket-path> with whatever a valid path for a Unix domain socket.
  7. Open another session in Termux and run export SSH_AUTH_SOCK=<socket-path>.
  8. Try using ssh in the new session.

Bridge the other way around ?

How about making it work the other way around? Use termux+GnuPG to provide functionality Openkeychain functionality for k9-mail and other apps that need it.

There are a couple of reasons why someone might want to do that:

  • anyone who has one or more desktop computers with GPG setup and in use will find it much easier to simply copy his/her .gnupg to termux where it will work instantly than setup openkeychain and import keys there.
  • Openkeychain is in "maintenance mode"
  • some people are more familiar with the GP cli and configuration or will prefer it for other reasons

A dialog appears on-screen rotation

When I perform these sequences of events, a dialog appears after on-screen rotation:

  1. Go to the Main activity
  2. Tap out of the message box
  3. A similar screen to this will appear:

Before rotation:

  1. Force the pause from the activity and then return to the activity (double rotation). Note that a fragment appears. Note: the pause from activity can be performed in several ways. We suggest using a double rotation (starts in portrait, goes to landscape, and back to portrait) with this function previously enabled in the smartphone.

The expected behavior is the return to the previous state without the fragment of the message.

However, a message appears.

After rotation:

Device:

  • Device: Moto G30 with OS: Android 11
  • Version: 0.2.3
  • Device language: English

remote gpg signing capabilities

First off, I wanted to thank you for okc-agent and the help you have given in the past. I appreciate it and use it quite often.

I now find myself in a situation where I need to do do remote git commits with GPG signing. That of course works fine from Mac OS -> Linux, but for Android -> Linux you are definitely the only game in town. Is this even a possibility at the moment? Under normal circumstances, it requires gpg-agent on the remote system to be connected via a forwarded socket through SSH to the local gpg-agent. I am not even sure where to begin with okc-gpg at the moment

Crashes after tapping the notification for authorization.

Command line utilities version: r23 from bintray
APP version: r74 from bintray.
logcat:

05-30 19:36:25.234  1131  1883 I ActivityTaskManager: START u0 {act=org.ddosolitary.okcagent.action.RUN_PENDING_INTENT flg=0x10000000 cmp=org.ddosolitary.okcagent/.IntentRunnerActivity (has extras)} from uid 10377
05-30 19:36:25.258  1131  1131 V SettingsProvider: Notifying for 0: content://settings/secure/reminder_exp_learning_time_elapsed
05-30 19:36:25.211  2142  2142 W HeadsUpManagerPhone: onHeadsUpPinnedModeChanged
05-30 19:36:25.257 12235 12235 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@631e8ac
05-30 19:36:25.348 12235 12235 D AndroidRuntime: Shutting down VM
05-30 19:36:25.349 12235 12235 E AndroidRuntime: FATAL EXCEPTION: main
05-30 19:36:25.349 12235 12235 E AndroidRuntime: Process: org.ddosolitary.okcagent, PID: 12235
05-30 19:36:25.349 12235 12235 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.ddosolitary.okcagent/org.ddosolitary.okcagent.IntentRunnerActivity}: android.content.IntentSender$SendIntentException
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:107)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:214)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7356)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
05-30 19:36:25.349 12235 12235 E AndroidRuntime: Caused by: android.content.IntentSender$SendIntentException
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.Activity.startIntentSenderForResultInner(Activity.java:5471)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.Activity.startIntentSenderForResult(Activity.java:5439)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at androidx.fragment.app.FragmentActivity.startIntentSenderForResult(FragmentActivity.java:705)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.Activity.startIntentSenderForResult(Activity.java:5406)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at androidx.fragment.app.FragmentActivity.startIntentSenderForResult(FragmentActivity.java:690)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at org.ddosolitary.okcagent.IntentRunnerActivity.processIntent(IntentRunnerActivity.kt:30)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at org.ddosolitary.okcagent.IntentRunnerActivity.onCreate(IntentRunnerActivity.kt:46)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7824)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7813)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
05-30 19:36:25.349 12235 12235 E AndroidRuntime:        ... 11 more
05-30 19:36:25.385 12235 12265 I FA      : Tag Manager is not found and thus will not be used
05-30 19:36:25.395  1131 12308 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
05-30 19:36:25.395  1131  2622 W ActivityManager: Process org.ddosolitary.okcagent has crashed too many times: killing!
05-30 19:36:25.395  1131  2622 W ActivityTaskManager:   Force finishing activity org.ddosolitary.okcagent/.IntentRunnerActivity
05-30 19:36:25.401 12235 12291 D NetworkSecurityConfig: No Network Security Config specified, using platform default
05-30 19:36:25.403  1131  2622 I ActivityManager: Killing 12235:org.ddosolitary.okcagent/u0a377 (adj 0): crash
05-30 19:36:25.405  1131  2622 W ActivityManager: Scheduling restart of crashed service org.ddosolitary.okcagent/.ssh.SshAgentService in 1000ms

java.lang.RuntimeException in IntentRunnerActivity

Error in OkcAgent

java.lang.RuntimeException in IntentRunnerActivity
Failure delivering result ResultInfo{who=null, request=0, result=-1, data=Intent { act=org.openintents.ssh.action.SIGN (has extras) }} to activity {org.ddosolitary.okcagent/org.ddosolitary.okcagent.IntentRunnerActivity}: java.lang.NullPointerException

View on Bugsnag

Stacktrace

ActivityThread.java:4633 - android.app.ActivityThread.deliverResults

View full stacktrace

Created automatically via Bugsnag

Exception using okc-ssh-agent with ed25519 authentication subkey

Just wanted to start with saying thanks for building this, it's really great I can use my hardware keys with my phone.

Setup

I'm having an issue using okc-ssh-agent with an ed25519 key with Termux. The key is an authentication only key stored as a subkey on a YubiKey. I have tested okc-ssh-agent with an RSA-4096 ssh authentication key and had no issues, but I wanted to rotate the key for an ed25519 as I prefer them for usability reasons for ssh keys.

Error Message

In Termux when I try to ssh I get the following error:

$ ssh user@host_ip
sign_and_send_pubkey: signing failed for ED25519 "Full Name <[email protected]> (0xdeadbeef)" from agent: agent refused operation

At the same time there is an Exception shown in the notification bar under OkcAgent:

Exception in executeApi call : Attempt to invoke virtual method 'long org.bouncycastle.openpgp.PGPPrivateKey.getKeyID()' on a null object reference

Steps to reproduce

  1. Setup YubiKey in OpenKeychain with ED25519 Authentication Subkey.
  2. Add ED25519 key in OkcAgent.
  3. Install Termux + okc-agents package
  4. Start okc-ssh-agent and export SSH_AUTH_SOCKET
  5. SSH into host
  6. Error thrown

FATAL EXCEPTION: main cancelling or entering wrong password for OpenKeychain

07-27 00:17:34.072 30468 30468 D AndroidRuntime: Shutting down VM
07-27 00:17:34.075 30468 30468 E AndroidRuntime: FATAL EXCEPTION: main
07-27 00:17:34.075 30468 30468 E AndroidRuntime: Process: org.ddosolitary.okcagent, PID: 30468
07-27 00:17:34.075 30468 30468 E AndroidRuntime: java.lang.RuntimeException: Unable to start service org.ddosolitary.okcagent.ssh.SshAgentService@5d565f3 with Intent { act=org.ddosolitary.okcagent.action.RESULT_CALLBACK cmp=org.ddosolitary.okcagent/.ssh.SshAgentService (has extras) }: java.lang.NullPointerException
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3724)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at android.app.ActivityThread.access$1600(ActivityThread.java:200)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:193)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6718)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: Caused by: java.lang.NullPointerException
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at java.util.Objects.requireNonNull(Objects.java:203)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at java.util.concurrent.ArrayBlockingQueue.put(ArrayBlockingQueue.java:332)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at org.ddosolitary.okcagent.AgentService.onStartCommand(AgentService.kt:117)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3705)
07-27 00:17:34.075 30468 30468 E AndroidRuntime: 	... 8 more
07-27 00:17:34.098  2628  2714 W libprocessgroup: kill(-24721, 9) failed: No such process
07-27 00:17:34.113  2160  2160 I Zygote  : Process 24721 exited due to signal (9)
07-27 00:17:34.137  2628  2714 W libprocessgroup: kill(-24721, 9) failed: No such process
07-27 00:17:34.137  2628  2714 I libprocessgroup: Successfully killed process cgroup uid 10247 pid 24721 in 176ms

Okc agent hanging

Previously, this was working. Now when I run it it hangs and never returns. What can I do to give you troubleshooting information?

okc-ssh-agent $PREFIX/tmp/socket

This the command I am currently running.

I installed the paid app. I went to check just now if it has any updates and Google play was asking me to enable the app. Enabling, opening, and then running the command did not change anything.

F-Droid

Please add it to F-Droid.

java.lang.RuntimeException in MainActivity

Error in OkcAgent

java.lang.RuntimeException in MainActivity
Unable to resume activity {org.ddosolitary.okcagent/org.ddosolitary.okcagent.MainActivity}: java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

View on Bugsnag

Stacktrace

ActivityThread.java:3616 - android.app.ActivityThread.performResumeActivity

View full stacktrace

Created automatically via Bugsnag

FATAL EXCEPTION: main on two requests

Steps to reproduce:

  1. Start two ssh clients
  2. Wait for two notifications to be shown
  3. Tap the first one
FATAL EXCEPTION: main
Process: org.ddosolitary.okcagent, PID: 17710
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.ddosolitary.okcagent/org.ddosolitary.okcagent.IntentRunnerActivity}: android.content.IntentSender$SendIntentException
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)
Caused by: android.content.IntentSender$SendIntentException
        at android.app.Activity.startIntentSenderForResultInner(Activity.java:5471)
        at android.app.Activity.startIntentSenderForResult(Activity.java:5439)
        at androidx.fragment.app.FragmentActivity.startIntentSenderForResult(FragmentActivity.java:704)
        at android.app.Activity.startIntentSenderForResult(Activity.java:5406)
        at androidx.fragment.app.FragmentActivity.startIntentSenderForResult(FragmentActivity.java:689)
        at org.ddosolitary.okcagent.IntentRunnerActivity.processIntent(IntentRunnerActivity.kt:30)
        at org.ddosolitary.okcagent.IntentRunnerActivity.onCreate(IntentRunnerActivity.kt:46)
        at android.app.Activity.performCreate(Activity.java:7824)
        at android.app.Activity.performCreate(Activity.java:7813)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
        ... 11 more

tapping the notification for authorization

There was a change in behaviour during the development: it was required or not to tap notification to make an OpenKeychain request.

  1. I believe this is an excessive step.
  2. It's hard to understand that new notification was thrown and an active user action is required.

If there are some reasons for this behaviour it should be configurable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.