torikushiii / starrail-auto

Auto check-in and others for Honkai: Star Rail
https://ko-fi.com/torikushiii
GNU Affero General Public License v3.0
106 stars 23 forks source link

API error when getting stamina info #38

Closed the80hz closed 8 months ago

the80hz commented 8 months ago

I have a server on archlinux, on which the script runs without problems. When migrating config.json to another machine, for example, on wsl2 (ubuntu and arch) or Docker on another hardware, an API error occurs. Both computers have Node v21.6.2 installed. Here's what the script writes when trying to get data on new computer with wsl2 archlinux:

{
  message: 'API error when getting stamina info',
  args: {
    statusCode: 200,
    body: { data: null, message: 'invalid request', retcode: -10001 }
  }
}

image image

Here's what the script writes on the old computer without errors

image image

It would seem that the problem is with cookies, but my friend sent me a token that was made on a completely different hardware in a completely different place, and it works.

torikushiii commented 8 months ago

that specific error is a tricky one, since it can be anything such as:

torikushiii commented 8 months ago

I will close this issue due to inactivity, if you have still any question regarding this feel free to comment here again