Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • W webext-sdk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 67
    • Issues 67
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • eyeo
  • adblockplus
  • abc
  • webext-sdk
  • Issues
  • #213
Closed
Open
Created Apr 21, 2022 by Thomas Greiner@ThomasGreinerReporter

Loading filters from storage fails after adding a filter with meta data

Environment

  • Browser and full version: Chrome 100.0.4896.60
  • Extension using this toolkit: test-mv2
  • Commit hash: 5d0561a0 (0.4.0)

Steps to reproduce

  1. Run await EWE.filters.add(["aaaaa"], {a: "A"}).
  2. Run await EWE.filters.getUserFilters().
  3. Reload extension.
  4. Run await EWE.filters.getUserFilters().

Actual behavior

  • After 2) Returns array with one entry.
  • After 3) Warning message shown in console (see below).
  • After 4) Returns empty array.
SyntaxError: Unexpected token o in JSON at position 1
    at JSON.parse (<anonymous>)
    at Function.e.Subscription.fromObject (subscriptionClasses.jss:469:31)
    at e.INIParser.process (iniParser.jss:82:45)
    at filterStorage.jss:574:14
    at Object.readFromFile (io.jss:113:9)
    at async Object.loadFromDisk (filterStorage.jss:631:7)
    at async Object.initialize (filterListener.jss:176:20)
    at async Va (initializer.jss:30:3)
    at async idb.jss:63:10
    at async index.jss:68:3

Expected behavior

  • After 2) Returns array with one entry.
  • After 3) No warning message is shown in console.
  • After 4) Returns array with one entry.

Further information

This problem does not occur when adding a filter without meta data.

Assignee
Assign to
Time tracking