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

Can't make it works #35

Closed
alkozin opened this issue Sep 14, 2016 · 13 comments
Closed

Can't make it works #35

alkozin opened this issue Sep 14, 2016 · 13 comments
Labels

Comments

@alkozin
Copy link

alkozin commented Sep 14, 2016

I succesfully create jar file, then type
java -jar InflatableDonkey.jar aa@aa.aa password

And retreive list of snapshots, then select one and app stucks on
Retrieving snapshot: 93 MB iPhone Anton Fedorov (iOS 9.1) 2016-09-05T09:23:54.092Z

What should I do to fix it? Can you help me?

@horrorho
Copy link
Owner

Hi. If you can try:

java -jar InflatableDonkey.jar appleID password --domains -d

Don't tell me the output. Just let me know if you get a list of domains for each snapshot or if it just gets stuck again.

@horrorho
Copy link
Owner

Also, if you could let me know the Java version you are using.

java -version

@alkozin
Copy link
Author

alkozin commented Sep 15, 2016

Hi.

I successfully received a list of snapshots and "Domains / file count"

java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

Looks like its up to date...

@alkozin
Copy link
Author

alkozin commented Sep 15, 2016

authorizeGet request is repeating infinitely

Edited by horrorho: removed screenshot/ possible sensitive information.

@horrorho
Copy link
Owner

Thank you. I see you guys are professional developers, you'll know more than I do about most things.

Can you confirm that InflatableDonkey works with other backups or does it not work with anything at all?

The download engine is a bit messy and I never finished the replacement. It's certainly possible there are bugs in there. The authorizeGet, chunk retrieval, chunk assembly process is similar to iOS 8.

I've pushed a new build that has an additional logging statement. If you could grab this, navigate to src/main/resources/logback.xml and add in the following switches:

    <logger name="com.github.horrorho.inflatabledonkey.cloud.Donkey" level="trace" additivity="false">
        <appender-ref ref="STDOUT" />
    </logger>

    <logger name="com.github.horrorho.inflatabledonkey.cloud.AuthorizeAssetsClient" level="trace" additivity="false">
        <appender-ref ref="STDOUT" />
    </logger>

You are of course free to fiddle with other logging switches. The program can potentially dump out massive amounts of logging data.

Execute with the following command line switches which will disable concurrency.

java -jar InflatableDonkey.jar appleID password --threads 1 --turbo 1

Just double check the output doesn't have any sensitive information and let me know the result.

Also, you could try downloading a specific domain to see if that works:

java -jar InflatableDonkey.jar appleID password --threads 1 --turbo 1 --domain home

@alkozin
Copy link
Author

alkozin commented Sep 16, 2016

@horrorho Ok, thanks for your help 👍 I need some time for experiments. Will try to do it on Monday.

@horrorho
Copy link
Owner

Thank you for the update.

I had been wondering, noting that you're based in Novosibirsk, that I may have somehow failed to handle non-Latin based characters properly. It's conceivable a malformed request is repeatedly being issued without a breakout clause causing an endless loop. If you have domains/ relative paths with non-Latin characters then this may be an avenue worth exploring.

The other possibility is a failure to handle timestamps properly. This could potentially lead to erroneous invalidation of time limited authorized entities and an endless authorization cycle. InflatableDonkey does prefer to use timestamp references provided by http server authorization responses as opposed to local machine time.

Either way, the logs should assist us and we can always add in additional logging statements if necessary.

@alkozin
Copy link
Author

alkozin commented Sep 20, 2016

I have a big problems with updating to Swift 3 on my project :) Sorry for delay.

Looks like error repeating infinetely:
18:15:54.377 [ForkJoinPool-1-worker-1] DEBUG c.g.h.inflatabledonkey.cloud.Donkey - -- apply() - IllegalStateException:
java.lang.IllegalStateException: container has expired
at com.github.horrorho.inflatabledonkey.chunk.engine.ChunkClient.apply(ChunkClient.java:86)
at com.github.horrorho.inflatabledonkey.cloud.Donkey.fetchContainer(Donkey.java:152)
at com.github.horrorho.inflatabledonkey.cloud.Donkey.processContainer(Donkey.java:136)
at com.github.horrorho.inflatabledonkey.cloud.Donkey.lambda$process$1(Donkey.java:108)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at com.github.horrorho.inflatabledonkey.cloud.Donkey.process(Donkey.java:108)
at com.github.horrorho.inflatabledonkey.cloud.Donkey.apply(Donkey.java:92)
at com.github.horrorho.inflatabledonkey.DownloadAssistant.lambda$null$0(DownloadAssistant.java:92)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:583)
at com.github.horrorho.inflatabledonkey.DownloadAssistant.lambda$execute$1(DownloadAssistant.java:92)
at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
18:15:54.377 [ForkJoinPool-1-worker-1] TRACE c.g.h.inflatabledonkey.cloud.Donkey - << process()
18:15:54.378 [ForkJoinPool-1-worker-1] TRACE c.g.h.i.cloud.AuthorizeAssetsClient - << apply() - assets: 15
18:15:54.378 [ForkJoinPool-1-worker-1] DEBUG c.g.h.i.cloud.AuthorizeAssetsClient - -- fileGroups() - contentBaseUrl: https://p43-content.icloud.com:443 ckAssets: 15

I don't know java, need your help :)

@alkozin
Copy link
Author

alkozin commented Sep 20, 2016

Repeats for one domain and without domain argument.

@horrorho
Copy link
Owner

Thank you. It appears to be a timestamp issue. There is a subtle bug in InflatableDonkey timestamp code but I'm not sure if it accounts for this behaviour.

I'll debug/ tidy up some of the timestamp handling code. I'll do this once I'm back home from work so it may not be done until later this evening/ tomorrow.

@horrorho
Copy link
Owner

I managed to find a few minutes and I've made some changes. If you could grab the latest build, navigate to src/main/resources/logback.xml and add in the following switches:

    <logger name="com.github.horrorho.inflatabledonkey.cloud.Donkey" level="trace" additivity="false">
        <appender-ref ref="STDOUT" />
    </logger>

    <logger name="com.github.horrorho.inflatabledonkey.cloud.AuthorizeAssetsClient" level="trace" additivity="false">
        <appender-ref ref="STDOUT" />
    </logger>

    <logger name="com.github.horrorho.inflatabledonkey.responsehandler.DonkeyResponseHandler" level="trace" additivity="false">
        <appender-ref ref="STDOUT" />
    </logger>

    <logger name="com.github.horrorho.inflatabledonkey.cloud.AuthorizeAssetsResponseHandler" level="trace" additivity="false">
        <appender-ref ref="STDOUT" />
    </logger>

Also, substitute in the new debug logging level for headers:

    <logger name="org.apache.http.headers" level="debug" additivity="false">
        <appender-ref ref="STDOUT" />
    </logger>

Execute with:

java -jar InflatableDonkey.jar appleID password --threads 1 --turbo 1

If the issue still persists I would like to see one cycle of logging output.
I only need to see the response date header/ field value so please edit out the other headers.

07:38:58.772 [ForkJoinPool-1-worker-0] DEBUG org.apache.http.headers - http-outgoing-13 << Date: Tue, 20 Sep 2016 14:38:53 GMT

Also if you would kindly let me know the unix timestamp of your machine using the terminal command:

date +%s

Along with the simultaneous unix timestamp from https://currentmillis.com.

For some reason InflatableDonkey's timestamp handling isn't working as intended on your machine.

@alkozin
Copy link
Author

alkozin commented Sep 21, 2016

You made it!!1!1
Awesome!
Thank you so much 👍

In any case, I attach information.
Perhaps will be useful for future experiments.

10:21:05.862 [ForkJoinPool-1-worker-0] DEBUG org.apache.http.headers - http-outgoing-4 << Date: 
Wed, 21 Sep 2016 03:20:36 GMT
date +%s
1474431734

Write me if you will need any help in iOS development, I have a lot of experience :)

@horrorho
Copy link
Owner

Excellent. Thank you for your help also, otherwise I wouldn't have been able to find/ fix the bug. Also thank you for the offer.

@horrorho horrorho added the bug label Sep 21, 2016
@alkozin alkozin closed this as completed Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants