Sideloader icon indicating copy to clipboard operation
Sideloader copied to clipboard

Unable to connect! This action could not be performed. Please try again. (-22421)

Open maximedrn opened this issue 1 year ago • 8 comments

I've just tried to install an application again, but Sideloader won't connect:

server.developersession INFO 2024-04-06T22:34:24.113 Create a development session for <email>...
server.appleaccount INFO 2024-04-06T22:34:24.113 Connection...
server.appleaccount DEBUG 2024-04-06T22:34:24.113 Retrieve the URL bag...
server.appleaccount DEBUG 2024-04-06T22:34:24.629 URL bag OK.
server.appleaccount DEBUG 2024-04-06T22:34:24.645 Send first authentication request...
server.appleaccount DEBUG 2024-04-06T22:34:24.801 First authentication request OK.
server.appleaccount DEBUG 2024-04-06T22:34:24.894 Second authentication request sent...
server.appleaccount DEBUG 2024-04-06T22:34:25.051 Second request OK.
server.developersession ERROR 2024-04-06T22:34:25.051 Creation of developer session failed: this action could not be performed. Please try again.
cli_frontend ERROR 2024-04-06T22:34:25.051 Unable to connect! This action could not be performed. Please try again. (-22421)

I've tried with two different accounts and the result is the same. I've restarted my computer several times and changed networks but it doesn't work anymore :s

NB: I've reopened an issue because it's not related to the previous thread. Related: https://github.com/Dadoum/Sideloader/issues/10

maximedrn avatar Apr 06 '24 22:04 maximedrn

Apple doesn't trust your computer. This can be due to a lot of things, but if you want to reset that you can go in %AppData%/Sideloader/ and remove device.json and adi.pb. Sideloader will regenerate them, and Apple will see a new computer.

Dadoum avatar Apr 06 '24 22:04 Dadoum

You're right! I had deleted the wrong files (those in the keys/ folder). Thanks for your quick reply :) Now the wireless works well with Sideloader which is great! Now I just need to automate the automatic refresh every 2 or 3 days using a batch script.

By the way, the error "The process can't access the file because it's being used by another process" still occurs in the latest version. The correction in my PR could therefore be a good temporary solution

maximedrn avatar Apr 06 '24 22:04 maximedrn

which file is now being affected in the app bundle?

Dadoum avatar Apr 06 '24 22:04 Dadoum

The exact same file

maximedrn avatar Apr 06 '24 22:04 maximedrn

I should have expected something is wrong when the file is literally called as C:\Users\Maxime\AppData\Local\Temp\ SideStore.ipa\Payload\SideStore.app\Frameworks\AltStoreCore.frameworkAltStoreCore with a missing backslash… needs more investigation…

Dadoum avatar Apr 06 '24 23:04 Dadoum

Do you have a more complete stacktrace? (maybe with Sideloader running with debug logs, to see which parts are colliding on that wrong file path)

Dadoum avatar Apr 06 '24 23:04 Dadoum

This is the only stacktrace:

Full exception: std.file.FileException@std\file.d(885): 
C:\Users\Maxime\AppData\Local\Temp\SideStore.ipa\Payload\SideStore.app\Frameworks\AltStoreCore.framework\AltStoreCore: 
The process cannot access the file because it is being used by another process.

(The last \ has been removed when I pasted the text on Github but was present in the stacktrace)

maximedrn avatar Apr 06 '24 23:04 maximedrn

And I had the same for YT Music for another file

maximedrn avatar Apr 06 '24 23:04 maximedrn