HearthSim / HSTracker

A deck tracker and deck manager for Hearthstone on macOS
https://hsreplay.net/downloads/
MIT License
1.17k stars 177 forks source link

HSTracker stuck on splash screen #1332

Closed moonfruit closed 10 months ago

moonfruit commented 10 months ago

Describe the bug After upgrading to HSTracker 2.6.1, the splash screen got stuck.

I also tried curl https://hsdecktracker.net/data/arena/version.json and curl https://hsdecktracker.net/data/arena/cardtier.json. They all worked well.

To Reproduce Steps to reproduce the behavior:

  1. Just start HSTracker

Expected behavior HSTracker not stuck.

Screenshots

图片

Version (please complete the following information): 2.6.1

Log file hstracker.log

fmoraes74 commented 10 months ago

I ran 2.6.1 this morning and I don't see an issue. Is it still happening?

moonfruit commented 10 months ago

Yes, It still happens. I just tried it again. I suspect it's something to do with the network, but strangely I have no problem accessing the two jsons directly from hsdecktracker.net.

moonfruit commented 10 months ago

I just noticed that curl in.appcenter.ms gets stuck on my computer. What does this site do? Is there a problem with the service on this site? I've tried to connect through some proxy services and can't get it to work.

fmoraes74 commented 10 months ago

I was looking at your log file and it is getting a 403 out of https://hsreplay.net/api/v1/live_secrets/ which is strange because it works for me. AppCenter is for statistics and bug reports.

Can you run it under the Xcode debugger to see where it is stuck?

moonfruit commented 10 months ago

I was looking at your log file and it is getting a 403 out of hsreplay.net/api/v1/live_secrets which is strange because it works for me.

Yes, I noticed that. But sorry, I don't know how to use Xcode debugger.

fmoraes74 commented 10 months ago

Can you go the Activity Monitor, find HSTracke process when it is stuck, select it and press the i on top of the Activity Monitor next to x. Then press Sample button and share that output.

moonfruit commented 10 months ago

OK, I take a sample: HSTracker Sample.txt

fmoraes74 commented 10 months ago

@moonfruit it seems to be the live secrets endpoint that's causing the problem. I can probably make the code a bit better by not hanging forever but can you test that URL https://hsreplay.net/api/v1/live_secrets/ and see if you get a successful response via curl instead of 403? I will ask the HSReplay team if there are any known issues based on geography.

fmoraes74 commented 10 months ago

I forced a recreate by using https://httpbin.org/status/403 and placed some missing catches in the RemoteConfig.swift code to prevent the hang. It is interesting that the other 3 previous requests actually succeeded. This will be available on the next version with the BG update.

moonfruit commented 10 months ago

Thanks a lot!

fmoraes74 commented 10 months ago

@moonfruit Does it work now with the version 2.6.1? The HSR team said that endpoint had some firewall rules that they removed, so it should work now. Please let me know if that's the case or not. Anyway, next version will at least not have the forever hang due to this type of issue.

moonfruit commented 10 months ago

No, I cannot reproduce this problem. Thanks a lot!