torikushiii / hoyolab-auto

Auto check-in and others for any Hoyoverse games
https://ko-fi.com/torikushiii
GNU Affero General Public License v3.0
110 stars 24 forks source link

code redeem #66

Closed Capoouo closed 6 days ago

Capoouo commented 1 month ago

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

torikushiii commented 1 month 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!

Capoouo commented 1 month ago

image 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

torikushiii commented 1 month ago

image

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)

Capoouo commented 1 month ago

Emmm, I just deleted the code from the cache and restarted Docker, and it redeemed the code for me as well. Weird

image

Capoouo commented 1 month ago

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

torikushiii commented 1 month ago

there's a new update that i pushed last night and forgot to tell you here, did you use it?

Capoouo commented 1 month ago

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!

djdoolky76 commented 1 month ago

the new update was great! Thanks for the hard work @torikushiii

image

Capoouo commented 1 month ago

image

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

torikushiii commented 1 month ago

image

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

https://github.com/torikushiii/hoyolab-auto/blob/476f3476cff92903c1d5a9426585f48919d44ee7/index.js#L117-L126

Capoouo commented 1 month ago

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. (file:///app/node_modules/got/dist/source/core/index.js:670:107) 2024-10-05 18:30:00 hoyolab-auto | at Object.onceWrapper (node:events:634:26) 2024-10-05 18:30:00 hoyolab-auto | at ClientRequest.emit (node:events:531:35) 2024-10-05 18:30:00 hoyolab-auto | at emitErrorNT (node:internal/streams/destroy:169:8) 2024-10-05 18:30:00 hoyolab-auto | at emitErrorCloseNT (node:internal/streams/destroy:128:3) 2024-10-05 18:30:00 hoyolab-auto | at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 2024-10-05 18:30:00 hoyolab-auto | at ClientHttp2Stream._destroy [as destroy] (node:internal/http2/core:2375:13) 2024-10-05 18:30:00 hoyolab-auto | ... 4 lines matching cause stack trace ... 2024-10-05 18:30:00 hoyolab-auto | at Http2Stream.onStreamClose (node:internal/http2/core:562:12) { 2024-10-05 18:30:00 hoyolab-auto | input: undefined, 2024-10-05 18:30:00 hoyolab-auto | code: 'ERR_HTTP2_STREAM_ERROR', 2024-10-05 18:30:00 hoyolab-auto | timings: { 2024-10-05 18:30:00 hoyolab-auto | start: 1728124200207, 2024-10-05 18:30:00 hoyolab-auto | socket: 1728124200207, 2024-10-05 18:30:00 hoyolab-auto | lookup: undefined, 2024-10-05 18:30:00 hoyolab-auto | connect: undefined, 2024-10-05 18:30:00 hoyolab-auto | secureConnect: undefined, 2024-10-05 18:30:00 hoyolab-auto | upload: 1728124200207, 2024-10-05 18:30:00 hoyolab-auto | response: undefined, 2024-10-05 18:30:00 hoyolab-auto | end: undefined, 2024-10-05 18:30:00 hoyolab-auto | error: 1728124200354, 2024-10-05 18:30:00 hoyolab-auto | abort: undefined, 2024-10-05 18:30:00 hoyolab-auto | phases: { 2024-10-05 18:30:00 hoyolab-auto | wait: 0, 2024-10-05 18:30:00 hoyolab-auto | dns: undefined, 2024-10-05 18:30:00 hoyolab-auto | tcp: undefined, 2024-10-05 18:30:00 hoyolab-auto | tls: undefined, 2024-10-05 18:30:00 hoyolab-auto | request: NaN, 2024-10-05 18:30:00 hoyolab-auto | firstByte: undefined, 2024-10-05 18:30:00 hoyolab-auto | download: undefined, 2024-10-05 18:30:00 hoyolab-auto | total: 147 2024-10-05 18:30:00 hoyolab-auto | } 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | options: Options { 2024-10-05 18:30:00 hoyolab-auto | _unixOptions: undefined, 2024-10-05 18:30:00 hoyolab-auto | _internals: { 2024-10-05 18:30:00 hoyolab-auto | request: undefined, 2024-10-05 18:30:00 hoyolab-auto | agent: { http: undefined, https: undefined, http2: undefined }, 2024-10-05 18:30:00 hoyolab-auto | h2session: undefined, 2024-10-05 18:30:00 hoyolab-auto | decompress: true, 2024-10-05 18:30:00 hoyolab-auto | timeout: { 2024-10-05 18:30:00 hoyolab-auto | connect: undefined, 2024-10-05 18:30:00 hoyolab-auto | lookup: undefined, 2024-10-05 18:30:00 hoyolab-auto | read: undefined, 2024-10-05 18:30:00 hoyolab-auto | request: 30000, 2024-10-05 18:30:00 hoyolab-auto | response: undefined, 2024-10-05 18:30:00 hoyolab-auto | secureConnect: undefined, 2024-10-05 18:30:00 hoyolab-auto | send: undefined, 2024-10-05 18:30:00 hoyolab-auto | socket: undefined 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | prefixUrl: '', 2024-10-05 18:30:00 hoyolab-auto | body: undefined, 2024-10-05 18:30:00 hoyolab-auto | form: undefined, 2024-10-05 18:30:00 hoyolab-auto | json: undefined, 2024-10-05 18:30:00 hoyolab-auto | cookieJar: undefined, 2024-10-05 18:30:00 hoyolab-auto | ignoreInvalidCookies: false, 2024-10-05 18:30:00 hoyolab-auto | searchParams: undefined, 2024-10-05 18:30:00 hoyolab-auto | dnsLookup: undefined, 2024-10-05 18:30:00 hoyolab-auto | dnsCache: undefined, 2024-10-05 18:30:00 hoyolab-auto | context: {}, 2024-10-05 18:30:00 hoyolab-auto | hooks: { 2024-10-05 18:30:00 hoyolab-auto | init: [], 2024-10-05 18:30:00 hoyolab-auto | beforeRequest: [], 2024-10-05 18:30:00 hoyolab-auto | beforeError: [ [AsyncFunction (anonymous)] ], 2024-10-05 18:30:00 hoyolab-auto | beforeRedirect: [], 2024-10-05 18:30:00 hoyolab-auto | beforeRetry: [], 2024-10-05 18:30:00 hoyolab-auto | afterResponse: [] 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | followRedirect: true, 2024-10-05 18:30:00 hoyolab-auto | maxRedirects: 10, 2024-10-05 18:30:00 hoyolab-auto | cache: undefined, 2024-10-05 18:30:00 hoyolab-auto | throwHttpErrors: false, 2024-10-05 18:30:00 hoyolab-auto | username: '', 2024-10-05 18:30:00 hoyolab-auto | password: '', 2024-10-05 18:30:00 hoyolab-auto | http2: true, 2024-10-05 18:30:00 hoyolab-auto | allowGetBody: false, 2024-10-05 18:30:00 hoyolab-auto | headers: { 2024-10-05 18:30:00 hoyolab-auto | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36', 2024-10-05 18:30:00 hoyolab-auto | referer: 'https://act.hoyolab.com', 2024-10-05 18:30:00 hoyolab-auto | 'x-rpc-app_version': '1.5.0', 2024-10-05 18:30:00 hoyolab-auto | 'x-rpc-client_type': 5, 2024-10-05 18:30:00 hoyolab-auto | 'x-rpc-language': 'en-us', 2024-10-05 18:30:00 hoyolab-auto | cookie: 'ltoken_v2=v2_CAISDGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXjg1MTNkIL_k17QGKMOXXXXXXXXXic19vdmVyc2VhXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXp22nmUjhKn-vMmfsPtubb3eBxOrlI; ltuid_v2=2XXXXXXXX; ltmid_v2=1kXXXXXXXXXy', 2024-10-05 18:30:00 hoyolab-auto | ds: '1728124200,hFjBYA,00b59546562754aa7c2975562b5b03bb', 2024-10-05 18:30:00 hoyolab-auto | accept: 'application/json', 2024-10-05 18:30:00 hoyolab-auto | 'accept-encoding': 'gzip, deflate, br' 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | methodRewriting: false, 2024-10-05 18:30:00 hoyolab-auto | dnsLookupIpVersion: undefined, 2024-10-05 18:30:00 hoyolab-auto | parseJson: [Function: parse], 2024-10-05 18:30:00 hoyolab-auto | stringifyJson: [Function: stringify], 2024-10-05 18:30:00 hoyolab-auto | retry: { 2024-10-05 18:30:00 hoyolab-auto | limit: 0, 2024-10-05 18:30:00 hoyolab-auto | methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ], 2024-10-05 18:30:00 hoyolab-auto | statusCodes: [ 2024-10-05 18:30:00 hoyolab-auto | 408, 413, 429, 500, 2024-10-05 18:30:00 hoyolab-auto | 502, 503, 504, 521, 2024-10-05 18:30:00 hoyolab-auto | 522, 524 2024-10-05 18:30:00 hoyolab-auto | ], 2024-10-05 18:30:00 hoyolab-auto | errorCodes: [ 2024-10-05 18:30:00 hoyolab-auto | 'ETIMEDOUT', 2024-10-05 18:30:00 hoyolab-auto | 'ECONNRESET', 2024-10-05 18:30:00 hoyolab-auto | 'EADDRINUSE', 2024-10-05 18:30:00 hoyolab-auto | 'ECONNREFUSED', 2024-10-05 18:30:00 hoyolab-auto | 'EPIPE', 2024-10-05 18:30:00 hoyolab-auto | 'ENOTFOUND', 2024-10-05 18:30:00 hoyolab-auto | 'ENETUNREACH', 2024-10-05 18:30:00 hoyolab-auto | 'EAI_AGAIN' 2024-10-05 18:30:00 hoyolab-auto | ], 2024-10-05 18:30:00 hoyolab-auto | maxRetryAfter: undefined, 2024-10-05 18:30:00 hoyolab-auto | calculateDelay: [Function: calculateDelay], 2024-10-05 18:30:00 hoyolab-auto | backoffLimit: Infinity, 2024-10-05 18:30:00 hoyolab-auto | noise: 100 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | localAddress: undefined, 2024-10-05 18:30:00 hoyolab-auto | method: 'GET', 2024-10-05 18:30:00 hoyolab-auto | createConnection: undefined, 2024-10-05 18:30:00 hoyolab-auto | cacheOptions: { 2024-10-05 18:30:00 hoyolab-auto | shared: undefined, 2024-10-05 18:30:00 hoyolab-auto | cacheHeuristic: undefined, 2024-10-05 18:30:00 hoyolab-auto | immutableMinTimeToLive: undefined, 2024-10-05 18:30:00 hoyolab-auto | ignoreCargoCult: undefined 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | https: { 2024-10-05 18:30:00 hoyolab-auto | alpnProtocols: undefined, 2024-10-05 18:30:00 hoyolab-auto | rejectUnauthorized: undefined, 2024-10-05 18:30:00 hoyolab-auto | checkServerIdentity: undefined, 2024-10-05 18:30:00 hoyolab-auto | certificateAuthority: undefined, 2024-10-05 18:30:00 hoyolab-auto | key: undefined, 2024-10-05 18:30:00 hoyolab-auto | certificate: undefined, 2024-10-05 18:30:00 hoyolab-auto | passphrase: undefined, 2024-10-05 18:30:00 hoyolab-auto | pfx: undefined, 2024-10-05 18:30:00 hoyolab-auto | ciphers: undefined, 2024-10-05 18:30:00 hoyolab-auto | honorCipherOrder: undefined, 2024-10-05 18:30:00 hoyolab-auto | minVersion: undefined, 2024-10-05 18:30:00 hoyolab-auto | maxVersion: undefined, 2024-10-05 18:30:00 hoyolab-auto | signatureAlgorithms: undefined, 2024-10-05 18:30:00 hoyolab-auto | tlsSessionLifetime: undefined, 2024-10-05 18:30:00 hoyolab-auto | dhparam: undefined, 2024-10-05 18:30:00 hoyolab-auto | ecdhCurve: undefined, 2024-10-05 18:30:00 hoyolab-auto | certificateRevocationLists: undefined 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | encoding: undefined, 2024-10-05 18:30:00 hoyolab-auto | resolveBodyOnly: false, 2024-10-05 18:30:00 hoyolab-auto | isStream: false, 2024-10-05 18:30:00 hoyolab-auto | responseType: 'json', 2024-10-05 18:30:00 hoyolab-auto | url: URL {}, 2024-10-05 18:30:00 hoyolab-auto | pagination: { 2024-10-05 18:30:00 hoyolab-auto | transform: [Function: transform], 2024-10-05 18:30:00 hoyolab-auto | paginate: [Function: paginate], 2024-10-05 18:30:00 hoyolab-auto | filter: [Function: filter], 2024-10-05 18:30:00 hoyolab-auto | shouldContinue: [Function: shouldContinue], 2024-10-05 18:30:00 hoyolab-auto | countLimit: Infinity, 2024-10-05 18:30:00 hoyolab-auto | backoff: 0, 2024-10-05 18:30:00 hoyolab-auto | requestLimit: 10000, 2024-10-05 18:30:00 hoyolab-auto | stackAllItems: false 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | setHost: true, 2024-10-05 18:30:00 hoyolab-auto | maxHeaderSize: undefined, 2024-10-05 18:30:00 hoyolab-auto | signal: undefined, 2024-10-05 18:30:00 hoyolab-auto | enableUnixSockets: false 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | _merging: false, 2024-10-05 18:30:00 hoyolab-auto | _init: [ 2024-10-05 18:30:00 hoyolab-auto | { 2024-10-05 18:30:00 hoyolab-auto | responseType: 'json', 2024-10-05 18:30:00 hoyolab-auto | http2: true, 2024-10-05 18:30:00 hoyolab-auto | retry: { limit: 0 }, 2024-10-05 18:30:00 hoyolab-auto | timeout: { request: 30000 }, 2024-10-05 18:30:00 hoyolab-auto | mutableDefaults: true, 2024-10-05 18:30:00 hoyolab-auto | throwHttpErrors: false, 2024-10-05 18:30:00 hoyolab-auto | headers: { 2024-10-05 18:30:00 hoyolab-auto | 'User-Agent': 'Custom fork of HoyoLabAuto: github.com/torikushiii/hoyolab-auto' 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | hooks: { beforeError: [ [AsyncFunction (anonymous)] ] } 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | { 2024-10-05 18:30:00 hoyolab-auto | headers: { 2024-10-05 18:30:00 hoyolab-auto | Referer: 'https://act.hoyolab.com', 2024-10-05 18:30:00 hoyolab-auto | 'x-rpc-app_version': '1.5.0', 2024-10-05 18:30:00 hoyolab-auto | 'x-rpc-client_type': 5, 2024-10-05 18:30:00 hoyolab-auto | 'x-rpc-language': 'en-us', 2024-10-05 18:30:00 hoyolab-auto | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' 2024-10-05 18:30:00 hoyolab-auto | } 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | { 2024-10-05 18:30:00 hoyolab-auto | url: 'https://bbs-api-os.hoyolab.com/game_record/hkrpg/api/note', 2024-10-05 18:30:00 hoyolab-auto | responseType: 'json', 2024-10-05 18:30:00 hoyolab-auto | throwHttpErrors: false, 2024-10-05 18:30:00 hoyolab-auto | searchParams: { server: 'prod_official_asia', role_id: '801269416' }, 2024-10-05 18:30:00 hoyolab-auto | headers: { 2024-10-05 18:30:00 hoyolab-auto | Cookie: 'ltoken_v2=v2_CAXXXXX5b3FhcTNzMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXQGKMOK1IwCML2clnhCC2Jic19vdmVyc2Vh.P_KVZgAAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXNiEEVSTTw10AiEA8oV6_YLULA2tiMp22nmUjhKn-vMmfsPtubb3eBxOrlI; ltuid_v2=252XXXX33; ltmid_v2=1krxXXXXX_hy', 2024-10-05 18:30:00 hoyolab-auto | DS: '1728124200,hFjBYA,00b59546562754aa7c2975562b5b03bb' 2024-10-05 18:30:00 hoyolab-auto | } 2024-10-05 18:30:00 hoyolab-auto | } 2024-10-05 18:30:00 hoyolab-auto | ] 2024-10-05 18:30:00 hoyolab-auto | }, 2024-10-05 18:30:00 hoyolab-auto | [cause]: Error [ERR_HTTP2_STREAM_ERROR]: Stream closed with error code NGHTTP2_REFUSED_STREAM 2024-10-05 18:30:00 hoyolab-auto | at ClientHttp2Stream._destroy [as destroy] (node:internal/http2/core:2375:13) 2024-10-05 18:30:00 hoyolab-auto | at stream._destroy (/app/node_modules/http2-wrapper/source/utils/delay-async-destroy.js:12:10) 2024-10-05 18:30:00 hoyolab-auto | at _destroy (node:internal/streams/destroy:121:10) 2024-10-05 18:30:00 hoyolab-auto | at ClientHttp2Stream.destroy (node:internal/streams/destroy:83:5) 2024-10-05 18:30:00 hoyolab-auto | at Writable.destroy (node:internal/streams/writable:1120:11) 2024-10-05 18:30:00 hoyolab-auto | at Http2Stream.onStreamClose (node:internal/http2/core:562:12) { 2024-10-05 18:30:00 hoyolab-auto | code: 'ERR_HTTP2_STREAM_ERROR' 2024-10-05 18:30:00 hoyolab-auto | } 2024-10-05 18:30:00 hoyolab-auto | }

torikushiii commented 1 month ago

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)

Capoouo commented 1 month ago

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?

torikushiii commented 1 month ago

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

Capoouo commented 1 month ago

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)

image

torikushiii commented 1 month ago

should be fixed on latest commit

Capoouo commented 1 month ago

I'll wait for the next code redemption to see if there are any errors

Capoouo commented 1 month ago

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 Found 1 new code(s) 2024-10-06 06:27:00 hoyolab-auto | Genshin - New codes found: LA5E77CLZX5V However, it didn’t redeem the code for me. In hoyolab-auto/index.js from lines 117 to 126, I see it comment out, but there are no error messages

torikushiii commented 1 month ago

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".

Capoouo commented 1 month ago

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 Found 1 new code(s) 2024-10-08 09:55:00 hoyolab-auto | Star Rail - New codes found: VNQCT6Y2L8N4K

torikushiii commented 1 month ago

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.

Capoouo commented 1 month ago

Thank you for your hard work I hope this latest commit works

Capoouo commented 1 month ago

Emm, starting just now, this message keeps appearing: 2024-10-10 21:58:00 hoyolab-auto | 2024-10-10 21:58:00 { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 } This shouldn't be a problem, right?

torikushiii commented 1 month ago

Yes that error can be ignored.

Capoouo commented 1 month ago

The recent check-in for Zenless Zone Zero didn't work, and the control panel shows the following: 2024-10-11 00:31:13 { message: 'Info returned non-zero retcode', args: { status: -500001, body: { data: null, message: '网络出小差了,请稍后重试~', retcode: -500001 } } } However, both StarRail and Genshin successfully checked in

Is this an issue with my network? But the other games successfully checked in

torikushiii commented 1 month ago

no, they changed the check-in url, i will deploy a fix later

Capoouo commented 1 month ago

This morning, there were several codes, but only UB4XPUJS77QD was redeemed image

2024-10-11 05:23:00 hoyolab-auto | 2024-10-11 05:23:00 Found 1 new code(s) 2024-10-11 05:23:00 hoyolab-auto | Genshin - New codes found: UB4XPUJS77QD 2024-10-11 06:33:00 hoyolab-auto | 2024-10-11 06:33:00 Found 4 new code(s) 2024-10-11 06:33:00 hoyolab-auto | Genshin - New codes found: WTXV36M1J6CO, DEOB21CK9Y6N, SBUEMJB449D9, HVDLLZ29Y26W

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?)

torikushiii commented 1 month ago

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.

Capoouo commented 1 month ago

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?

torikushiii commented 1 month ago

No need

Capoouo commented 1 month ago

Just now there was a new code, and the same issue occurred image

torikushiii commented 1 month ago

can you try pulling the latest commit and let me know, I've added few logs to it

Capoouo commented 1 month ago

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 Found 3 new code(s) 2024-10-11 20:10:01 hoyolab-auto | Star Rail - New codes found: 3BKGPPN4VJN3, 2T3Z77PLCK67, WB3H6664CK9T None of these codes were redeemed, and there were no error messages either

index.js 117~126 comment

Perhaps I should wait for the next code to get a more accurate result?

torikushiii commented 1 month ago

hold on, i think i can replicate this issue now

torikushiii commented 1 month ago

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

Capoouo commented 1 month ago

All of my accounts have already redeemed these codes, so I might need to wait for the next code?

torikushiii commented 1 month ago

that's fine, just remember to change loglevel to debug if you encountered this again to see if there's any message at all

Capoouo commented 1 month ago

then I think I need to set loglevel to debug until the next redemption code?

torikushiii commented 1 month ago

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.

Capoouo commented 1 month ago

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.

NaufalF22 commented 1 month ago

image Its work now but theres 2 code every 5 sec (idk you can do this or not)

reticence96 commented 1 month ago

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"

torikushiii commented 1 month ago

those 3 codes has expired hours ago, so there's no notification will be send.

Capoouo commented 1 month ago

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

torikushiii commented 1 month ago

oh yeah...

the API returns an invalid codes 🙃

image

torikushiii commented 1 month ago

sorry for the confusion earlier, talked to the guy managed the API and he fixed it, should be all good now 👍

image

Capoouo commented 1 month ago

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?

torikushiii commented 1 month ago

yes, it is safe to comment out the lines and keep it running like that.

Capoouo commented 3 weeks ago

@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

torikushiii commented 2 weeks ago

@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.