Skip to content

TypeError: Cannot read properties of undefined (reading '0') #1

@mattjared

Description

@mattjared

When I run the dockhunt app I get the following error....

Scanning your dock...

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

TypeError: Cannot read properties of undefined (reading '0')
    at getAppNamesToIconPaths (/snapshot/dist/index.cjs)
    at getDockContents (/snapshot/dist/index.cjs)

When I run the CLI I get this error....

const appDirectoryUrl = parsedAppData.dict[0].dict[0].string[0];
                                                          ^
TypeError: Cannot read properties of undefined (reading '0')

My working theory is that I have intentionally added in spaces in my dock that don't show as apps and that breaks the script that gets the app icons.

How to add spaces: https://dev.to/shadowfaxrodeo/til-how-to-add-spaces-to-the-dock-on-macos-m50.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions