Closed Capoouo closed 2 days ago
I've pushed a potential fix for this, but for this specific issue, I’m leaning more towards a timeout problem that I probably haven’t handled correctly. Do let me know if this fixes your issue!
HI! Just now, ZZZ had a new code. This appeared after the new update, but there was no message on Discord, and it didn't redeem the code for me
hmm, im not sure exactly what is causing this, but so far all my code redemption work fine so far, but ill try to think of something (the reason for that redemption error is because you can't redeem this code from web)
Emmm, I just deleted the code from the cache and restarted Docker, and it redeemed the code for me as well. Weird
Just now, StarRail had a new code, LINGSHAQUIZ. It found the code, but didn’t redeem it for me. Currently, it seems that the code is being correctly detected, but I’m not sure what is causing the issue that prevents it from being redeemed
there's a new update that i pushed last night and forgot to tell you here, did you use it?
there's a new update that i pushed last night and forgot to tell you here, did you use it?
Ah... I didn’t notice that there was another update. I only updated 18 hours ago. I’ll redeploy now, sorry!
the new update was great! Thanks for the hard work @torikushiii
As I reported before, today there is a new code: EPICGENSHIN2024, but it wasn't redeemed for me, nor did any error messages related to the redemption appear. There are also no messages on Discord
for me it redeemed fine so far.
go to your index.js which is this one https://github.com/torikushiii/hoyolab-auto/blob/main/index.js
and comment out or remove this piece of code and let it run until there's new code to see if there's any error
I'm not sure if this is related to the issue, but just now, my Docker threw an error message and then automatically restarted the container. After that, it found a new code: GENSHIN51TT and successfully redeemed it for me
2024-10-05 18:30:00 hoyolab-auto | node:internal/process/promises:391
2024-10-05 18:30:00 hoyolab-auto | triggerUncaughtException(err, true / fromPromise /);
2024-10-05 18:30:00 hoyolab-auto | ^
2024-10-05 18:30:00 hoyolab-auto |
2024-10-05 18:30:00 hoyolab-auto | RequestError: Stream closed with error code NGHTTP2_REFUSED_STREAM
2024-10-05 18:30:00 hoyolab-auto | at ClientRequest.
ah, so it's indeed network error related.
this can be caused by underlying network connectivity or if your Docker container is resource-constrained (for example, if it has limited CPU or memory allocated)
Emm, I have set resource limits for Docker, but I configured it to use 2 cores and 4GB of memory
Maybe I should delete the WSLCONFIG and let it use the default settings instead?
you can try to see if its help with the current issue, but im pretty sure 2 cores with 4GB memory is more than enough
Just now, a new error message appeared again, and it automatically started Node once more, like in the picture
2024-10-05 21:00:00 hoyolab-auto | /app/hoyolab-modules/zenless/notes.js:96 2024-10-05 21:00:00 hoyolab-auto | bounty: data.bounty_commission.num, 2024-10-05 21:00:00 hoyolab-auto | ^ 2024-10-05 21:00:00 hoyolab-auto | 2024-10-05 21:00:00 hoyolab-auto | TypeError: Cannot read properties of null (reading 'num') 2024-10-05 21:00:00 hoyolab-auto | at RealtimeNotes.notes (/app/hoyolab-modules/zenless/notes.js:96:35) 2024-10-05 21:00:00 hoyolab-auto | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-10-05 21:00:00 hoyolab-auto | at async ZenlessZoneZero.notes (/app/hoyolab-modules/zenless/index.js:166:10) 2024-10-05 21:00:00 hoyolab-auto | at async Object.callback (/app/crons/howl-scratch-card/index.js:5:16) 2024-10-05 21:00:00 hoyolab-auto | at async RegionalTaskManager.executeTasks (/app/object/regional-task-manager.js:25:7) 2024-10-05 21:00:00 hoyolab-auto | at async Object.howlScratchCard [as code] (/app/crons/howl-scratch-card/index.js:63:3)
should be fixed on latest commit
I'll wait for the next code redemption to see if there are any errors
Today, there is a new code: LA5E77CLZX5V, but as I previously reported, it showed the following:
2024-10-06 06:27:00 hoyolab-auto | 2024-10-06 06:27:00
I'm still leaning towards connection timed out issues, but if the next code redemption has the same result, I'll try adding internal retries in case the request doesn't "respond".
Today, there is another new code that wasn't redeemed for me, and there are no error messages:
2024-10-08 09:55:00 hoyolab-auto | 2024-10-08 09:55:00
I've pushed new commit to change on how the redemption work, i don't know if this will help because i still didn't know how to replicate this problem yet.
Thank you for your hard work I hope this latest commit works
Emm, starting just now, this message keeps appearing:
2024-10-10 21:58:00 hoyolab-auto | 2024-10-10 21:58:00
Yes that error can be ignored.
The recent check-in for Zenless Zone Zero didn't work, and the control panel shows the following:
2024-10-11 00:31:13
Is this an issue with my network? But the other games successfully checked in
no, they changed the check-in url, i will deploy a fix later
This morning, there were several codes, but only UB4XPUJS77QD was redeemed
2024-10-11 05:23:00 hoyolab-auto | 2024-10-11 05:23:00
The remaining codes WTXV36M1J6CO, DEOB21CK9Y6N, SBUEMJB449D9, and HVDLLZ29Y26W were not redeemed, and there were no error messages
(My index.js lines 117–126 are not marked. Could this be the reason why no error messages are appearing?)
You could try commenting that line out again to see if it prints any messages, the reason it was there because there's already a custom error handler.
But next time I'll try to put debug log at that line in the future.
After marking lines 117–126 in index.js, I'll wait for today's StarRail code. Do I need to change my config to debug mode?
No need
Just now there was a new code, and the same issue occurred
can you try pulling the latest commit and let me know, I've added few logs to it
I just pulled the new commit, but after deleting three redemption codes earlier
2024-10-11 20:10:01 hoyolab-auto | 2024-10-11 20:10:01
index.js 117~126 comment
Perhaps I should wait for the next code to get a more accurate result?
hold on, i think i can replicate this issue now
of course when I encountered this issue it resolve itself for some reason...
try pulling the latest commit and change the loglevel to debug, loglevel: "debug"
at config this time, don't forget to remove the last 3 codes if any of the account haven't redeemed any
All of my accounts have already redeemed these codes, so I might need to wait for the next code?
that's fine, just remember to change loglevel to debug if you encountered this again to see if there's any message at all
then I think I need to set loglevel to debug until the next redemption code?
You can either set the log level to debug until the next new code release or set the log level to debug after there's new code and it didn't redeem the code if you didn't want your log to get spammed by debug messages.
However, the chances of the issue happening after deletion and restart are quite low—only twice so far. I think I'll set loglevel: debug for the next code. Although there will be a lot of messages, LOL
edit: Alright, I think I'll stick with info level. I just checked the logs, and there are too many messages, so it seems difficult to find whether there's a new code, LOL.
Its work now but theres 2 code every 5 sec (idk you can do this or not)
None of the new Star Rail codes were redeemed, as each of the codes had NEW added to the end of the code.
"Star Rail - New codes found: RAPPANINJADICTNEW, MISTERRATIONEW, EB3KUYQW833PNEW"
those 3 codes has expired hours ago, so there's no notification will be send.
those 3 codes has expired hours ago, so there's no notification will be send.
It seems like you misunderstood its meaning. The correct codes are RAPPANINJADICT, MISTERRATIO, EB3KUYQW833P. However, the fetched codes are RAPPANINJADICTNEW, MISTERRATIONEW, EB3KUYQW833PNEW, which leads to the redemption failure
oh yeah...
the API returns an invalid codes 🙃
sorry for the confusion earlier, talked to the guy managed the API and he fixed it, should be all good now 👍
My issue is still happening. I set the config level to "info," then deleted the cache and changed the level to "debug." After restarting Docker, there are no error messages, and the redemption process runs as expected. I think I need to keep waiting for it to occur again when it restarts
btw,I pulled the latest code and commented out lines 121–130 in index.js. Should I be doing this?
yes, it is safe to comment out the lines and keep it running like that.
@torikushiii Today, ZZZ has new codes, but the same situation occurred. After I deleted SGJADSHBF from the cache and changed the config to debug, it still didn't help me redeem. Additionally, here is the message from the debug
https://gist.github.com/Capoouo/843c7a31deaa0e9f4f81aa4b6d38898d
@Capoouo sorry for the late reply. I was working on hoyoverse-api during this whole weekend so this program can use this API instead letting the users scraping the website by themselves.
Now I've rewritten the code redeemer to use the new API and the whole code redeemer function, please update and try again.
Just a quick reminder that the saving to cache method is reworked and old cache need to be deleted.
Hi, I encountered the same issue again. During the Genshin 5.0 code redemption, there were two instances of finding codes, but only one was redeemed. Additionally, today there is a new code for StarRail:
2024-10-01 10:45:00 hoyolab-auto | 2024-10-01 10:45:00 [INFO:StarRailResolver] Found 1 new codes
After discovering that it wasn’t redeemed, I tried deleting the cache and restarting Docker. Then the following message appeared:
2024-10-01 11:30:01 hoyolab-auto | 2024-10-01 11:30:01 [INFO:StarRailResolver]Found 1 new codes
However, there were no messages on Discord, and no errors were indicated in the control panel
edit: I tried deleting the cache and the new code again, and after restarting, the redemption worked normally. Weird