stelzch / zotero.koplugin

Display Zotero collection on E-Readers with KOReader
GNU General Public License v3.0
51 stars 4 forks source link

Sync is successful but browse shows empy screen #5

Closed ntrocado closed 1 day ago

ntrocado commented 9 months ago

I followed the install instructions, added the user id and api key, Synchronize shows the 'success' message, but browse doesn't show any item, only "No items" at the bottom.

Any ideas?

I have several entries (links and pdfs) in the zotero library. If relevant, I only use the web interface (never installed the app).

ponderbb commented 9 months ago

I can second the same exact behaviour! I am on a Kobo Libra 2.

mergen3107 commented 9 months ago

@ntrocado @ponderbb Please enable verbose logs:

mergen3107 commented 9 months ago

@stelzch I tried v0.2 today and I have the same issue. Here is what log says (userID replaced by XXXXXXXX):

Z: initializing API
./zotero/meta.lua
Z: settings opened
Z: storage dir./zotero/storage
Z: Browser initialized
Z: successfully initialized!
12/24/23-19:24:59 INFO  setting zoom mode to content 
12/24/23-19:25:01 INFO  Restoring user input handling 
nil XXXXXXXX    XXXXXXXX
loaded items: 0
Determining size of 'https://api.zotero.org/users/XXXXXXXX/items?since=0'
Fetching 57 items.
Fetching page   0   https://api.zotero.org/users/XXXXXXXX/items?since=0&limit=100&start=0
Received callback, processing entries: 57
Determining size of 'https://api.zotero.org/users/XXXXXXXX/collections?since=0'
Fetching 0 items.
Fetching page   0   https://api.zotero.org/users/XXXXXXXX/collections?since=0&limit=100&start=0
Received callback, processing entries: 0

It says, Success., but there are no items shown when I hit Browse and a new window opens. in koreader/zotero/items.json there is a bunch of items, so it fetched OK.

Any suggestions?

P.S. Device: Kindle Scribe (5.16.2), KOReader v2023.10-55.

ponderbb commented 9 months ago

I also have something similar to @mergen3107, with the same behaviour of getting the Success after updating. I also have the correct entries in the items.json.

Device: Kobo Libra 2 and Koreader v2023.10.

12/24/23-16:03:56 DEBUG refresh: ui-mode w/ flash 0 0 1264 1680 true 
12/24/23-16:03:56 DEBUG refresh: wait for completion of (previous) marker 47 
12/24/23-16:03:56 DEBUG mxc_update: 1264x1680 region @ (0, 0) with marker 48 (WFM: 257 & UPD: 1) 
12/24/23-16:03:56 DEBUG refresh: wait for completion of marker 48 
nil <some other id> <userid>
loaded items: 0
Determining size of 'https://api.zotero.org/users/<userid>/items?since=105'
Fetching 0 items.
Fetching page   0   https://api.zotero.org/users/<userid>/items?since=105&limit=100&start=0
Received callback, processing entries: 0
Determining size of 'https://api.zotero.org/users/<userid>/collections?since=105'
Fetching 0 items.
Fetching page   0   https://api.zotero.org/users/<userid>/collections?since=105&limit=100&start=0
Received callback, processing entries: 0
mergen3107 commented 9 months ago

Some progress. If I create a Collection in Zotero Desktop (or web) and add some articles, then synchronize in KOReader - I can see the articles!

So, it seems Zotero plugin doesn't show article outside collections.

mergen3107 commented 9 months ago

Also, the last item in the collection is duplicated.

mergen3107 commented 9 months ago

For now, I just moved all articles to a collection. I also use browser extension on Desktop, and it now defaults to save into last used collection as well :D

mergen3107 commented 9 months ago

New information: it seems that Zotero stops showing stuff when there are specific articles in there. It worked with 3 articles, I added another 3 in the collection, and it stopped working. Let me see, maybe it is the problem with some characters that need escaping...

mergen3107 commented 9 months ago

Weird! Added all article into a collection one by one, all seems good.

Except for one article that is duplicated for some reason. It is not duplicated in the collections.json, only when it is drawn.

mergen3107 commented 9 months ago

This items is being duplicated:

    "CQV4K8NG": {
        "links": {
            "attachment": {
                "attachmentType": "application\/pdf",
                "type": "application\/json",
                "attachmentSize": 10145859,
                "href": "https:\/\/api.zotero.org\/users\/11351441\/items\/CDN4AK39"
            },
            "alternate": {
                "href": "https:\/\/www.zotero.org\/ma9098\/items\/CQV4K8NG",
                "type": "text\/html"
            },
            "self": {
                "href": "https:\/\/api.zotero.org\/users\/11351441\/items\/CQV4K8NG",
                "type": "application\/json"
            }
        },
        "meta": {
            "parsedDate": "2020-06",
            "numChildren": 2,
            "creatorSummary": "McComas et al."
        },
        "library": {
            "id": 11351441,
            "type": "user",
            "name": "ma9098",
            "links": {
                "alternate": {
                    "href": "https:\/\/www.zotero.org\/ma9098",
                    "type": "text\/html"
                }
            }
        },
        "version": 261,
        "key": "CQV4K8NG",
        "data": {
            "rights": "",
            "archive": "",
            "libraryCatalog": "Institute of Physics",
            "shortTitle": "Solar Cycle of Imaging the Global Heliosphere",
            "archiveLocation": "",
            "pages": "26",
            "seriesText": "",
            "itemType": "journalArticle",
            "accessDate": "2023-05-23T18:55:10Z",
            "DOI": "10.3847\/1538-4365\/ab8dc2",
            "dateModified": "2023-05-23T18:55:10Z",
            "collections": ["U3PCE4IQ"],
            "version": 261,
            "issue": "2",
            "key": "CQV4K8NG",
            "relations": {},
            "extra": "Publisher: The American Astronomical Society",
            "dateAdded": "2023-05-23T18:55:10Z",
            "callNumber": "",
            "publicationTitle": "The Astrophysical Journal Supplement Series",
            "language": "en",
            "creators": [{
                    "creatorType": "author",
                    "firstName": "D. J.",
                    "lastName": "McComas"
                }, {
                    "creatorType": "author",
                    "firstName": "M.",
                    "lastName": "Bzowski"
                }, {
                    "creatorType": "author",
                    "firstName": "M. A.",
                    "lastName": "Dayeh"
                }, {
                    "creatorType": "author",
                    "firstName": "R.",
                    "lastName": "DeMajistre"
                }, {
                    "creatorType": "author",
                    "firstName": "H. O.",
                    "lastName": "Funsten"
                }, {
                    "creatorType": "author",
                    "firstName": "P. H.",
                    "lastName": "Janzen"
                }, {
                    "creatorType": "author",
                    "firstName": "I.",
                    "lastName": "Kowalska-Leszczyńska"
                }, {
                    "creatorType": "author",
                    "firstName": "M. A.",
                    "lastName": "Kubiak"
                }, {
                    "creatorType": "author",
                    "firstName": "N. A.",
                    "lastName": "Schwadron"
                }, {
                    "creatorType": "author",
                    "firstName": "J. M.",
                    "lastName": "Sokół"
                }, {
                    "creatorType": "author",
                    "firstName": "J. R.",
                    "lastName": "Szalay"
                }, {
                    "creatorType": "author",
                    "firstName": "M.",
                    "lastName": "Tokumaru"
                }, {
                    "creatorType": "author",
                    "firstName": "E. J.",
                    "lastName": "Zirnstein"
                }
            ],
            "title": "Solar Cycle of Imaging the Global Heliosphere: Interstellar Boundary Explorer (IBEX) Observations from 2009–2019",
            "date": "2020-06",
            "url": "https:\/\/dx.doi.org\/10.3847\/1538-4365\/ab8dc2",
            "series": "",
            "tags": [],
            "ISSN": "0067-0049",
            "volume": "248",
            "seriesTitle": "",
            "abstractNote": "NASA’s Interstellar Boundary Explorer (IBEX) mission has operated in space for a full solar activity cycle (Solar Cycle 24), and IBEX observations have exposed the global three-dimensional structure of the heliosphere and its interaction with the very local interstellar medium for the first time. Here, we extend the prior IBEX observations of energetic neutral atoms (ENAs) by adding a comprehensive analysis of four additional years (2016 through 2019). We document several improvements and rerelease the entire 11 yr, IBEX-Hi data set. The new observations track the continuing expansion of the outer heliosphere’s response to the large solar wind pressure increase in late 2014. We find that the intensification of ENAs from the heliosheath continued to expand progressively over time to directions farther from the initial, closest direction to the heliospheric boundaries, ∼20° south of the upwind direction. This expansion extended beyond the south pole in 2018 and the north pole in 2019, demonstrating that the termination shock and heliopause are closer in the south. The heliotail has not yet responded, indicating that the boundaries are significantly farther away in the downwind direction. Finally, the slow solar wind (∼1 keV) ENAs just started to intensify from the closest regions of the IBEX Ribbon. This is about two and a half years after the initial response from heliosheath ENAs and about four and a half years after the increase in solar wind output, both clearly implicating a “secondary ENA” source in the draped interstellar magnetic field, just beyond the heliopause.",
            "journalAbbreviation": "ApJS"
        }
    }

Anything wrong with it?

ponderbb commented 9 months ago

I can confirm the collections solve the showing up issue, nice find!✌🏻 @mergen3107

stelzch commented 9 months ago

Hi, great job on the bug hunt!

Yes, only items that are in collections are currently displayed. I implemented it this way because I thought that a) Zotero libraries without collections are uncommon (of course, that assumption has now been disproven) and b) because the simple list view would make collections hard to find if all items that are not contained in collections where listed alongside them.

Going forward, I think one way to solve this would be to have a special virtual collection named "All Items" at the very top. Users without collections would then have to go through a single layer of indirection to find all the items in their libraries.

What do you think about this approach?

ntrocado commented 9 months ago

I think that only showing collections makes sense, but in this case it would be helpful to have a note in the readme saying that.

Anyway thank you for making this!

On Sun, Dec 31, 2023, 10:39 Christoph Stelz @.***> wrote:

Hi, great job on the bug hunt!

Yes, only items that are in collections are currently displayed. I implemented it this way because I thought that a) Zotero libraries without collections are uncommon (of course, that assumption has now been disproven) and b) because the simple list view would make collections hard to find if all items that are not contained in collections where listed alongside them.

Going forward, I think one way to solve this would be to have a special virtual collection named "All Items" at the very top. Users without collections would then have to go through a single layer of indirection to find all the items in their libraries.

What do you think about this approach?

— Reply to this email directly, view it on GitHub https://github.com/stelzch/zotero.koplugin/issues/5#issuecomment-1872916616, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSH5RQEDULWFCIUJKKF2JLYME6GZAVCNFSM6AAAAABAVD6GOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSHEYTMNRRGY . You are receiving this because you were mentioned.Message ID: @.***>

mergen3107 commented 9 months ago

@stelzch

Happy New Year!

Thanks for your great work! I finally untethered my Kindle Scribe from the PC to able to read articles which I can even add with my phone. This will be extremely useful during conferences.

I don't mind having Collections only mode, I just didn't know I needed them :D As ntrocado mentioned, a hint during setup should be enough I think.

7596ff commented 5 months ago

Hello,

I think it would be nice to have either the "All Items" collection mentioned or at least a view of all items outside collections. I have part of my library in collections and part of it outside. I also rely on saved searches, and those don't seem to appear either.