New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action Failed #108
Comments
@daveol , I'm 80% sure this error wouldn't happen with updated version. Any chance to tag a release? @AceCoderLaura , in the meantime, you can use my fork or fork and tag it yourself. No promises to keep my fork up forever though. - name: Setup Android SDK
uses: ViliusSutkus89/setup-android@v2.0.3-rc1 |
@AceCoderLaura , You should be able to use @daveol , Welcome to the project! 😄 |
@ViliusSutkus89 Cheers, I'll test it now and let you know how it goes. |
It seems to run correctly now. Although the ANDROID_SDK_ROOT environment variable doesn't appear to be set. That's probably a separate issue though. |
Oh, it might be due to this new error that must've started appearing after the first successful run.
I'm using self-hosted runners so they're not new machine images each time. That's probably why the destination already exists. |
This is one of the reasons. I'm more concerned about the realization that the path ANDROID_SDK_ROOT is not being set because we errored out 😞 Of course, this could be fixed by properly cleaning up after the extraction, which I haven't done yet 😅 . Could be a one liner, let me see what's possible. |
…dkmanager is moved out.
Try manually removing |
Alrighty, I'll give it a try. |
The |
No idea, to be honest. I've just noticed that tool-cache creates dest = await _createExtractFolder(dest)
if (IS_WINDOWS) {
await extractZipWin(file, dest)
} ... Any chance your runner is borked somehow? |
Hmm, I could try reinstalling the runner. I'll do that and report back. |
I reinstalled the runner but the error persists. |
I made a fork and put an exists check around this line: Line 123 in 0bdb2ca
It's a workaround since it won't replace an outdated copy but it does work now. Might add a proper fix and do a PR if I get the time. |
I was under the impression that the exception was thrown in Line 110 in 0bdb2ca
|
My intuition is telling me that the error in you got was a really similar, but not exactly the same. I'm 80% sure that function findPreinstalledSdkManager() {
const result = {isFound: false, isCorrectVersion: false, exePath: ''}
// exePath is ${ANDROID_SDK_ROOT}/cmdline-tools/3.0/bin/sdkmanager
result.exePath = getSdkManagerPath(CMDLINE_TOOLS_VERSION)
result.isFound = fs.existsSync(result.exePath)
if (result.isFound) {
result.isCorrectVersion = true
return result
}
}
...
const sdkManager = findPreinstalledSdkManager()
if (!sdkManager.isFound) {
...
// desiredLocation is ${ANDROID_SDK_ROOT}/cmdline-tools/3.0
if (fs.existsSync(desiredLocation)) fse.removeSync(desiredLocation)
...
} That leaves us with a 20% chance of folder Also, do you mind if I squash your PR into a single commit? |
It certainly fixes the issue, I was led to the line from the stack trace. Feel free to squash the PR. |
OK, let's see if v2 works now |
v2 works now, cheers 😁 |
cool :) |
I added this action to my workflow but it seems to have failed. Here's the log from the Actions run:
The text was updated successfully, but these errors were encountered: