Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
philipp-classen opened this issue Mar 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@philipp-classen
Copy link
Member

philipp-classen commented Mar 28, 2024

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.

@philipp-classen philipp-classen added the bug Something isn't working label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant