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

Zenless Zone Zero API returns errors (403, #70

Closed FlamingFox911 closed 1 month ago

FlamingFox911 commented 1 month ago

Seems like the ZZZ API has broken. It's getting 403 forbidden errors and -500001 retcodes.

2024-10-10 09:06:43 
2024-10-10 09:06:43 > start
2024-10-10 09:06:43 > node index.js
2024-10-10 09:06:43 
2024-10-10 09:06:43 2024-10-10 21:06:43 <INFO:System> Log level set to info
2024-10-10 09:06:43 2024-10-10 21:06:43 <INFO:Client> Loading configuration data
2024-10-10 09:06:43 2024-10-10 21:06:43 <INFO:Client> Loaded 5 configuration entries
2024-10-10 09:06:43 2024-10-10 21:06:43 <WARN:Client> Skipping telegram platform (inactive)
2024-10-10 09:06:43 2024-10-10 21:06:43 <INFO:Cron> Initialized 11 cron jobs
2024-10-10 09:06:43 2024-10-10 21:06:43 <WARN:Client> Skipping honkai account (inactive)
2024-10-10 09:06:43 2024-10-10 21:06:43 <WARN:Client> Skipping starrail account (inactive)
2024-10-10 09:06:45 2024-10-10 21:06:45 <INFO:Discord> Registering application commands.
2024-10-10 09:06:45 2024-10-10 21:06:45 <INFO:Discord> Successfully registered 5 application commands.
2024-10-10 09:06:46 2024-10-10 21:06:46 <INFO:GenshinImpact> Logged into (######) XXXXXX (NA)
2024-10-10 09:06:46 2024-10-10 21:06:46 <INFO:ZenlessZoneZero> Logged into (######) XXXXXX (NA)
2024-10-10 09:06:46 2024-10-10 21:06:46 <INFO:Client> Initialize completed (3094.515521ms)
2024-10-10 09:18:16 2024-10-10 21:18:16 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-10 09:33:16 2024-10-10 21:33:16 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-10 09:48:15 2024-10-10 21:48:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-10 10:03:15 2024-10-10 22:03:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-10 11:00:02 2024-10-10 23:00:02 <INFO:GenshinImpact:CheckIn> XXXXXX already signed in today
2024-10-10 11:00:02 2024-10-10 23:00:02 <INFO:ZenlessZoneZero> {
2024-10-10 11:00:02   message: 'Info returned non-zero retcode',
2024-10-10 11:00:02   args: {
2024-10-10 11:00:02     status: -500001,
2024-10-10 11:00:02     body: { data: null, message: '网络出小差了,请稍后重试~', retcode: -500001 }
2024-10-10 11:00:02   }
2024-10-10 11:00:02 }
2024-10-10 12:00:03 2024-10-11 00:00:03 <INFO:GenshinImpact:CheckIn> (######) XXXXXX Today's Reward: Primogem x20
2024-10-10 12:00:04 2024-10-11 00:00:04 <INFO:ZenlessZoneZero> {
2024-10-10 12:00:04   message: 'Info returned non-zero retcode',
2024-10-10 12:00:04   args: {
2024-10-10 12:00:04     status: -500001,
2024-10-10 12:00:04     body: { data: null, message: '网络出小差了,请稍后重试~', retcode: -500001 }
2024-10-10 12:00:04   }
2024-10-10 12:00:04 }
2024-10-10 12:00:04 2024-10-11 00:00:04 <INFO:Cron:CheckIn> All accounts either signed in or failed to sign in
2024-10-10 17:30:00 2024-10-11 05:30:00 <INFO:GenshinResolver> Found 1 new codes
2024-10-10 18:45:00 2024-10-11 06:45:00 <INFO:GenshinResolver> Found 4 new codes
2024-10-11 09:06:47 
2024-10-11 09:06:47 > start
2024-10-11 09:06:47 > node index.js
2024-10-11 09:06:47 
2024-10-11 09:06:47 2024-10-11 21:06:47 <INFO:System> Log level set to info
2024-10-11 09:06:47 2024-10-11 21:06:47 <INFO:Client> Loading configuration data
2024-10-11 09:06:47 2024-10-11 21:06:47 <INFO:Client> Loaded 5 configuration entries
2024-10-11 09:06:47 2024-10-11 21:06:47 <WARN:Client> Skipping telegram platform (inactive)
2024-10-11 09:06:47 2024-10-11 21:06:47 <INFO:Cron> Initialized 11 cron jobs
2024-10-11 09:06:47 2024-10-11 21:06:47 <WARN:Client> Skipping honkai account (inactive)
2024-10-11 09:06:47 2024-10-11 21:06:47 <WARN:Client> Skipping starrail account (inactive)
2024-10-11 09:06:48 2024-10-11 21:06:48 <INFO:Discord> Registering application commands.
2024-10-11 09:06:49 2024-10-11 21:06:49 <INFO:Discord> Successfully registered 5 application commands.
2024-10-11 09:06:56 2024-10-11 21:06:56 <INFO:GenshinImpact> Logged into (######) XXXXXX (NA)
2024-10-11 09:07:09 
2024-10-11 09:07:09 > start
2024-10-11 09:07:09 > node index.js
2024-10-11 09:07:09 
2024-10-11 09:07:09 2024-10-11 21:07:09 <INFO:System> Log level set to info
2024-10-11 09:07:09 2024-10-11 21:07:09 <INFO:Client> Loading configuration data
2024-10-11 09:07:09 2024-10-11 21:07:09 <INFO:Client> Loaded 5 configuration entries
2024-10-11 09:07:09 2024-10-11 21:07:09 <WARN:Client> Skipping telegram platform (inactive)
2024-10-11 09:07:09 2024-10-11 21:07:09 <INFO:Cron> Initialized 11 cron jobs
2024-10-11 09:07:09 2024-10-11 21:07:09 <WARN:Client> Skipping honkai account (inactive)
2024-10-11 09:07:09 2024-10-11 21:07:09 <WARN:Client> Skipping starrail account (inactive)
2024-10-11 09:07:10 2024-10-11 21:07:10 <INFO:Discord> Registering application commands.
2024-10-11 09:07:10 2024-10-11 21:07:10 <INFO:Discord> Successfully registered 5 application commands.
2024-10-11 09:07:18 2024-10-11 21:07:18 <INFO:GenshinImpact> Logged into (######) XXXXXX (NA)
2024-10-11 09:07:19 2024-10-11 21:07:19 <INFO:ZenlessZoneZero> Logged into (######) XXXXXX (NA)
2024-10-11 09:07:19 2024-10-11 21:07:19 <INFO:Client> Initialize completed (9546.407267ms)
2024-10-11 09:18:15 2024-10-11 21:18:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-11 09:33:15 2024-10-11 21:33:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-11 09:48:15 2024-10-11 21:48:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-11 10:03:15 2024-10-11 22:03:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-11 10:48:15 2024-10-11 22:48:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-11 11:00:03 2024-10-11 23:00:03 <INFO:GenshinImpact:CheckIn> XXXXXX already signed in today
2024-10-11 11:00:04 2024-10-11 23:00:04 <INFO:ZenlessZoneZero> {
2024-10-11 11:00:04   message: 'Info returned non-zero retcode',
2024-10-11 11:00:04   args: {
2024-10-11 11:00:04     status: -500001,
2024-10-11 11:00:04     body: { data: null, message: '网络出小差了,请稍后重试~', retcode: -500001 }
2024-10-11 11:00:04   }
2024-10-11 11:00:04 }
2024-10-11 11:18:15 2024-10-11 23:18:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-11 11:33:15 2024-10-11 23:33:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-11 11:48:15 2024-10-11 23:48:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-11 12:00:02 2024-10-12 00:00:02 <INFO:GenshinImpact:CheckIn> (######) XXXXXX Today's Reward: Fried Radish Balls x3
2024-10-11 12:00:02 2024-10-12 00:00:02 <INFO:ZenlessZoneZero> {
2024-10-11 12:00:02   message: 'Info returned non-zero retcode',
2024-10-11 12:00:02   args: {
2024-10-11 12:00:02     status: -500001,
2024-10-11 12:00:02     body: { data: null, message: '网络出小差了,请稍后重试~', retcode: -500001 }
2024-10-11 12:00:02   }
2024-10-11 12:00:02 }
2024-10-11 12:00:02 2024-10-12 00:00:02 <INFO:Cron:CheckIn> All accounts either signed in or failed to sign in
2024-10-11 12:18:15 2024-10-12 00:18:15 <INFO:ZenlessZoneZero:ReadWrite> { message: 'Failed to fetch data from ReadWrite.', statusCode: 403 }
2024-10-11 09:07:08 /app/hoyolab-modules/zenless/index.js:77
2024-10-11 09:07:08                             throw new app.Error({
2024-10-11 09:07:08                                   ^
2024-10-11 09:07:08 
2024-10-11 09:07:08 Error: Failed to login to Zenless Zone Zero account
2024-10-11 09:07:08 - args: {"retcode":-2,"message":"context deadline exceeded","res":{"data":null,"message":"context deadline exceeded","retcode":-2}}
2024-10-11 09:07:08     at ZenlessZoneZero.login (/app/hoyolab-modules/zenless/index.js:77:11)
2024-10-11 09:07:08     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-10-11 09:07:08     at async Promise.all (index 1)
2024-10-11 09:07:08     at async /app/index.js:112:2 {
2024-10-11 09:07:08   [cause]: undefined
2024-10-11 09:07:08 }
2024-10-11 09:07:08 
2024-10-11 09:07:08 Node.js v20.18.0

Message is (loosely translated): The network is out of commission, please try again later~

Aida-Enna commented 1 month ago

Make sure you're using the latest commit, I think this was fixed in https://github.com/torikushiii/hoyolab-auto/commit/a42966cf5d867b3fd5fb121c8a19c290ae7bbaee.

reihan1010 commented 1 month ago

The Google script version also seems to have the same issue. 8:17:01 PM Error Zenless Zone Zero:getSignInfo Failed to get sign info. { data: null, message: '网络出小差了,请稍后重试~', retcode: -500001 }

torikushiii commented 1 month ago

oh yeah, i forgot to update for the google script part, sorry about that!

Aida-Enna commented 1 month ago

After changing the base URL in the script, I still get the redeem error. Does it need that additional cookie value that was added in the main code?

FlamingFox911 commented 1 month ago

Can confirm: There is still a problem. image

torikushiii commented 1 month ago

@Aida-Enna redeem code requires 4 cookie values which is cookie_token_v2, account_mid_v2, account_id_v2, account_id

@FlamingFox911 try pulling the latest commit and let me know if this problem still occurs.

Aida-Enna commented 1 month ago

@Aida-Enna redeem code requires 4 cookie values which is cookie_token_v2, account_mid_v2, account_id_v2, account_id

@FlamingFox911 try pulling the latest commit and let me know if this problem still occurs.

Sorry, I meant the value in the header that indicated the game - But it's been added to the script and everything seems to be working as intended. Thank you!

FlamingFox911 commented 1 month ago

Seems like there is something else going on. Latest commit. I even remade cookies from DevTools. image

FlamingFox911 commented 1 month ago

Ok, now it seems to work.