Skip to content

Subject failed to notify listener Error: Unexpected key type (type: undefined, value: undefined) #75

@philipp-classen

Description

@philipp-classen
subject.js:34 WTM [reporting] error: Subject failed to notify listener Error: Unexpected key type (type: undefined, value: undefined)
    at ChromeStorageMap.normalizeKey (chrome-storage-map.js:190:11)
    at ChromeStorageMap.get (chrome-storage-map.js:93:22)
    at TokenPipeline.getFromCache (cached-entry-pipeline.js:57:28)
    at TokenPipeline.get (cached-entry-pipeline.js:36:24)
    at index.js:119:38
    at subject.js:32:9
    at Set.forEach (<anonymous>)
    at Subject.pub (subject.js:30:20)
    at index.js:100:22

token can be undefined (code:

)

// process a batch of entries for a specific token
const token = batch[0].token;

const tokenStats = this.tokens.get(token);

batch is an array of strings. Entries look like that 513d8f49d55a9708:3a2d7564baee79182ebc7b75084aabd3 (all the 120 entries in my example look like that).

The string have no .token field, which explains the that the lookup in the ChromeStorageMap fails. The question is how to derive the key correctly?

Browser: Opera 108 on Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions