Areha11Fz / HoYoLAB-Auto-Check-In

Simple and Free HoYoLAB Auto Check In for Genshin Impact, Zenless Zone Zero, Honkai Star Rail and Honkai Impact 3rd
15 stars 2 forks source link

hsr check in not working #4

Closed Keilo104 closed 1 month ago

Keilo104 commented 1 month ago

same issue zzz was having earlier, i managed to fix it by doing some dumb stuff

    const httpResponses = UrlFetchApp.fetchAll(urls.map((url) => {
      const temp_options = JSON.parse(JSON.stringify(options));

      if (url.localeCompare(urlDict.ZZZ) == 0) temp_options["headers"]["x-rpc-signgame"] = "zzz";
      else if (url.localeCompare(urlDict.Star_Rail) == 0) temp_options["headers"]["x-rpc-signgame"] = "hsr";

      return { url, ...temp_options }
    }));

probably not the best way to do it, but it do be working now

PhantomEnderium commented 1 month ago

Wanted to add to this, the old version of the code before the ZZZ bugfix has starrail working fine, something in the updated code must be screwing with it. I'm not well versed in this type of code yet so I can't really help but wanted to point that out.

temp fix here does work though, thank you!!

ankarakata commented 1 month ago

same issue zzz was having earlier, i managed to fix it by doing some dumb stuff

    const httpResponses = UrlFetchApp.fetchAll(urls.map((url) => {
      const temp_options = JSON.parse(JSON.stringify(options));

      if (url.localeCompare(urlDict.ZZZ) == 0) temp_options["headers"]["x-rpc-signgame"] = "zzz";
      else if (url.localeCompare(urlDict.Star_Rail) == 0) temp_options["headers"]["x-rpc-signgame"] = "hsr";

      return { url, ...temp_options }
    }));

probably not the best way to do it, but it do be working now

what code/line should i replace with this fix?

Keilo104 commented 1 month ago

@ankarakata replace the one line that starts with

const httpResponses = UrlFetchApp...

w3djyt commented 1 month ago

I'm getting "活动已结束 (-500012)" for one account but "操作频繁,请稍后再试" for the other... both HSR.

Can confirm the above code fixed the problem for me. Thanks, @Keilo104

Areha11Fz commented 1 month ago

added fix, thanks for the info!