Skip to content
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

Stuck at "creating working directory" #483

Closed
4 tasks done
Bluscream opened this issue Nov 5, 2022 · 39 comments · Fixed by #1114
Closed
4 tasks done

Stuck at "creating working directory" #483

Bluscream opened this issue Nov 5, 2022 · 39 comments · Fixed by #1114
Labels
Bug report Something isn't working

Comments

@Bluscream
Copy link

Bluscream commented Nov 5, 2022

Type

Error while running the manager

Bug description

Screenshot_2022-11-05-13-09-34-800

Steps to reproduce

Open vanced manager
Select youtube and any patch
Wait

Android version

Idk?

Manager version

Version 0.0.39 (39)

Target package name

youtube stock

Target package version.

17.43.36

Installation type

Root

Patches selected.

First one

Device logs (exported using Manager settings).

No idea

Installer logs (exported using Installer menu option) [unneeded if issue is not during patching].

No response

Screenshots or videos

No response

Solution

No response

Additional context

No response

Acknowledgements

  • I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • I have written a short but informative title.
  • I filled out all of the requested information in this issue properly.
  • The issue is related solely to the ReVanced Manager
@Bluscream Bluscream added the Bug report Something isn't working label Nov 5, 2022
@vibbow

This comment was marked as spam.

@AtallahKris

This comment was marked as spam.

@Mygod
Copy link

Mygod commented Jan 25, 2023

Clearing app data fixed it for me.

@trmdi
Copy link

trmdi commented Jan 28, 2023

Clearing app data fixed it for me.

But it clears the Cert key too, that sucks.
A possible workaround: #563 (comment)
Though I can't test it now because I'm being hit by another bug: ReVanced/revanced-patches#1552

@oSumAtrIX
Copy link
Member

Did you exit the app while it was patching?

@trmdi
Copy link

trmdi commented Jan 29, 2023

Did you exit the app while it was patching?

Can't reproduce in this way.

@oSumAtrIX
Copy link
Member

Not sure what you are saying. Please explain.

@trmdi
Copy link

trmdi commented Jan 29, 2023

Not sure what you are saying. Please explain.

I mean I tried to exit the app while patching as you said to reproduce this bug but I can't.

@oSumAtrIX
Copy link
Member

I asked wether you exited the app; I didn't say you should.

@trmdi
Copy link

trmdi commented Jan 29, 2023

I asked wether you exited the app

No, I didn't.

@oSumAtrIX
Copy link
Member

Please attach a complete recording of the following steps to understand your issue better:

  1. Open and close ReVanced Manager
  2. Review the settings of ReVanced Manager
  3. Patch the app

@terrytw
Copy link

terrytw commented Feb 12, 2023

I had the exact same issue. Out of desperation, I turned off Adguard and tried again, and it works!

So when stuck at creating work directory, it could be network issues. Try looking into that direction if you have the same problem.

@ILoveOpenSourceApplications

The manager version mentioned in this issue is very old. But the bug is still existing till date? Are any of the solutions mentioned above are of help?

@terrytw
Copy link

terrytw commented Feb 13, 2023

The manager version mentioned in this issue is very old. But the bug is still existing till date? Are any of the solutions mentioned above are of help?

Yes it still exists in the latest version, and I was able to fix it by turning off my VPN based adblocker(adguard).

@CnC-Robert
Copy link
Member

The manager version mentioned in this issue is very old. But the bug is still existing till date? Are any of the solutions mentioned above are of help?

One workaround is reinstalling the app

@ILoveOpenSourceApplications
Copy link

ILoveOpenSourceApplications commented Feb 13, 2023

Yes it still exists in the latest version, and I was able to fix it by turning off my VPN based adblocker(adguard).

Wouldn't that make it an issue of adguard and not the manager?

@ILoveOpenSourceApplications

One workaround is reinstalling the app

Every time you're patching an app?

@CnC-Robert
Copy link
Member

Every time you're patching an app?

Every time this issue occurs

@ILoveOpenSourceApplications

Every time this issue occurs

And how often does that happen?

@CnC-Robert
Copy link
Member

And how often does that happen?

i dont know

@trmdi
Copy link

trmdi commented Feb 14, 2023

I can't reproduce it in recent releases.

@terrytw
Copy link

terrytw commented Feb 14, 2023

Yes it still exists in the latest version, and I was able to fix it by turning off my VPN based adblocker(adguard).

Wouldn't that make it an issue of adguard and not the manager?

Yes and No.
The issue with manager is that:

  1. It is not correctly communicating with the user. When it is stuck at "creating working directory", most normal user would not know what is happening, some advanced user would think it might be a permission issue, but as someone in the XDA forum post pointed out, the manager uses Android/data/*** directory which should not cause any permission issue. Then we as user are out of wit. But in reality the manager is downloading or connecting to the internet, when it shows "creating working directory". If it shows "downloading" or "connecting", then users would go and see if there is any problem with their connection.
  2. Since the manager is meant to be a user friendly GUI, I think it does not make any sense to have the progress hang forever unless the app itself crushed. In this case, the app is working, it is just unable to get the resources it needs to progress to the next step, and it is stuck there forever. A sensible thing to do is at least set a timeout, and maybe run a simple diagnostic and tell the user what to do.

There are multiple possibilities that could cause this problem, mine is just one of them. It happens in the latest version, and clearing data/cache or reinstalling app did not fix it for me.

@ILoveOpenSourceApplications

There are multiple possibilities that could cause this problem, mine is just one of them. It happens in the latest version, and clearing data/cache or reinstalling app did not fix it for me.

Now that you know what caused issue on your side implies that this issue is clearly solved. Not everyone is having the same issue and if you've tried opening the app without internet at some point you'll know that the app requires internet to function, atleast that's how things are for now. If you want to apply what you said in the first two points that's a different case and would be a feature request and not a bug.

@ILoveOpenSourceApplications

@oSumAtrIX or @Ushie, this bug report is no longer related to manager and can be closed right?

@oSumAtrIX
Copy link
Member

Are you sure this issue is solved?

@trmdi
Copy link

trmdi commented Feb 14, 2023

Maybe the manager should stop when the connection is lost?

@oSumAtrIX
Copy link
Member

The app should not require any connection to begin with.

@trmdi
Copy link

trmdi commented Feb 14, 2023

The app should not require any connection to begin with.

Is it correct? It definitely requires internet to download patches.

@oSumAtrIX
Copy link
Member

That shouldn't be a requirement. Choosing sources locally should be always available.

@trmdi
Copy link

trmdi commented Feb 14, 2023

Ah yes, just checked again. Once the patch has been downloaded completely it could work without internet.
So there still should be a check when patch is not available, I guess.

@ILoveOpenSourceApplications

Are you sure this issue is solved?

The issue isn't related to manager as for the OP it was caused by adguard.

@terrytw
Copy link

terrytw commented Feb 14, 2023

I am not the OP. And I think displaying wrong/misleading information is a bug, not a feature request.

@oSumAtrIX
Copy link
Member

I am not sure what you mean.

@trmdi
Copy link

trmdi commented Feb 14, 2023

Are you sure this issue is solved?

The issue isn't related to manager as for the OP it was caused by adguard.

Adguard causes the connection corrupted but Revanced Manager need to handle the case when it can't get patches.

@Bluscream
Copy link
Author

Bluscream commented Feb 14, 2023

I agree with @terrytw. Yes it's not strictly a bug caused by Revanced in that case, but it's still a bug that effects Revanced and should therefor atleast be handled approriatly (no need to workaround, just show a normal HTTP/TCP error and cancel patching), especially since AG is probably not; or atleast won't be the only app causing this. And before we need to scramble our minds to find out whats wrong, just clearly indicate it's a network issue so we can report in the appropriate places.

Ideally one would just make a wrapper method like

send_request(url, ...) {
   var err, response = original_send_request_method(...);
   if (err =! null) {
       if (console.exists) {
           console.log(err);
       } else {
           show_popup(err);
       }
   }
   return response;
}

and use that where ever possible.

@terrytw
Copy link

terrytw commented Feb 15, 2023

AG is probably not; or atleast won't be the only app causing this

Indeed, it may not even necessarily be an app, it could be a custom rom, an internet censorship, etc., anyway, user should be notified of the current situation.

@Lggggggg
Copy link

I had the exact same issue. Out of desperation, I turned off Adguard and tried again, and it works!

So when stuck at creating work directory, it could be network issues. Try looking into that direction if you have the same problem.

Thank you, it works!

@ILoveOpenSourceApplications

Can this considered as complete with the merge of ReVanced/revanced-patches#1114?

@Ushie Ushie closed this as completed Oct 20, 2023
@Ushie
Copy link
Member

Ushie commented Oct 20, 2023

If the issue still happens in the latest version of ReVanced Manager, open a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.