-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Getting error pocket-reader--url-domain: Wrong type argument: arrayp, nil
with blank buffer (no entries)
#54
Comments
Thanks. Please report the value of this option in your configuration: |
The value of
|
Although I haven’t thoroughly checked the conditions yet, I’ve noticed a similar issue. It seems that when trying to retrieve what might be old archived articles, the returned items sometimes miss fields like While I haven’t done detailed testing yet, setting default values for |
@radixm46 Thanks. I'm guessing that maybe they cleaned up their backend code a bit, and maybe the values are a bit different, as you noticed, and this old code made some assumptions that no longer hold. |
Just to add, I had thought that things were too messed up to use This might help work around the issue: just mark an unread/unarchived article as a "favorite", and then go to |
@deen1 @radixm46 I think that should fix it. At least, it should make the article list work again. If an item is still missing a URL as received from the server, a warning should be displayed. Feel free to share such a warning if you see one, in case there's some other change needed to adjust to changes in the API. |
@alphapapa Thanks for looking into this and providing this patch. Unfortunately it doesn't seem to work, with a similar error as before. (I did a Now I get the error:
and the
Doing
|
@deen1 That is weird. I tested the fix on my system before I pushed it. Something in the results you're getting back from the server must be unusual. At this point I think there's no alternative but to look at the data, i.e. what's elided in the |
OK, I might be barking up the wrong tree here, but stepping through the backtrace, I noticed that
The remaining entries in the list look reasonable, like this:
As I described above, the warning from your patch arose for the item I described at the star, with
I suspect this is the source of the error, though I'm not sure. I don't think I can remove it from the Pocket web interface, as it doesn't seem to exist, and I've tried
to functions like Do you agree that this rogue "invisible" item is the problem? If so, where in the code could I try to skip or delete it? EDIT Found a few more of these ghost entries by properly expanding out the top level lisp forms in the backtrace. (I have a very long list of unread pocket articles ...)
However, it seems like just the first one alone (39438322) triggers the error. This might have to do with |
@deen1 Seems like you're on the right track. I don't know why Pocket would be returning entries without even URLs; that seems like a bug on their end. If you want to delete those items, those list items should be enough to do it using the It's a bit disappointing, but I guess we need to handle this case after all, of items lacking URLs and titles. |
After a lot of tinkering around, I managed to arrive at a configuration where I could access the main One minor point: I might be wrong, but I don't think your patch works as intended. The line
pops up the
But that's just the first thing to work around. With the following tweaks, I got Minimal working fixComment out
Provide default values for
Need to handle missing value error by providing a default time (probably a better way of writing this):
Use the above to replace
ResultsThis all works, but We now get warnings like this:
I find 7 such "ghost items" with no URL, date added or content, which have archive status I don't know if this is due to the changes I made above, but as seen in the screenshot above, archived entries are being displayed as well. I've found out how to export my Pocket articles to csv, so I will delete those entries and see what happens. |
Oops, I made a mistake in that I didn't realize that
Interesting. The code at https://github.com/Pocket/pocket-monorepo/blob/591b18e1eeba9db79333723222bb6acbb932f31d/servers/list-api/src/types/index.ts#L230-L234 seems to indicate that such items are "deleted"--so it's a mystery why they would be returned by the API. Maybe some old database entries didn't get cleaned up properly. FWIW, https://getpocket.com/developer/ now shows that:
That, and the fact that they've apparently put all the code on GitHub, suggests to me that their long-term plans don't involve maintaining the Pocket API, so it wouldn't surprise me if one day they just turn it off. A shame, but not a surprise. |
Hmm … these "ghost" items seem un-deletable! In the As you suggested above, I then evaluated:
which produced the following output:
However, reloading Just to double-check: do you also see archived entries in the main view? And do you get the quote warnings described above (regarding
Yes, I suspect something like this will happen. I have also noticed that the Pocket app/web interface no longer provides an Article View for some sites that they previously offered one for -- perhaps sites and publishers aren't feeling too happy with the service. |
Having re-read your last post, the reason why these posts apparently can't be deleted is probably because they've been already been marked as deleted (by being given status I just realized that the reason I couldn't get skip these items with a conditional was because Now, having pulled your latest update (which puts the missing URL
The warning about quoting the I think there ended up being 125 such entries (accumulated over a dozen or so years of usage), which I found by adding a However, I now have the problem of archived entries still showing up in the default |
Whether archived items are returned is controlled by the search query, which is described at https://github.com/alphapapa/pocket-reader.el?tab=readme-ov-file#searching
AFAIK that would be the number of displayed items, not the total number of items in your account. Deleting one old entry wouldn't change the number that is displayed, since the one you deleted would be replaced by the next-oldest one in the search results. Do note, if you haven't already, that the tabulated-list view is just a view; it's a representation of the data, not the data itself. Deleting an item from the list view directly only deletes its representation from the list view; it does not tell the API to delete the item from your account. That's why this package binds the command that both deletes it from the list view and deletes it via the API at the same time. |
I should have been clearer, this is in the default But before this problem started, and I was on an older version of
I not 100% sure what you mean here because I have been attempting to delete the item from the list view using As I said above, I also tried to manually delete an item by evaluating
but that didn't work either. |
In fact, setting
pretty much fixes the entire problem, without having to tweak any other functions. So maybe having it set to |
Do you notice a difference in behavior if you set that variable to an empty string, compared to its being set to nil? |
No,
leads to the same
as setting it to |
Using Emacs 29.1 on Linux,
pocket-reader.el
version0.4-pre
.I hadn't used
pocket-reader
in about a month or so, and additionally,had to update the iPadOS version of the app as well, which required
re-signing in to that (I add this detail in case it's important).
I initially tried
M-x pocket-reader
, and ended up with an empty bufferwith the message
wrong-type-argument sequencep 1
appearing. I lookedto see if this was a known problem, and found issue #53.
Since a fix to that issue had been pushed to the latest release on
master, I upgraded
pocket-reader
via Straight, with the head at commit7f55668.
After reloading
pocket-reader.el
, I ranM-x pocket-reader
again, andgot a blank buffer again, this time with the message
pocket-reader--url-domain: Wrong type argument: arrayp, nil
.Subsequently, I:
Updated
pocket-reader
's dependencies, viastraight-pull-package-and-deps
Replicated this bug in a minimal config, running
emacs -Q
andloading Straight's
bootstrap.el
before loadingpocket-reader
alone.
Restarted my current Emacs session and re-built/re-compiled
pocket-reader
.The issue persists.
ADDED
Running
M-x pocket-reader
after togglingdebug-on-error
produces thefollowing:
The text was updated successfully, but these errors were encountered: