tweaselORG / appstraction

An abstraction layer for common instrumentation functions (e.g. installing and starting apps, setting preferences, etc.) on Android and iOS.
MIT License
6 stars 1 forks source link

Starting WireGuard sometimes fails #60

Open baltpeter opened 1 year ago

baltpeter commented 1 year ago

Error:

Error: Failed to automatically configure the WireGuard app. Try again or manually enable "Allow remote control apps" under "Advanced" in the app's settings.
    at Object.ensureDevice (/home/benni/coding/JS/tweasel/appstraction/dist/src/android.ts:302:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at <anonymous> (/home/benni/coding/JS/tweasel/cyanoacrylate/src/test.tmp.ts:25:5) {
  [cause]: Error: Command failed with exit code 1: adb shell stat -c %U /data/data/com.wireguard.android
  error: closed
      at makeError (file:///home/benni/coding/JS/tweasel/appstraction/node_modules/execa/lib/error.js:59:11)
      at handlePromise (file:///home/benni/coding/JS/tweasel/appstraction/node_modules/execa/index.js:119:26)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at Object.ensureDevice (/home/benni/coding/JS/tweasel/appstraction/dist/src/android.ts:275:49)
      at <anonymous> (/home/benni/coding/JS/tweasel/cyanoacrylate/src/test.tmp.ts:25:5) {
    shortMessage: 'Command failed with exit code 1: adb shell stat -c %U /data/data/com.wireguard.android',
    command: 'adb shell stat -c %U /data/data/com.wireguard.android',
    escapedCommand: 'adb shell stat -c "%U" "/data/data/com.wireguard.android"',
    exitCode: 1,
    signal: undefined,
    signalDescription: undefined,
    stdout: '',
    stderr: 'error: closed',
    failed: true,
    timedOut: false,
    isCanceled: false,
    killed: false
  }
}
zner0L commented 1 year ago

I have to say that I have not ever seen this bug. Also, error: closed is related to the adb connection somehow. I saw this kind of error (though without any connection to Wireguard) while I still had a broken adb setup. Since this is an old bug: When was the last time you saw this?

baltpeter commented 1 year ago

I think I've seen this bug again after that, though I can't remember when. Might have been a while and it's possible it's been fixed by something else. shrug

Probably doesn't need any action right now (until someone sees it again). You can decide whether to close or leave open.

zner0L commented 1 year ago

I have, in fact, just seen the bug again. It occured when I was testing cyanoacrylate with an old version of appstraction without rooted debugging enabled.

zner0L commented 7 months ago

I really don’t knwo how to check whether this still is an issue. Do you think I should do a probabilistic analysis?

baltpeter commented 7 months ago

Well, in your last comment, you said that you had only observed the problem with an old version (unfortunately with specifying which one).

I'd say we'll leave this issue open in case we observe the problem again on the current version, but don't do anything in the meantime. I'd say it's reasonably likely that this has been "accidentally" fixed in the last year—I don't remember running into the issue for quite a while.