Skip to content

TraverseCookies on Firefox yielding nil, nil #97

@jf-uu

Description

@jf-uu

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

TraverseCookies is yielding nil, nil.

How to reproduce

Run the below example code.

Example code

package main

import (
	"context"
	"errors"
	"io/fs"

	"github.com/browserutils/kooky"
	_ "github.com/browserutils/kooky/browser/firefox"
)

func main() {
	for _, store := range kooky.FindAllCookieStores(context.Background()) {
		if store.Browser() == "firefox" {
			for cookie, err := range store.TraverseCookies(kooky.Valid, kooky.DomainHasSuffix(".bandcamp.com")) {
				if errors.Is(err, fs.ErrNotExist) {
					break
				} else if err != nil {
					panic(err)
				}
				if cookie == nil {
					panic("nil cookie")
				}
			}
		}
	}
}

Kooky version

v0.2.4

Go compiler version

1.24.5

Browser

Firefox 141.0

Operating system and version

macOS Sequoia 15.5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions