pulsar-edit / package-backend

Pulsar Server Backend for Packages
https://api.pulsar-edit.dev
MIT License
12 stars 11 forks source link

[BUG] Pulsar returns an error when searching for `web` #88

Closed Daeraxa closed 1 year ago

Daeraxa commented 1 year ago

Is this Bug Present in the upstream API Server?

What is the Bug When searching for web in the Pulsar "Install Packages" panel it errors:

Searching for “web” failed.Hide output…
Cannot convert undefined or null to object
[{"name":"web-view","readme":"# Atom Web View...

The returned json from https://api.pulsar-edit.dev/api/packages/search?q=web appears to be valid so I'm wondering if Pulsar is expecting to have a field that is null in the returned JSON?

How to Replicate the Bug

savetheclocktower commented 1 year ago

The original reporter narrowed it down to the web-developer-tools package. Trying to view this package (or search for it) on the frontend also returns an error.

Daeraxa commented 1 year ago

It actually has no metadata at all which makes me think it is indeed malformed. No author for example.

    {
        "main": "./lib/web-tools",
        "name": "web-developer-tools",
        "engines": {
            "atom": ">=1.0.0 <2.0.0"
        },
        "license": "MIT",
        "version": "0.4.4",
        "keywords": [],
        "repository": "https://github.com/manngo/atom-web-tools",
        "description": "A Set of Tools to work with Web Development",
        "dependencies": {},
        "activationCommands": {
            "atom-workspace": [
                "web-tools:about",
                "web-tools:html:lists",
                "web-tools:html:structure",
                "web-tools:tables",
                "web-tools:html:paragraphs",
                "web-tools:html:paragraphs-headings",
                "web-tools:html:insert",
                "web-tools:html:anchors",
                "web-tools:html:html5",
                "web-tools:css:colors",
                "web-tools:misc:spaces-tabs",
                "web-tools:misc:smart-quotes",
                "web-tools:misc:entify",
                "web-tools:misc:js-chars",
                "web-tools:misc:collapse-lines",
                "web-tools:misc:getPath",
                "web-tools:misc:copyProfile",
                "web-tools:misc:sample",
                "web-tools:misc:replace"
            ]
        },
        "downloads": "795",
        "stargazers_count": "0",
        "releases": {
            "latest": "0.4.4"
        }
    },
confused-Techie commented 1 year ago

As we now have an issue opened for the specific package that has malformed data, and since the frontend totally failing to return anything has been resolved in `package-frontend#75. I'll go ahead and close this issue.

Thanks for everyone helping out on this one and for reporting it