Skip to content

ZZZ - retrieving characters shows Error [NodeHoyoError]: Parameter Error #14

@bthai7437

Description

@bthai7437

Describe the bug
When using the ZenlessZoneZero.Record function characters. I would get an error

error:  Error [NodeHoyoError]: Parameter Error
    at ZZZRecordModule.characters (..\..\node-hoyolab\src\client\zzz\record\record.ts:114:12)
  112 |
  113 |     if (res.retcode !== 0) {
> 114 |       throw new NodeHoyoError(
      |            ^
  115 |         res.message ??
  116 |           'Failed to retrieve data, please double-check the provided UID.',
  117 |         res.retcode, {
  code: -400005,
  http: [Object]
}

The parameters given are correct. I have diagnosed the issue and i've spotted several problems.

  1. In the zzz.interface.ts you have the enums
export enum ZZZRegion {
  USA = 'prod_gf_jp', <-- should be 'prod_gf_us'
  EUROPE = 'prod_gf_eu',
  ASIA = 'prod_gf_jp',
  CHINA_TAIWAN = 'prod_gf_cht',
}
  1. Not sure if we have access to a list of the agents. Seems we'll need to specify an id_list

Image

To Reproduce
Steps to reproduce the behavior:

  1. Create a ZenlessZoneZero instance
  2. Input correct cookies, uid and region
  3. Log the character function using the newly created instance

Expected behavior
Retrieves the characters associated with the provided region and UID.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions